Kacie Bawiec
4bb551d018
Back out "TalkBack support for ScrollView accessibility announcements (list and grid) - Javascript Only Changes"
...
Summary:
Original commit changeset: 3765213c5d8b
Original Phabricator Diff: D37189197 (https://github.com/facebook/react-native/commit/2d5882132fb2c533fe9bbba83576b8fac4aca727 )
Changelog: [Internal]
Reviewed By: bvanderhoof
Differential Revision: D37260990
fbshipit-source-id: bfcb10f2d5a2a1427b72a10ef380df194b041ba0
2022-06-17 22:08:57 -07:00
fabriziobertoglio1987
2d5882132f
TalkBack support for ScrollView accessibility announcements (list and grid) - Javascript Only Changes ( #33180 )
...
Summary:
This is the Javascript-only changes from D34518929 (https://github.com/facebook/react-native/commit/dd6325bafe1a539d348f3710e717a6344576b859 ), split out for push safety. Original summary and test plan below:
This issue fixes [30977][17] . The Pull Request was previously published by [intergalacticspacehighway][13] with [31666][19].
The solution consists of:
1. Adding Javascript logic in the [FlatList][14], SectionList, VirtualizedList components to provide accessibility information (row and column position) for each cell in the method [renderItem][20] as a fourth parameter [accessibilityCollectionItem][21]. The information is saved on the native side in the AccessibilityNodeInfo and announced by TalkBack when changing row, column, or page ([video example][12]). The prop accessibilityCollectionItem is available in the View component which wraps each FlatList cell.
2. Adding Java logic in [ReactScrollView.java][16] and HorizontalScrollView to announce pages with TalkBack when scrolling up/down. The missing AOSP logic in [ScrollView.java][10] (see also the [GridView][11] example) is responsible for announcing Page Scrolling with TalkBack.
Relevant Links:
x [Additional notes on this PR][18]
x [discussion on the additional container View around each FlatList cell][22]
x [commit adding prop getCellsInItemCount to VirtualizedList][23]
## Changelog
[Android] [Added] - Accessibility announcement for list and grid in FlatList
Pull Request resolved: https://github.com/facebook/react-native/pull/33180
Test Plan:
[1]. TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer ([link][1])
[2]. TalkBack announces pages and cells with Vertical Flatlist in the Paper Renderer ([link][2])
[3]. `FlatList numColumns={undefined}` Should not trigger Runtime Error NoSuchKey exception columnCount when enabling TalkBack. ([link][3])
[4]. TalkBack announces pages and cells with Nested Horizontal Flatlist in the rn-tester app ([link][4])
[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050462465
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1032340879
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050618308
[10]:https://github.com/aosp-mirror/platform_frameworks_base/blob/1ac46f932ef88a8f96d652580d8105e361ffc842/core/java/android/widget/AdapterView.java#L1027-L1029 "GridView.java method responsible for calling setFromIndex and setToIndex"
[11]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1042518901 "test case on Android GridView"
[12]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894 "TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer"
[13]:https://github.com/intergalacticspacehighway "github intergalacticspacehighway"
[14]:https://github.com/fabriziobertoglio1987/react-native/blob/80acf523a4410adac8005d5c9472fb87f78e12ee/Libraries/Lists/FlatList.js#L617-L636 "FlatList accessibilityCollectionItem"
[16]:https://github.com/fabriziobertoglio1987/react-native/blob/5706bd7d3ee35dca48f85322a2bdcaec0bce2c85/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L183-L184 "logic added to ReactScrollView.java"
[17]: https://github.com/facebook/react-native/issues/30977
[18]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6
[19]: https://github.com/facebook/react-native/pull/31666
[20]: https://reactnative.dev/docs/next/flatlist#required-renderitem "FlatList renderItem documentation"
[21]: https://github.com/fabriziobertoglio1987/react-native/commit/75147359c5d070406ebbe488c57c3cd94c08c19d "commit that introduces fourth param accessibilityCollectionItem in callback renderItem"
[22]: https://github.com/facebook/react-native/pull/33180#discussion_r826748664 "discussion on the additional container View around each FlatList cell"
[23]: https://github.com/fabriziobertoglio1987/react-native/commit/d50fd1a68112f40f4be3ac3aa4d67f96df33e387 "commit adding prop getCellsInItemCount to VirtualizedList"
Reviewed By: kacieb
Differential Revision: D37189197
Pulled By: blavalla
fbshipit-source-id: 3765213c5d8bfde56e0e5f155cdd899c368512e7
2022-06-17 17:59:51 -07:00
Jérémy Barbet
927b43d47c
typo for the automaticallyAdjustKeyboardInsets description ( #33948 )
...
Summary:
Minor typo change
## Changelog
[iOS] [Fixed] - Typo in the documation for the `automaticallyAdjustKeyboardInsets` prop
Pull Request resolved: https://github.com/facebook/react-native/pull/33948
Test Plan: Read the paragraph, solid.
Reviewed By: kacieb
Differential Revision: D36810184
Pulled By: cortinico
fbshipit-source-id: af586beb4eb3fd4337d2df8612d39c6abb0a37bf
2022-06-01 13:25:20 -07:00
Hetan Thakkar
2fb107c9a6
Fixed Textinput not properly handling padding and paddingVertical in style props ( #33564 )
...
Summary:
Fixes https://github.com/facebook/react-native/issues/33562 #21720 . Earlier this [`paddingTop`](https://github.com/facebook/react-native/blob/d5da70e17e8c8210cd79a4d7b09c6a5ded4b5607/Libraries/Components/TextInput/TextInput.js#L1367 ) used to override the `paddingTop` of `padding` and `paddingVertical` of the style props. Using `Stylesheet.flatten` will solve this problem.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[iOS] [Fixed] - Fixed paddingTop not being applied when using padding and paddingVertical in multiline textinput
Pull Request resolved: https://github.com/facebook/react-native/pull/33564
Reviewed By: christophpurrer, cortinico
Differential Revision: D36018667
Pulled By: kacieb
fbshipit-source-id: 0af0ed8ea536ec4e813325b1cf93c7cb2481eb07
2022-05-17 03:26:34 -07:00
Ken Tominaga
c73e021a4b
Remove iOS 11 deprecation warnings around SafeArea ( #32851 )
...
Summary:
We don't have to check or emulate the safe area for iOS 11 above. I deleted the unnecessary check for the safe area.
This is a continuation pull request of these iOS 11 availability check.
* [Remove iOS 11 version check by ken0nek · Pull Request https://github.com/facebook/react-native/issues/32151 · facebook/react-native](https://github.com/facebook/react-native/pull/32151 )
* [Remove iOS 11 availability check by ken0nek · Pull Request https://github.com/facebook/react-native/issues/32488 · facebook/react-native](https://github.com/facebook/react-native/pull/32488 )
-----
- Stop using layout guide (`topLayoutGuide`, `bottomLayoutGuide`)
- Refactor `RCTSafeAreaView`
- Delete `emulateUnlessSupported` property
Docs PR: https://github.com/facebook/react-native-website/pull/2919
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[iOS] [Removed] - Remove `emulateUnlessSupported`
Pull Request resolved: https://github.com/facebook/react-native/pull/32851
Reviewed By: philIip, sammy-SC
Differential Revision: D33586023
Pulled By: cortinico
fbshipit-source-id: 75fc1037141f71d9340c7b875a6bf86f9cfd6a02
2022-05-16 09:27:43 -07:00
Christian Ruink
f2e23215ca
Adding missing prop for RN Android TextInput behavior
...
Summary:
An issue that popped up working on:
D36140890
There is already behavior implemented to set the TextInput caret/cursor color independently from the selection box color in Android.
However this handy prop, was not documented or added as one of the available props for the TextInput component.
Associated behavior can be found here:
https://www.internalfb.com/code/fbsource/[f116d651b2e8]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/views/textinput/ReactTextInputManager.java?lines=512
## **Changelog**
[Android] - Add android-only prop documentation at the TextInput js level.
Reviewed By: genkikondo
Differential Revision: D36208656
fbshipit-source-id: a54a2646351d897e0d598d5e1979f2a0c443e9d6
2022-05-10 16:48:20 -07:00
Genki Kondo
7c581f3d30
Move ScrollView's contentOffset to common props
...
Summary:
ScrollView's contentOffset prop was assumed to be iOS only, but in reality it is supported on Android as well: https://fburl.com/code/nuxpjpth
Changelog:
[General] - Move ScrollView's contentOffset to common props
Reviewed By: yungsters
Differential Revision: D36219604
fbshipit-source-id: f41679fd2ce7971a30129e0d91ae9f32b9cf756e
2022-05-09 13:05:16 -07:00
Evan Yeung
73a43901b4
Deploy 0.177.0 to xplat
...
Summary: Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D36141544
fbshipit-source-id: 7e322faa6f902547bb68997d02a50352c525d543
2022-05-06 10:51:36 -07:00
George Zahariev
20d9d3aa6a
Fixes to non-product code (e.g React Native)
...
Summary:
We are working on making the empty object literal `{}` have the type `{}` - i.e. exact empty object - rather than being unsealed.
Some manual fixes, in particular to React Native code, which is used and can be synced to other repos (e.g. WWW).
With these changes, error diff in Xplat is down to ~1990 errors
Note that after I roll out `exact_empty_objects`, I'll codemod all the `{...null}` (the only way to get an exact empty object currently) back to `{}`
Changelog: [Internal]
Reviewed By: SamChou19815
Differential Revision: D36142838
fbshipit-source-id: 054caf370db230f42a4c5f5706c88979ef246537
2022-05-04 16:13:07 -07:00
Matin Zadeh Dolatabad
2596b2f695
fix: remove deprecated removeListener methods ( #33580 )
...
Summary:
Remove old deprecated modules that cause annoying warnings. This can be a breaking change for some third-party modules.
## Changelog
[General] [Removed] - Remove deprecated removeListener methods
Pull Request resolved: https://github.com/facebook/react-native/pull/33580
Test Plan: See `flow-check` and `build-arvr-js-flow` succeed in Sandcastle.
Reviewed By: cortinico
Differential Revision: D35549719
Pulled By: yungsters
fbshipit-source-id: 0495e36de19db434362d5de56463d9c1ad6edd73
2022-05-04 11:32:51 -07:00
Moti Zilberman
7b86fa2b79
Distinguish between string/number-valued interpolation nodes at the type level
...
Summary:
Changelog:
[General][Fixed] - Improved Flow type inference in Animated `.interpolate()`
Improves the ergonomics of `.interpolate()` by allowing Flow to infer the correct type for `outputRange`. This is achieved by adding a new type parameter `OutputT` to `interpolate()` (and `Animated.Interpolation` and `InterpolationConfigType`), which Flow infers as either `number` or `string` based on usage.
Admittedly, at the call site, this is not that much safer compared to something like `outputRange: $ReadOnlyArray<number | string>`, but it does document the intent of the API a bit better and provide some downstream type safety. For example, we can now express `Animated.Number` (D35869375) more precisely by excluding string-valued interpolation nodes.
Reviewed By: javache
Differential Revision: D35869725
fbshipit-source-id: e03ec22e9b3368ee196b392af011062ac99d8bb9
2022-05-03 12:04:02 -07:00
George Zahariev
d992ae0448
Codemod Object.assign with object literal first argument to object spread in Xplat
...
Summary:
Codemod `Object.assign` with object literal first argument (e.g. `Object.assign({}, foo)`) to object spread.
This adds several suppressions for exposed errors. The codemod produces errors as `Object.assign` is more unsafe than object spread. For example, `Object.assign` doesn't handle indexers, nor does it handle inexact objects properly, and when the (currently unsealed) empty object is supplied as the first argument, it also leads to unsafe behaviour:
https://flow.org/try/#0FAehAIGJwSQOwCYFMAeSBOBnYyDGAbAQ3SXADdjwBbQgBwC5wBvAbUwBd0BLOAcwF1GHbnwC+AbmDAAFAHkARgCskudgDpCmTF15xpTQowCMogDTU6ASkbyA9rfxJCcS+PBhwAfm8ymwcAGG4Eam-gFqETS0oaKu7hAAyrQkhAjgGOi2WOCa6Si0KuxICFIe0PCohKo5AGZF6HlV7DgqRCTklDyVqowGQpw8vOYRahJSCsqqGlo6en3gAEQAFlwL5vLGZuBdKE1xHjtN4Li2AK74abZkGVzI4AAG8vfgUvphOYzLq6EB4BvBP3CEUOqhi+0SyScaQyWUwOThqAKqmKpQg0AAqnBME5HGkalwsOwcuheDIJoVptpdPotvMTNZmDV7Iw4KcqPIMLE3B5vN4gA
The codemod is safe to do, despite some Flow errors, as `Object.assign` and object spread are equivalent at runtime, with the exception that `Object.assign` triggers setters on the target object. However the codemod [does not run](https://github.com/eslint/eslint/blob/938dbdd6c310784cc8a7329efaeb0e34321b9e1f/lib/rules/prefer-object-spread.js#L283-L285 ) if the first argument (object literal) has getters/setters, so we are fine.
```
ag -l 'Object.assign\(' | xargs ag -l 'flow' | xargs js1 lint --rule '{"prefer-object-spread":2}' --fix
```
Some manual fixes
```
arc f
```
Reviewed By: SamChou19815
Differential Revision: D36023786
fbshipit-source-id: b682562e670410acf4175ba59ab285c7bdcfe052
2022-04-28 19:40:55 -07:00
Moti Zilberman
a12959546a
Revert D34518929: TalkBack support for ScrollView accessibility announcements (list and grid)
...
Differential Revision:
D34518929 (https://github.com/facebook/react-native/commit/dd6325bafe1a539d348f3710e717a6344576b859 )
Original commit changeset: 410a05263a56
Original Phabricator Diff: D34518929 (https://github.com/facebook/react-native/commit/dd6325bafe1a539d348f3710e717a6344576b859 )
fbshipit-source-id: 114d0910970c5f5caefb98c378722faba283f2a1
2022-04-20 06:48:19 -07:00
fabriziobertoglio1987
dd6325bafe
TalkBack support for ScrollView accessibility announcements (list and grid) ( #33180 )
...
Summary:
This issue fixes [30977][17] . The Pull Request was previously published by [intergalacticspacehighway][13] with [31666][19].
The solution consists of:
1. Adding Javascript logic in the [FlatList][14], SectionList, VirtualizedList components to provide accessibility information (row and column position) for each cell in the method [renderItem][20] as a fourth parameter [accessibilityCollectionItem][21]. The information is saved on the native side in the AccessibilityNodeInfo and announced by TalkBack when changing row, column, or page ([video example][12]). The prop accessibilityCollectionItem is available in the View component which wraps each FlatList cell.
2. Adding Java logic in [ReactScrollView.java][16] and HorizontalScrollView to announce pages with TalkBack when scrolling up/down. The missing AOSP logic in [ScrollView.java][10] (see also the [GridView][11] example) is responsible for announcing Page Scrolling with TalkBack.
Relevant Links:
x [Additional notes on this PR][18]
x [discussion on the additional container View around each FlatList cell][22]
x [commit adding prop getCellsInItemCount to VirtualizedList][23]
## Changelog
[Android] [Added] - Accessibility announcement for list and grid in FlatList
Pull Request resolved: https://github.com/facebook/react-native/pull/33180
Test Plan:
[1]. TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer ([link][1])
[2]. TalkBack announces pages and cells with Vertical Flatlist in the Paper Renderer ([link][2])
[3]. `FlatList numColumns={undefined}` Should not trigger Runtime Error NoSuchKey exception columnCount when enabling TalkBack. ([link][3])
[4]. TalkBack announces pages and cells with Nested Horizontal Flatlist in the rn-tester app ([link][4])
[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050462465
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1032340879
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050618308
[10]:https://github.com/aosp-mirror/platform_frameworks_base/blob/1ac46f932ef88a8f96d652580d8105e361ffc842/core/java/android/widget/AdapterView.java#L1027-L1029 "GridView.java method responsible for calling setFromIndex and setToIndex"
[11]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1042518901 "test case on Android GridView"
[12]:https://github.com/fabriziobertoglio1987/react-native-notes/issues/6#issuecomment-1050452894 "TalkBack announces pages and cells with Horizontal Flatlist in the Paper Renderer"
[13]:https://github.com/intergalacticspacehighway "github intergalacticspacehighway"
[14]:https://github.com/fabriziobertoglio1987/react-native/blob/80acf523a4410adac8005d5c9472fb87f78e12ee/Libraries/Lists/FlatList.js#L617-L636 "FlatList accessibilityCollectionItem"
[16]:https://github.com/fabriziobertoglio1987/react-native/blob/5706bd7d3ee35dca48f85322a2bdcaec0bce2c85/ReactAndroid/src/main/java/com/facebook/react/views/scroll/ReactScrollView.java#L183-L184 "logic added to ReactScrollView.java"
[17]: https://github.com/facebook/react-native/issues/30977
[18]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/6
[19]: https://github.com/facebook/react-native/pull/31666
[20]: https://reactnative.dev/docs/next/flatlist#required-renderitem "FlatList renderItem documentation"
[21]: https://github.com/fabriziobertoglio1987/react-native/commit/75147359c5d070406ebbe488c57c3cd94c08c19d "commit that introduces fourth param accessibilityCollectionItem in callback renderItem"
[22]: https://github.com/facebook/react-native/pull/33180#discussion_r826748664 "discussion on the additional container View around each FlatList cell"
[23]: https://github.com/fabriziobertoglio1987/react-native/commit/d50fd1a68112f40f4be3ac3aa4d67f96df33e387 "commit adding prop getCellsInItemCount to VirtualizedList"
Reviewed By: kacieb
Differential Revision: D34518929
Pulled By: blavalla
fbshipit-source-id: 410a05263a56162bf505a4cad957b24005ed65ed
2022-04-19 19:45:10 -07:00
Vincent Riemer
a40747e2d8
Add experimental disclaimers to pointer event APIs
...
Summary: Changelog: [Internal] - Add experimental disclaimers to pointer event APIs
Reviewed By: lunaleaps, p-sun
Differential Revision: D35682318
fbshipit-source-id: e85a37a2eb9568df636352e170bd42a3bb30a2f6
2022-04-18 15:47:55 -07:00
Rick Hanlon
41cbccd98d
@nocommit React Native sync for revisions 1159ff6...34aa5cf
...
Summary:
I'm kicking this off to see what's the extent of failures we're going to get if we try to bump to React 18 inside RN OSS.
This sync includes the following changes:
- **[34aa5cfe0](https://github.com/facebook/react/commit/34aa5cfe0 )**: Update local package.jsons for 18 //<Andrew Clark>//
- **[e7d0053e6](https://github.com/facebook/react/commit/e7d0053e6 )**: [fizz] Fix validateIterable call ([#24166 ](https://github.com/facebook/react/pull/24166 )) //<salazarm>//
- **[6b85823b3](https://github.com/facebook/react/commit/6b85823b3 )**: Clean up Selective Hydration / Event Replay flag ([#24156 ](https://github.com/facebook/react/pull/24156 )) //<salazarm>//
Changelog:
[General][Changed] - React Native sync for revisions 1159ff6...34aa5cf
jest_e2e[run_all_tests]
Reviewed By: cortinico
Differential Revision: D35504622
fbshipit-source-id: ad0f6b42b6e03d78cd5d6ba51ce5a5730d25b167
2022-04-12 08:50:06 -07:00
Pieter De Baets
6e5cefe604
Codemod arvr to use onPointer* instead of onEnter/onExit/onMove
...
Summary: Changelog: [Internal] Improve experimental support for pointer event dispatching support in JS
Reviewed By: mdvacca
Differential Revision: D35216647
fbshipit-source-id: 212f038115e4713097db05847a9638efe0a25bed
2022-04-05 07:11:10 -07:00
Luna Wei
c50e6b52fe
Emit non-hover pointer events on Android ( #33526 )
...
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33526
Changelog: [Internal] Experimental pointer event dispatching on Android: touch pointer support only, hover events to come later.
Reviewed By: vincentriemer
Differential Revision: D34132667
fbshipit-source-id: 6506d43b4ad16e11b10c3cd23e0231428209411f
2022-03-30 19:12:42 -07:00
Genki Kondo
19cf70266e
VirtualizedList optimization - avoid lambda creation in CellRenderer onLayout prop
...
Summary:
Problem:
All CellRenderers rerender every time the containing VirtualizedList is rerendered. This is due to the following:
- Lambda is created for each CellRenderer's onLayout prop on every VirtualizedList render (fixed in this diff)
- CellRenderer's parentProps prop changes on every VirtualizedList render
Changelog:
[Internal] - VirtualizedList optimization - avoid lambda creation in CellRenderer onLayout prop
Reviewed By: javache
Differential Revision: D35061321
fbshipit-source-id: ab16bda8418b692f1edb4bce87e25c34f6252b56
2022-03-24 08:28:01 -07:00
Vojtech Novak
8a5460ce80
fix attempting to focus disabled textinputs ( #30695 )
...
Summary:
when we call `focus()` upon a TextInput ref which has prop `editable=false` it marks the textinput as focused in `TextInputState` even though the focus is rejected by textinput itself because it is not editable.
then, when you change `editable` prop to `true` and call `focus` again, [this condition](https://github.com/facebook/react-native/blob/e912c462eb0b7166ca5947bb5a3ee20761d910b6/Libraries/Components/TextInput/TextInputState.js#L46 ) or rather [this one](https://github.com/facebook/react-native/blob/1b2b2198e1b2383523b4655dc8c220d251b057d6/Libraries/Components/TextInput/TextInputState.js#L89 ) will evaluate to `false` and focus will not happen even though it can and should happen.
see also https://github.com/facebook/react-native/blob/0.64-stable/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js#L3895
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Fixed] - `focus()` on TextInput to respect its `editable` state
Pull Request resolved: https://github.com/facebook/react-native/pull/30695
Test Plan: Create a `TextInput` with prop `editable=false` and call `ref.current.focus()` upon its ref. TextInput should not be marked as focused in `TextInputState`.
Reviewed By: yungsters
Differential Revision: D34357913
Pulled By: lunaleaps
fbshipit-source-id: 9a2fb819bbb05ef213c9b5d739dec583ae0a3e6f
2022-03-22 11:43:57 -07:00
Vegas Murphy
d34a75e9e5
Fix layout in casting screen
...
Summary:
Changelog:
[Android][Fixed] - Fix StatusBar not updating to use translucent values when set to the same value across different activities
With native nav we open routes in a new activity. Each activity has its own StatusBar configured so we need to ensure it is configured properly.
Currently since the statusBar RN component avoids changing the StatusBar if the value hasn't changed it never gets updated and doesn't become translucent this results in all our padding being off since we add padding to account for the status bar
Reviewed By: yungsters
Differential Revision: D34810143
fbshipit-source-id: 5e382026fb89542fe0c8f6ab396f2fbeedee7a05
2022-03-11 14:07:33 -08:00
Diego Pasquali
7b05b091fd
Integrated iOS-only accessibilityLanguage prop ( #33090 )
...
Summary:
This PR fixes https://github.com/facebook/react-native/issues/30891
This PR is going to add an `accessibilityLanguage` prop to all the available components. This props is currently working only on iOS and should follow the [guidelines of the relative configuration](https://developer.apple.com/documentation/objectivec/nsobject/1615192-accessibilitylanguage ).
I'm in no way an expert on native programming (especially Objective-C) so I'm open to changes / improvements 🙂
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[iOS] [Added] - Integrated the `accessibilityLanguage` prop to all the available components. The prop is available for any platform but it will work only on iOS.
Pull Request resolved: https://github.com/facebook/react-native/pull/33090
Test Plan:
This has been tested using both the Simulator, checking for the `Language` attribute, and using a physical device with the Voice Over enabled.
<img width="1083" alt="Screenshot 2022-02-11 at 13 17 32" src="https://user-images.githubusercontent.com/5963683/153590415-65fcb4ff-8f31-4a0f-90e5-8eb1aae6aa3d.png ">
Reviewed By: philIip
Differential Revision: D34523608
Pulled By: rh389
fbshipit-source-id: b5d77fc0b3d76ea8ed8f30c8385459ba98122ff6
2022-03-07 09:43:30 -08:00
Ramanpreet Nara
922219a852
Fix ScrollView Static ViewConfigs
...
Summary:
This should fix the SVC === NVC check for ScrollView and AndroidHorizontalScrollView.
Changelog: [Internal]
Reviewed By: p-sun
Differential Revision: D34542873
fbshipit-source-id: 7e25d3a6c1417877b64501981652d767ba2eda48
2022-03-01 16:27:52 -08:00
Ramanpreet Nara
5c8d95b4e2
Make remaining FBiOS/FB4A components export SVCs via __INTERNAL_VIEW_CONFIG
...
Summary:
The static ViewConfig codegen generates the static ViewConfig inside the JavaScript module [under an exported constant](https://github.com/facebook/react-native/blob/a0a2958cdac767f50084c2d5bee6cf224ffb9db3/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L127-L129 ):
```
export const __INTERNAL_VIEW_CONFIG = VIEW_CONFIG;
export default NativeComponentRegistry.get(nativeComponentName, () => __INTERNAL_VIEW_CONFIG);
```
This exported constant allows us to build a test page that requires all components, and compares their static ViewConfigs with their native ViewConfig.
This diff makes components with hand-written static ViewConfigs also export this __INTERNAL_VIEW_CONFIG const.
Changelog: [Internal]
Reviewed By: p-sun
Differential Revision: D34541868
fbshipit-source-id: f55dd3f1b161038baaf84cbbf75c1f4041c34647
2022-03-01 16:27:52 -08:00
Gabriel Donadel Dall'Agnol
e139ef0de8
chore: Add comments explaining the existence of NativeDatePickerAndroid ( #33159 )
...
Summary:
This PR adds comments explaining the reason why the `NativeDatePickerAndroid.js` file was kept when removing `DatePickerAndroid`(https://github.com/facebook/react-native/commit/7a770526c626e6659a12939f8c61057a688aa623 ) in order to prevent people from trying to delete it, as this file has no references in the Github repo
## Changelog
[Internal] [Added] - Add comments explaining the existence of NativeDatePickerAndroid
Pull Request resolved: https://github.com/facebook/react-native/pull/33159
Test Plan: Ensure builds are still working correctly, although this just adds a comment
Reviewed By: cortinico
Differential Revision: D34487638
Pulled By: lunaleaps
fbshipit-source-id: 42cb7331e98d69ff2f69f19bfbb2e65c063120f7
2022-02-28 06:25:20 -08:00
jonathanmos
8d50bf1133
Fix Switch causing RetryableMountingLayerException ( #32602 )
...
Summary:
Added a null check to native.value in Switch to fix regression from RN 66 -> stuck operation in mViewCommandOperations list in Android Release on initial layout of a screen with Switch component. If approved, please incorporate this fix into an RN 66 release.
## Changelog
[Android][Fixed] - Added a null check to native.value in Switch to fix https://github.com/facebook/react-native/issues/32594
Pull Request resolved: https://github.com/facebook/react-native/pull/32602
Test Plan: To reproduce, put a log in UIViewOperationQueue in dispatchViewUpdates you can see that the RetryableMountingException is no longer thrown for a screen with the Switch component on Android Release. As a result, mViewCommandOperations no longer has a stuck operation on initial layout.
Reviewed By: charlesbdudley
Differential Revision: D34397788
Pulled By: lunaleaps
fbshipit-source-id: 1cee3516fb987942dfa50ad1f2d11c965a947f05
2022-02-24 17:46:41 -08:00
Riccardo Cipolleschi
235f168574
Move the SegmentedComponentIOS away from React Native Core ( #33140 )
...
Summary:
Pull Request resolved: https://github.com/facebook/react-native/pull/33140
Pull Request resolved: https://github.com/facebook/metro/pull/776
This Diff moves the `SegmentedComponentIOS` away from the core of React Native to move forward with the Lean Core effort
## Changelog
[General][Removed] - This diff removes the `SegmentedControlIOS` export from React Native. Internally, we are requiring `SegmentedControlIOS` directly now and externally people will have to use the community maintained module (https://github.com/react-native-segmented-control ).
Reviewed By: cortinico
Differential Revision: D34304255
fbshipit-source-id: d4e2b0bda56708769603be6f164e6bf89997fd93
2022-02-21 05:23:16 -08:00
fabriziobertoglio1987
b2e625a517
Switch component does not disable click ( #33070 )
...
Summary:
This issue fixes https://github.com/facebook/react-native/issues/30944 fixes https://github.com/facebook/react-native/issues/30840 ([Test Case 7.1][7.1], [Test Case 7.3][7.3], [Test Case 7.5][7.5]) which affects Platform Android. Previous PR https://github.com/facebook/react-native/pull/31199 .
The issue is caused by the missing prop `accessibilityState` in the Switch component.
The solution consists of passing the accessibilityState to the `AndroidSwitchNativeComponent` component as previously implemented in other components (for example, [Button][8]).
Relevant discussions https://github.com/facebook/react-native/issues/30840#issuecomment-780981316 and https://github.com/facebook/react-native/pull/31001/files#r578827409 .
[8]: https://github.com/facebook/react-native/pull/31001/files#diff-4f225d043edf4cf5b8288285b6a957e2187fc0242f240bde396e41c4c25e4124R281-R289
The solution proposed in this pull request consists of:
1. Passing `accessibilityState` to the `AndroidSwitchNativeComponent`
2. If the value of prop `accessibilityState.disabled` is different from the prop `disabled`, the prop `disabled` over-rides the `accessibilityState.disabled` value.
For example:
```jsx
<Switch disabled={true} accessibilityState={{disabled: false}} />
````
becomes:
````jsx
<Switch disabled={true} accessibilityState={{disabled: true}} />
````
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Fixed] - Switch Component doesn't disable click functionality when disabled
Pull Request resolved: https://github.com/facebook/react-native/pull/33070
Test Plan:
[1]. Switch has `disabled` and `accessibilityState={{disabled: false}}`
[2]. Switch has `disabled`
[3]. Switch has `accessibilityState={{disabled: true}}`
[4]. Switch has `accessibilityState={{disabled:false}}`
[5]. Switch has `disabled={false}` and `accessibilityState={{disabled:true}}`
7. Test Cases on the main branch
[7.1]. Switch has `disabled` and `accessibilityState={{disabled: false}}`
[7.3] Switch has `accessibilityState={{disabled: true}}`
[7.5] Switch has `disabled={false}` and `accessibilityState={{disabled:true}}`
[1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031168488
[2]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031168868
[3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031169167
[4]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031170883
[5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031170989
[7.1]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031171560
[7.3]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031172605
[7.5]: https://github.com/fabriziobertoglio1987/react-native-notes/issues/5#issuecomment-1031173437
Reviewed By: kacieb
Differential Revision: D34189484
Pulled By: blavalla
fbshipit-source-id: 8ea9221a5641d05c20d0309abdb3f0d02c569f2f
2022-02-16 15:02:59 -08:00
Moti Zilberman
1814bffcc2
Minor changes to Flow types
...
Summary: Changelog: [Internal]
Reviewed By: arushikesarwani94
Differential Revision: D34171528
fbshipit-source-id: c3fdc4a8c77731f1f43f0e6d830d172906ed79a1
2022-02-15 08:50:55 -08:00
Ramanpreet Nara
971ba5c26b
Re-introduce {eventName}: true ViewConfig ValidAttributes in Static ViewConfigs
...
Summary:
# Problem
I removed the {eventName}: true entries from ViewConfigs validAttributes in D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a ). These entries were iOS-only. I removed them to achieve platform-consistency in native ViewConfigs.
This change broke the onLayout event for all React Native components. So, I reverted D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a ) for native ViewConfigs server-side. But I never got around to reverting D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a ) for static ViewConfigs.
# Changes
This diff reverts D33303950 (https://github.com/facebook/react-native/commit/ca5aaa766329055f206e51b2eaefcba4f282b05a ) for Static ViewConfigs, with server-side gating.
Now, these {eventName}: true ViewConfig validAttribute will be inserted into all view configs (static and native) **by default**.
Calling RCTDisableViewConfigEventValidAttributes(YES) on iOS will remove {eventName}: true ViewConfig ValidAttributes entries from Static ViewConfigs. (Previously, this method only removed the entries from native ViewConfigs).
https://www.internalfb.com/code/fbsource/[6615b0675bdf]/fbobjc/Apps/Wilde/FBReactModule2/FBReactModuleAPI/FBReactModuleAPI/Exported/FBReactModule.mm?lines=344
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D33933403
fbshipit-source-id: 17823ed99f97d7851f04e5cdab9c95667df13253
2022-02-08 19:11:08 -08:00
Ramanpreet Nara
f89ed90a1e
Remove the onChange event for Slider
...
Summary:
The onChange event for slider isn't necessary. Instead, it uses onValueChanged.
## What motivated this change?
After D33933403, the SliderNativeComponent starts generating an onChange: true entry in its static ViewConfig's validAttributes map.
**The Problem:** Slider inherits the onChange event from RCTViewManager. And in RCTViewManager, onChange is defined as an event that doesn't generate a ViewConfig validAttribute:
1. onChange is exported from [RCTViewManager customBubblingEventTypes](https://www.internalfb.com/code/fbsource/[210a214c9da7a847dd8840cae9f8341ed39a2ff6]/xplat/js/react-native-github/React/Views/RCTViewManager.m?lines=99%2C105%2C118 )
2. Events exported from customBubblingEventTypes [don't insert into validAttributes](https://www.internalfb.com/code/fbsource/[8237815744b8cf7e38d9cf107a55c015f7b1545b]/xplat/js/react-native-github/React/Views/RCTComponentData.m?lines=393-398 ).
To summarize:
- onChange isn't used by slider
- onChange generates an onChange: true entry in SVCs
- onChange **doesn't** generate an onChange: true entry in NVC
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D34052662
fbshipit-source-id: 76bfd75c1ecbaa40d33e2b097b1f4458bf200ac2
2022-02-08 19:11:07 -08:00
Hetan Thakkar
3eddc9abb7
Opacity in TouchableOpacity properly react to state change ( #32956 )
...
Summary:
This PR fixes the opacity bug where it fails to properly react to state change. This PR resolves the issue detailed in https://github.com/facebook/react-native/issues/32476
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[General] [Fixed] - Fixed opacity value in TouchableOpacity
Pull Request resolved: https://github.com/facebook/react-native/pull/32956
Test Plan: The code I added in componentDidUpdate does solve the issue and passes all the test cases
Reviewed By: ryancat
Differential Revision: D33766718
Pulled By: cortinico
fbshipit-source-id: 951bedf22619fc12e66156d0a6074cd8adf1d3eb
2022-02-07 04:23:01 -08:00
Tim Yung
3e229f27bc
RN: Remove propTypes from Image, Text, and TextInput
...
Summary:
Removes the `propTypes` member from the `Image`, `Text`, and `TextInput` components.
They have been deprecated since React Native v0.66.
Changelog:
[General][Removed] - Removed `Image.propTypes`, `Text.propTypes`, and `TextInput.propTypes`.
Reviewed By: kacieb
Differential Revision: D33750298
fbshipit-source-id: 085f83ad838196bdd531b097b8ce5957270c3ad1
2022-02-01 16:19:01 -08:00
Ramanpreet Nara
7b9490b4b1
Introduce PlatformBaseViewConfig and fix SVC for RCTView
...
Summary:
## Impact
Fix the Static ViewConfig for <View/>.
This diff fixes the base ViewConfig for all HostComponents on both platforms. Consequently, it simplifies SVC reconciliation efforts, by nearly eliminating the first of these classes of SVC errors:
1. Unexpected properties in SVC
2. Missing properties in SVC
3. Not matching properites in SVC
## What is the base ViewConfig on each iOS/Android?
**On iOS:**
- All props come from ViewManagers
- All HostComponent ViewManagers extend <View/> ViewManager
https://pxl.cl/1SxdF
Therefore, the base ViewConfig for all components should be <View/>'s static ViewConfig.
**On Android:**
The component model is a bit more complicated:
https://pxl.cl/1Vmp5
Takeaways:
- Props come from Shadow Nodes **and** ViewManagers
- Nearly all HostComponent ViewManagers extend BaseViewManager. But, that's not <View/>'s ViewManager.
- <View/>'s ViewManager is [ReactViewManager](https://fburl.com/code/0zalv8zk ), which is a descendent of BaseViewManager, and declares its own ReactProps.
So, on Android, it's not safe for the base ViewConfig to be <View>'s ViewConfig:
1. No components actualy incorportate <View/>'s props
2. Some components don't even incorporate BaseViewManager's props.
So, what should the base ViewConfig be on Android?
- Nearly all components extend BaseViewManager. BaseViewManager must have a shadow node [that extends LayoutShadowNode](https://www.internalfb.com/code/fbsource/[47d68ebc06e64d97da9d069f1ab662b392f0df8a]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java?lines=40 ). Therefore, we'll make the base ViewConfig on Android be generated by BaseViewManager + LayoutShadowNode.
## Changes
In this diff, I removed ReactNativeViewViewConfig, and introduced a new view config called PlatformBaseViewConfig. This ViewConfig partial will capture all the props available on all HostComponents on **both** platforms. This may not necessarily be the props made available on <View/>.
The only components that don't extend the base platform props are: RCTTextInlineImage. What we do with these components is TBD.
Changelog: [Internal]
Reviewed By: p-sun, yungsters
Differential Revision: D33135055
fbshipit-source-id: 7299f60ae45ed499ce47c0d0a6309a047bff90bb
2022-01-31 14:52:32 -08:00
Pieter De Baets
d682753244
Support setting hitSlop with single value (JS) [re-land]
...
Summary:
JS changes to support D32138347 (https://github.com/facebook/react-native/commit/a96bdb7154b0d8c7f43977d8a583e8d2cbdcb795 ). This was previously reverted due to missing iOS Paper support.
Changelog: [Android][Fixed] Enable hitSlop to be set using a single number.
Original commit changeset: 91cfcc86582c
Original Phabricator Diff: D32559015 (https://github.com/facebook/react-native/commit/589b129581903a737a64e14eab3f2e29620831d5 )
Reviewed By: yungsters
Differential Revision: D33453327
fbshipit-source-id: d289a0a8b8208bc9c68e6ca537632b745e8196ed
2022-01-31 04:06:22 -08:00
Marshall Roch
851e87a1a6
make Easing an object, not a class
...
Summary:
`Easing` only has static properties and is never constructed or subclassed, so there doesn't seem to be any reason for it to be a class instead of an object.
as a class, Flow errors about `method-unbinding` on every single use of it.
Changelog: [Internal]
Reviewed By: motiz88
Differential Revision: D33774944
fbshipit-source-id: c0bd2e3d7a78e538f95b88b2b1b12d301c8f590c
2022-01-25 15:23:46 -08:00
Gabriel Donadel Dall'Agnol
0cc80b4d0c
fix: KeyboardAvoidingView _updateBottomIfNecessary typo ( #32894 )
...
Summary:
While working on a fix for https://github.com/facebook/react-native/issues/29974 I notice that the `_updateBottomIfNecessary` function inside `KeyboardAvoidingView` was misspelled, so I decided to open a PR fixing it.
## Changelog
[General] [Fixed] - Fix typo in _updateBottomIfNecessary function on KeyboardAvoidingView component
Pull Request resolved: https://github.com/facebook/react-native/pull/32894
Test Plan: Shouldn't require much testing as this is just renaming a private function of `KeyboardAvoidingView`
Reviewed By: philIip
Differential Revision: D33620554
Pulled By: cortinico
fbshipit-source-id: 69b8969bef09cf58b9b1c8a9154dc52686187f8a
2022-01-17 11:36:57 -08:00
Ramanpreet Nara
28f5abc717
Fix NVC for RCTSlider
...
Summary:
## Android Failures
```
LOG SVC RCTSlider Invalid
LOG {
"missing": {
"directEventTypes": {
"topSlidingComplete": {
"registrationName": "onSlidingComplete"
}
}
},
"unexpected": {
"bubblingEventTypes": {
"paperValueChange": {
"phasedRegistrationNames": {
"captured": "onValueChangeCapture",
"bubbled": "onValueChange"
}
},
"topValueChange": {
"phasedRegistrationNames": {
"captured": "onValueChangeCapture",
"bubbled": "onValueChange"
}
}
},
"directEventTypes": {
"paperSlidingComplete": {
"registrationName": "onSlidingComplete"
}
},
"validAttributes": {
"disabled": true,
"maximumTrackImage": {
"process": "[Function resolveAssetSource]"
},
"minimumTrackImage": {
"process": "[Function resolveAssetSource]"
},
"thumbImage": {
"process": "[Function resolveAssetSource]"
},
"trackImage": {
"process": "[Function resolveAssetSource]"
}
}
},
"unequal": {}
}
```
## iOS Failures
```
LOG SVC RCTSlider Invalid
LOG {
"missing": {},
"unexpected": {
"bubblingEventTypes": {
"paperValueChange": {
"phasedRegistrationNames": {
"captured": "onValueChangeCapture",
"bubbled": "onValueChange"
}
}
},
"directEventTypes": {
"paperSlidingComplete": {
"registrationName": "onSlidingComplete"
}
},
"validAttributes": {
"enabled": true
}
},
"unequal": []
}
```
Reviewed By: yungsters
Differential Revision: D33409401
fbshipit-source-id: 519b6e35246e6671dbea1f374435d92937d96c1d
2022-01-14 16:31:50 -08:00
Ramanpreet Nara
0ee66889e0
Fix SVC for AndroidHorizontalScrollView
...
Summary:
## Failure
```
LOG {
"missing": {
"validAttributes": {
"borderBottomLeftRadius": true,
"borderRightColor": {
"process": "[Function processColor]"
},
"borderRadius": true,
"borderLeftColor": {
"process": "[Function processColor]"
},
"borderColor": {
"process": "[Function processColor]"
},
"borderTopRightRadius": true,
"borderBottomColor": {
"process": "[Function processColor]"
},
"borderTopColor": {
"process": "[Function processColor]"
},
"borderStyle": true,
"borderBottomRightRadius": true,
"borderTopLeftRadius": true,
"removeClippedSubviews": true
}
},
"unexpected": {},
"unequal": []
}
```
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D33341777
fbshipit-source-id: c44661411e690b4536d9e979b79f34e200c3720b
2022-01-11 14:22:15 -08:00
Ramanpreet Nara
5bc7b02fc7
Fix SVC for AndroidHorizontalScrollContentView
...
Summary:
## Failure
```
LOG SVC AndroidHorizontalScrollContentView Invalid
LOG {
"missing": {
"validAttributes": {
"removeClippedSubviews": true
}
},
"unexpected": {},
"unequal": []
}
```
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D33341774
fbshipit-source-id: 8f287ba00252f8456ad642eaedf38fa3aa2a11ff
2022-01-11 14:22:15 -08:00
Ramanpreet Nara
067bcb5325
Fix SVC for RCT{Multiline,Singleline}TextInput
...
Summary:
See title.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D33341775
fbshipit-source-id: be1c876375b1106d51e871805c23d345906b4631
2022-01-11 14:22:14 -08:00
Ramanpreet Nara
9022849505
Fix SVC for RCTScrollView
...
Summary:
## Failure
```
LOG SVC RCTScrollView Invalid
LOG {
"missing": {
"validAttributes": {
"borderBottomLeftRadius": true,
"borderRightColor": {
"process": "[Function processColor]"
},
"borderRadius": true,
"borderLeftColor": {
"process": "[Function processColor]"
},
"borderColor": {
"process": "[Function processColor]"
},
"borderTopRightRadius": true,
"borderBottomColor": {
"process": "[Function processColor]"
},
"borderTopColor": {
"process": "[Function processColor]"
},
"borderStyle": true,
"borderBottomRightRadius": true,
"borderTopLeftRadius": true,
"removeClippedSubviews": true
}
},
"unexpected": {
"directEventTypes": {
"topScrollToTop": {
"registrationName": "onScrollToTop"
}
},
"validAttributes": {
"alwaysBounceHorizontal": true,
"alwaysBounceVertical": true,
"automaticallyAdjustContentInsets": true,
"automaticallyAdjustKeyboardInsets": true,
"automaticallyAdjustsScrollIndicatorInsets": true,
"bounces": true,
"bouncesZoom": true,
"canCancelContentTouches": true,
"centerContent": true,
"contentInset": {
"diff": "[Function pointsDiffer]"
},
"contentInsetAdjustmentBehavior": true,
"directionalLockEnabled": true,
"indicatorStyle": true,
"inverted": true,
"keyboardDismissMode": true,
"maintainVisibleContentPosition": true,
"maximumZoomScale": true,
"minimumZoomScale": true,
"onMomentumScrollBegin": true,
"onMomentumScrollEnd": true,
"onScroll": true,
"onScrollBeginDrag": true,
"onScrollEndDrag": true,
"onScrollToTop": true,
"pinchGestureEnabled": true,
"scrollEventThrottle": true,
"scrollIndicatorInsets": {
"diff": "[Function pointsDiffer]"
},
"scrollToOverflowEnabled": true,
"scrollsToTop": true,
"showsHorizontalScrollIndicator": true,
"zoomScale": true
}
},
"unequal": []
}
```
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D32225225
fbshipit-source-id: 0f236256dcbcab4fe66165b5e36df2b5f785d94e
2022-01-11 14:22:14 -08:00
grgr-dkrk
36037fa81b
feat: add accessibilityLabelledBy props ( #32470 )
...
Summary:
related: https://github.com/facebook/react-native/issues/30846 , https://github.com/facebook/react-native/issues/26739
Added `accessibilityLabelledBy` props to find the nativeID of the associated label, it mainly for` <TextInput> `.
The reason for implementing it as `labelledBy` instead of `labelFor` is as follows.
- It was difficult to find a component with `labelFor` because the `<Text>` component does not add the `labelFor` received from her Props to the View's tag.
- The use case looks like the HTML `aria-labelledby`, which is intuitive for web developers. It also seems easy to convert to a web platform.
## Changelog
<!-- Help reviewers and the release process by writing your own changelog entry. For an example, see:
https://github.com/facebook/react-native/wiki/Changelog
-->
[Android] [Added] - add `accessibilityLabelledBy` props
Pull Request resolved: https://github.com/facebook/react-native/pull/32470
Test Plan:
I checked it with RNTester using an Android11.
https://user-images.githubusercontent.com/40130327/138666856-891d9f4d-52cf-4181-a81f-13b033037db4.mp4
Reviewed By: lunaleaps, kacieb
Differential Revision: D31897112
Pulled By: ShikaSD
fbshipit-source-id: 66361735679560c01834b3a4483adf264098b3e3
2022-01-11 06:51:39 -08:00
Ramanpreet Nara
8487470476
Fix SVC for AndroidTextInput
...
Summary:
## SVC != NVC Failure
```
LOG SVC AndroidTextInput Invalid
LOG {
"missing": {
"validAttributes": {
"borderBottomLeftRadius": true,
"borderBottomColor": {
"process": "[Function processColor]"
},
"borderRightColor": {
"process": "[Function processColor]"
},
"borderLeftColor": {
"process": "[Function processColor]"
},
"borderTopRightRadius": true,
"borderColor": {
"process": "[Function processColor]"
},
"borderBottomRightRadius": true,
"borderRadius": true,
"borderStyle": true,
"borderTopColor": {
"process": "[Function processColor]"
},
"borderTopLeftRadius": true
}
},
"unexpected": {
"validAttributes": {
"autoCompleteType": true
}
},
"unequal": []
}
```
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D33341773
fbshipit-source-id: a3c7f043d6b2ba0e2a4253739826e6f7f68e7ca5
2022-01-11 00:24:41 -08:00
Ramanpreet Nara
cb3321e3b0
Refactor: Inline AndroidTextInputViewConfig
...
Summary:
Putting the static view config into its own file creates the uncertainty that n > 1 files import the static view config. This isn't true for AndroidTextViewConfig. So, let's just inline this static view config in the NativeComponent that uses it.
Changelog: [Internal]
Reviewed By: mdvacca
Differential Revision: D33341776
fbshipit-source-id: 6fb710b8776d7b9276022c5226acefd7cf8395fb
2022-01-11 00:24:41 -08:00
Ramanpreet Nara
848e34e753
Fix SVC/NVC for AndroidDrawerLayout
...
Summary:
## Failures
```
LOG SVC AndroidDrawerLayout Invalid
LOG {
"missing": {},
"unexpected": {
"directEventTypes": {
"topDrawerOpened": {
"registrationName": "onDrawerOpen"
},
"topDrawerClosed": {
"registrationName": "onDrawerClose"
}
},
"validAttributes": {
"keyboardDismissMode": true,
"drawerBackgroundColor": {
"process": "[Function processColor]"
},
"statusBarBackgroundColor": {
"process": "[Function processColor]"
}
}
},
"unequal": []
}
```
Changelog: [Internal]
Reviewed By: JoshuaGross
Differential Revision: D33409393
fbshipit-source-id: 9fa5b6cd5c8fc9bc01d825eb8fb7965c5cb691d2
2022-01-11 00:24:41 -08:00
Pieter De Baets
78614de1cb
Revert D32559015: Support setting hitSlop with single value (JS changes)
...
Differential Revision:
D32559015 (https://github.com/facebook/react-native/commit/589b129581903a737a64e14eab3f2e29620831d5 )
Original commit changeset: c0409e6e5dd9
Original Phabricator Diff: D32559015 (https://github.com/facebook/react-native/commit/589b129581903a737a64e14eab3f2e29620831d5 )
fbshipit-source-id: 91cfcc86582c4716fc531a73bd8e06dea1406abd
2022-01-05 14:06:54 -08:00
Pieter De Baets
589b129581
Support setting hitSlop with single value (JS changes)
...
Summary:
JS changes to support D32138347 (https://github.com/facebook/react-native/commit/a96bdb7154b0d8c7f43977d8a583e8d2cbdcb795 )
Changelog: [Android][Fixed] Enable hitSlop to be set using a single number.
Reviewed By: yungsters
Differential Revision: D32559015
fbshipit-source-id: c0409e6e5dd95b35a2a4605b16cfb48104be2858
2022-01-04 10:39:43 -08:00
Andres Suarez
8bd3edec88
Update copyright headers from Facebook to Meta
...
Reviewed By: aaronabramov
Differential Revision: D33367752
fbshipit-source-id: 4ce94d184485e5ee0a62cf67ad2d3ba16e285c8f
2021-12-30 15:11:21 -08:00
Samuel Susla
8c6a98400e
Introduce TextInput.onChangeSync
...
Summary:
changelog: [internal]
Add experimental `TextInput.onChangeSync` which delivers onChange event synchronously.
Reviewed By: ShikaSD
Differential Revision: D33188083
fbshipit-source-id: 1e1dcd0d71c7eec98d3d5f69967659e07ac4e6a6
2021-12-30 06:38:50 -08:00