Summary:
This will allow us to catch cases where we use iOS 10-only APIs on iOS 9
Changelog: [Internal]
Reviewed By: TheSavior, mmmulani
Differential Revision: D18275225
fbshipit-source-id: dc9c515415208db40750be997173ce5bd6eb494f
Summary:
This implementation was replaced in January of 2018 by shergin. I believe everyone should have `RCTVirtualText` at this point, which should make this safe to remove.
Changelog:
[Internal][TextInput] Remove deprecated and unused legacyIOS implementation
Reviewed By: shergin
Differential Revision: D18296981
fbshipit-source-id: b5d5756e7bbc8141f1b826ab07c76a781ab03edc
Summary:
This if statement is older than June 2015. This prop is undocumented, not part of the flow type, not on our public docs, not in the flow type, not in typescript types, and I can't find any blog posts about it.
Changelog:
[Breaking][TextInput] Removing undocumented `inputView` prop. Use children instead.
Reviewed By: yungsters
Differential Revision: D18296894
fbshipit-source-id: 95373d24659e6f06e212095b57e8f6d713323c11
Summary:
We are moving away from `setNativeProps` in favour of commands API.
changelog: [internal]
Reviewed By: JoshuaGross
Differential Revision: D17765031
fbshipit-source-id: fcfe3fe68abb3e49e2dd7a102db598ade749acde
Summary:
Expands `TouchableWithoutFeedbackInjection` as `TouchableInjection` for use in testing out new implementations of all five `Touchable.Mixin` components.
Changelog:
[Internal]
Reviewed By: TheSavior
Differential Revision: D18278876
fbshipit-source-id: d511bdecefe38579f03a9d5ad52011f7cd71f4c0
Summary:
Adds some missing props to the type definition for `View`.
Also, changed some of the callbacks to return `mixed`. (Sometime in the near future, we should align on this for event callbacks.)
Changelog:
[Changed] Revised View Event Callback Types
Reviewed By: TheSavior
Differential Revision: D18278877
fbshipit-source-id: a36d5c1c9b9aed6718bd2abb024700a08a9deaeb
Summary:
In previous implementation, `setNativeProps` was called before `render`. These two methods can change value of `selectedIndex` and it matters in which order they arrive in native.
This was fine in Paper because 1st selectedIndex is set from `setNativeProps` with wrong value and then correct value comes from props.
However in Fabric, 1st selectedIndex comes from props (this is the correct one), and 2nd comes from command which has the incorrect value.
changelog: [internal]
Reviewed By: TheSavior
Differential Revision: D18240118
fbshipit-source-id: dca897306d3e858b9175b2f81356c76f5a0f79e2
Summary:
The `StatusBarManager` NativeModule does not have a uniform API on iOS and Android. In particular, the `setStyle` and the `setHidden` methods have an additional parameter on iOS:
```
/**
* - statusBarStyles can be:
* - 'default'
* - 'dark-content'
* - 'light-content'
*/
+setStyle: (statusBarStyle?: ?string, animated: boolean) => void;
/**
* - withAnimation can be: 'none' | 'fade' | 'slide'
*/
+setHidden: (hidden: boolean, withAnimation: string) => void;
```
If we keep the NativeModule spec the same between the two platforms, we'd have to keep the second parameter optional for both methods. This works for `setHidden`, because the second parameter is a string, and optional strings are allowed. However, for `setStyle`, the second parameter is a number, and we don't support optional numbers/booleans on Android in the NativeModule system. If we keep the optional number, then the following check triggers in our RedBox tests on iOS, which makes them fail: https://fburl.com/diffusion/b7adezd9.
So, since the two specs are sufficiently different, I figured that the easiest path forward is to split them apart.
Changelog:
[iOS][Changed] - Separated NativeStatusBarManager into NativeStatusBarManager{IOS,Android}
Reviewed By: PeteTheHeat
Differential Revision: D18214161
fbshipit-source-id: 6fd8b8c5f576244b5b90ee47faa7f50508c5e1d3
Summary:
With tvOS (Apple TV) now residing in a separately maintained fork, this removes the residual props from React Native. This only includes the JavaScript changes. The Objective-C changes will come later.
Specifically, the following props have been removed:
- `isTVSelectable`
- `tvParallaxProperties`
- `tvParallaxShiftDistanceX`
- `tvParallaxShiftDistanceY`
- `tvParallaxTiltAngle`
- `tvParallaxMagnification`
Note that `hasTVPreferredFocus` is still being used by Android TV, so it remains.
Changelog:
[Removed] Apple TV View Props
Reviewed By: TheSavior
Differential Revision: D18266278
fbshipit-source-id: 9d1448bf2f434a74e6eb23c70d3a37971e406768
Summary:
Exports these events in a canonical manner so that they can be used in future refactors.
Changelog:
[Internal]
Reviewed By: TheSavior
Differential Revision: D18257693
fbshipit-source-id: aac40277df8a88224c8df29caa04ffc9a6db0a22
Summary:
I've been working on a new iOS experience with lots of text inputs and this has been driving me a bit nuts…
If you're in a scrollview with `keyboardShouldPersistTaps="handled"` and you tab through your text-inputs, you aren't able to tap outside of a given text-input to blur it (and dismiss the keyboard).
I wrote up a quick explanation and some repo steps here: https://snack.expo.io/BJBcKgrqB
The patch i came up with, after poking around for a little bit seems terrifying - so almost certainly not it. But if it's helpful at all - decided to just got ahead and submit it.
## Changelog
[iOS] [Fixed] - TextInput blur when tabbing in iOS simulator.
Pull Request resolved: https://github.com/facebook/react-native/pull/27038
Test Plan:
I tried to think of a way to test this in jest… but i didn't get very far sorry 😢
I did create a snack here so you can demo the issue: https://snack.expo.io/BJBcKgrqB
I also created two videos…
**Here's the text input not working when i try to blur it after tabbing in simulator**
![ezgif-1-dc85b405c760](https://user-images.githubusercontent.com/169705/67726290-8e5d2d00-f9a2-11e9-98c9-29c0b0bb25b9.gif)
**Here's it working after I applied this patch**
![ezgif-1-ed9f6b19653d](https://user-images.githubusercontent.com/169705/67726309-97e69500-f9a2-11e9-9992-c2a79d0bd408.gif)
Thanks!
Differential Revision: D18262867
Pulled By: TheSavior
fbshipit-source-id: 4087f3a27a7e6a146f7f84d7c6e9e8e2b6adc75d
Summary:
Fabric doesn't support setNativeProps, so we are using view commands instead.
Changelog: [Internal]
Reviewed By: JoshuaGross, TheSavior
Differential Revision: D17736672
fbshipit-source-id: bb0eee9330c01751829172bbc03bfd12b1e24cad
Summary:
Changelog: [Internal] Convert scrollTo, scrollToEnd, flashScrollIndicators to use native commands
This was reverted because of a circular dependency that was found in AMA. See D18065033 for fixing the circular dependency
Reviewed By: TheSavior
Differential Revision: D18063703
fbshipit-source-id: 7bd0125833f4f9e9e2f227732af0d6e38f009c06
Summary:
Revert D17983169 since it causes instant crash on AMA
Changelog: [Internal] Revert D17983169
Differential Revision: D18054783
fbshipit-source-id: 2b0957ee266dc034336eb157a5a343d051563389
Summary:
Creates `TouchableWithoutFeedback.unstable_Experiment` for use to experiment with alternate implementations.
Changelog:
[Internal]
Reviewed By: TheSavior
Differential Revision: D18027430
fbshipit-source-id: 74b90da3398618dced2279cdbad8e05dafdc1919
Summary:
Cleans up the Flow types for `TouchableWithoutFeedback`.
This required converting `TVEventHandler` into a class so that Flow understands it is a instantiable type.
Changelog:
[Internal]
Reviewed By: TheSavior
Differential Revision: D18029290
fbshipit-source-id: 7855f3286020c1a1fe8b72c0303cd6b0b3389fd2
Summary:
`accessibilityRole` communicates the purpose of a component to the user of assistive technology. It needs to have the correct value for it to be fully utilized.
Switch component has `accessibilityRole` of a `button` instead of `switch` on default. Change the component default role to `switch`.
## Changelog
[General] [Fixed] - Change default `accessibilityRole` of Switch component from `button` to `switch`
Pull Request resolved: https://github.com/facebook/react-native/pull/26899
Test Plan:
- All unit test passed
- On Switch component, it's supposed to have `switch` like element type on both platform. (`XCUIElementTypeSwitch` on iOS)
fix [https://github.com/facebook/react-native/issues/26873](https://github.com/facebook/react-native/issues/26873)
Reviewed By: yungsters
Differential Revision: D18002755
Pulled By: mdvacca
fbshipit-source-id: 60446f94b23f8355f954805fb4dc08c89d08e492
Summary:
The forwardRef calls were able to be cleaned up and consolidated a bit.
Changelog:
[Changed][SafeAreaView] Improved SafeAreaView's typing, removing extra underscore from display name
Reviewed By: cpojer
Differential Revision: D17881901
fbshipit-source-id: 00f876d34600f4cfd44075eb7ad7192c9a885907
Summary:
`ReactNative.js` as a side effect registers `RCTEventEmitter`, this is required in Fabric's `RCTScrollViewComponentView`.
Here we force ReactNative.js side effect.
This is needed as a temporary workaround so we can invoke events on `RCTEventEmitter` (old architecture) from `RCTScrollViewComponentView` (new architecture)
Changelog: [Internal]
Reviewed By: yungsters
Differential Revision: D17931469
fbshipit-source-id: 3efa453ba199bb1685403201ad444238750a3d14
Summary:
This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()
Previously landed and unladed: D16543433
Changelog: This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()
Reviewed By: makovkastar
Differential Revision: D17926309
fbshipit-source-id: ff7e318a4d720e489cbfe60e8d72ebb749c11c18
Summary:
The component RCTRefreshControl was renamed to PullToRefreshView (for Paper). Now only old Objective-C class names have the old name, which is okay.
Changelog: [Internal] [Changed] - The internal name of PullToRefresh component was changed from `RCTRefreshControl` to `PullToRefreshView` (No public API changes)
Reviewed By: rickhanlonii
Differential Revision: D17456225
fbshipit-source-id: a8db99ddd507377d8c98b26707a3b9fae483d20c
Summary:
We are going to need to change some of these APIs to use refs instead of findNodeHandle. I figured I'd start by adding some tests
Changelog:
[Internal] Adding tests for TextInput
Reviewed By: yungsters
Differential Revision: D17892806
fbshipit-source-id: f59ff99fa4d064239f171acb64a8441e07bb71c1
Summary:
These were being cast to a NativeComponent but that is no longer accurate. `requireNativeComponent` returns the type of `HostComponent` now which is more accurate. We don't need the cast through `any` anymore.
In order to know that I found all the callsites, I ran this command to find these:
```
grep -r "requireNativeComponent" react-native-github -C 5 | grep 'any'
```
Changelog:
[Internal]
Reviewed By: cpojer
Differential Revision: D17864165
fbshipit-source-id: 3774d6d47d7bb0d885cc1a1352f81fec7d3bca0d
Summary:
Deletes the `selectionState` prop from `TextInput`.
It does not provide meaningful value over `onBlur`, `onFocus`, and `selectionState`.
Changelog:
[Breaking][TextInput] Removing `selectionState` prop, use `onBlur`, `onFocus`, and `onUpdate` instead.
Reviewed By: zackargyle, TheSavior
Differential Revision: D17879667
fbshipit-source-id: 03a4e239406932adad898d6d2a092e3bc2e6b064
Summary: These types were wrong, this is a HostComponent, not a ReactNative.NativeComponent
Reviewed By: lunaleaps
Differential Revision: D17862305
fbshipit-source-id: e1e7acc7a5892f124b07cdc39d73d6ce7d414063
Summary: The instance type wasn't being set properly. Using AbstractComponent
Reviewed By: lunaleaps
Differential Revision: D17859988
fbshipit-source-id: 95e2098a7218afeaf3f6ee39ba2b69170ee2f54c
Summary: These need to be both optional and nullable to support spreading props like `<ScrollView {...props} />` where these types are optional in a parent component.
Reviewed By: lunaleaps
Differential Revision: D17859633
fbshipit-source-id: 093456d13ee041473a4605e62bf48b3510b49b8f
Summary: These are already defined as part of ViewProps. They don't need to be duplicated
Reviewed By: lunaleaps
Differential Revision: D17859553
fbshipit-source-id: c3de534526efd94c0a9ff2c772a4d92c6164815b
Summary: Reverts D14176217 so we can do the partial React sync in the next diff which removes this API
Reviewed By: TheSavior
Differential Revision: D17828977
fbshipit-source-id: 7dd98c19890aeee0a153746ce65fd3b148b4ca7b
Summary:
If you passed
```
contentInset: { bottom: 10 }
```
then it wouldn't go into the if case and it could try to call `setOffset` with `undefined`. `setOffset` requires a number.
Changelog:
[Fix][ScrollView] ScrollView contentInset top now defaults to 0 in expected situations
Reviewed By: JoshuaGross
Differential Revision: D17796155
fbshipit-source-id: 951dbbb0de1052f64a6835963e8bbc564990c120
Summary:
This function doesn't exist on the scroll responder so this prop is being set to undefined.
As this is an event, not setting the prop just means that nothing will listen to the event.
Changelog:
[Internal]
Reviewed By: JoshuaGross
Differential Revision: D17795678
fbshipit-source-id: 73f2c125e0868e19258b43e3a053447be3f5e768
Summary: Props are being ignored on native side, let's get rid of them.
Reviewed By: TheSavior
Differential Revision: D17765185
fbshipit-source-id: d3625dd25d2e41a49e701d54fe9a7b74cd47786c
Summary: Fabric doesn't support setNativeProps, so we have to use commands instead to set the value of the native component.
Reviewed By: JoshuaGross
Differential Revision: D17736274
fbshipit-source-id: 18c47365926c3c2cfc3551f4b5b6cc72e4162367
Summary:
In this diff we integrate the Switch component on Android in Fabric. Since the component has a custom measure function, we need to write some C++ to call the measure method in Java.
The component isn't fully functional yet (setNativeProps isn't supported in Fabric) and has some problems with measuring itself. I will fix the component in the next diffs in this stack.
Reviewed By: JoshuaGross
Differential Revision: D17571258
fbshipit-source-id: be4e201495b9b197ddec44ee3484357bfb6225a8
Summary:
We are seeing these errors in prod:
```
TypeError: Cannot read property '_nativeTag' of null
at
ReactNativeFiberHostComponent.prototype.measureLayout(ReactNativeRenderer-prod.fb.js:1594)
ScrollResponderMixin.scrollResponderScrollNativeHandleToKeyboard(ScrollResponder.js:557)
```
This error is coming from these lines: 69c38e5a63/Libraries/Components/ScrollResponder.js (L563-L567)
Either `nodeHandle` is null or `this.getInnerViewRef()`. If `nodeHandle` was null, we'd get an error that we can't call `measureLayout` on null. So `this.getInnerViewRef()` must be null.
In the React Native Renderer this error of `_nativeTag of null` is coming from this line: db8afe4f63/packages/react-native-renderer/src/ReactNativeFiberHostComponent.js (L84)
Which means indeed `this.getInnerViewRef()` is null.
So adding a null check here which is what we do at all the other product callsites of `measureLayout`. Flow should have caught this, but because ScrollView is one of the only components left using mixins (ScrollResponder), `this.getInnerViewRef` is typed as `any` instead of what it should be:
```
?React.ElementRef<Class<ReactNative.NativeComponent<mixed>>>
```
If `scrollResponder` was typed correctly then Flow would have caught this.
Changelog:
[Fixed] Exception in scrollResponderScrollNativeHandleToKeyboard when ref is null
Reviewed By: mmmulani
Differential Revision: D17717150
fbshipit-source-id: d7bc4c897ad259fb588e8100f37ccfb8a5d07874
Summary:
The stack of D17563110 was reverted because it triggered a failing OTA job that wasn't caught at land time.
Fixing the issue by reverting the change to `Route.js` and re-landing the rest of the diff.
Differential Revision: D17564219
fbshipit-source-id: 166b50a163ce8ae226de224882a98c40652e29ac
Summary:
We need to migrate to HostComponent instead of the exported type from codegenNativeComponent which is the same type
Changelog:
[Internal] Migrate NativeComponentType from codegenNativeComponent to HostComponent
Reviewed By: rickhanlonii
Differential Revision: D17563307
fbshipit-source-id: 01c8fea8c67b33bed42ae28ffb8c132be87b9a7a
Summary:
We need to migrate to HostComponent, this is the first batch.
Changelog:
[Internal] Migrate NativeComponentType from codegenNativeComponent to HostComponent
Reviewed By: rickhanlonii
Differential Revision: D17562879
fbshipit-source-id: ce1993b64a79cede3598c89ddff0dadf07fde92f
Summary:
In React Native there are three types of "Native" components.
```
createReactClass with NativeMethodsMixin
```
```
class MyComponent extends ReactNative.NativeComponent
```
```
requireNativeComponent('RCTView')
```
The implementation for how to handle all three of these exists in the React Native Renderer. Refs attached to components created via these methods provide a set of functions such as
```
.measure
.measureInWindow
.measureLayout
.setNativeProps
```
These methods have been used for our core components in the repo to provide a consistent API. Many of the APIs in React Native require a `reactTag` to a host component. This is acquired by calling `findNodeHandle` with any component. `findNodeHandle` works with the first two approaches.
For a lot of our new Fabric APIs, we will require passing a ref to a HostComponent directly instead of relying on `findNodeHandle` to tunnel through the component tree as that behavior isn't safe with React concurrent mode.
The goal of this change is to enable us to differentiate between components created with `requireNativeComponent` and the other types. This will be needed to be able to safely type the new APIs.
For existing components that should support being a host component but need to use some JS behavior in a wrapper, they should use `forwardRef`. The majority of React Native's core components were migrated to use `forwardRef` last year. Components that can't use forwardRef will need to have a method like `getNativeRef()` to get access to the underlying host component ref.
Note, we will need follow up changes as well as changes to the React Renderer in the React repo to fully utilize this new type.
Changelog:
[Internal] Flow type to differentiate between HostComponent and NativeMethodsMixin and NativeComponent
Reviewed By: jbrown215
Differential Revision: D17551089
fbshipit-source-id: 7a30b4bb4323156c0b2465ca41fcd05f4315becf
Summary:
These types aren't robust to changes in the React component type. When we refactor requireNativeComponent these will error. This change is forwards compatible.
Changelog:
[Internal] Improve internal type in DrawerLayoutAndroid
Reviewed By: JoshuaGross
Differential Revision: D17561194
fbshipit-source-id: 470289449b4d5b3148692f1945fb720e1e3972eb
Summary:
Due to an update to react-native on the android tv platform tapping the select button on a remote calls the onPress prop twice for `TouchableHighlight`, `TouchableOpacity`, and `TouchableWithoutFeedback`. This is happening because touchableHandlePress gets called from two places. First from the onClick prop in the touchable component and second from the TVEventHandler in the TouchableMixin.
## Changelog
[Android] [Fixed] - Adds a not android check to the select case of the TVEventHandler callback in the TouchableMixin.
Pull Request resolved: https://github.com/facebook/react-native/pull/26474
Test Plan:
Confirmed on Android Tv and Apple Tv
1) Add a TouchableOpacity to a screen with an onPress callback
2) Run app
3) Focus the TouchableOpacity
4) Press the Select Button on the Remote
**Expected Results**
onPress is called once
Differential Revision: D17530170
Pulled By: TheSavior
fbshipit-source-id: b776faba477c6231ad296abd21f072335dca5556
Summary: This diff migrates `ReactSwtichManager` to use the generated `ReactSwtichManagerDelegate` for setting its properties.
Reviewed By: TheSavior
Differential Revision: D17395067
fbshipit-source-id: 1489c5d08cef860030ecbd23ef19bd8de1328d71
Summary: This diff migrates `ReactDrawerLayoutManager` to use the generated `AndroidDrawerLayoutManagerDelegate` for setting its properties.
Reviewed By: mdvacca
Differential Revision: D17343383
fbshipit-source-id: 85cd7ee3531b152da2601048f5e458f5dad73ad6
Summary: This diff migrates `ReactProgressBarViewManager` to use the generated `AndroidProgressBarManagerDelegate` for setting its properties.
Reviewed By: JoshuaGross, mdvacca
Differential Revision: D17315619
fbshipit-source-id: 6293c6fc18567a934b6f3dce9b77abcc408052d8
Summary: This diff migrates `SwipeRefreshLayoutManager` to use the generated `AndroidSwipeRefreshLayoutManagerDelegate`.
Reviewed By: JoshuaGross, mdvacca
Differential Revision: D17225894
fbshipit-source-id: e659d2a9cb5dba42c589559f61a0e98330e21612
Summary: This diff migrates `ReactSliderManager` to use the generated `SliderManagerDelegate` for setting its properties.
Reviewed By: mdvacca
Differential Revision: D17203078
fbshipit-source-id: 726736ef275074ecb799b334342ac64976153e2b
Summary:
We used to generate the documentation for the website but moved the docs to another repo.
There is some work on the docs to be able to ingest info from this repo in order to go back to generating API information. The current thinking is we will generate this JSON file and the website repo will pull it in to generate the docs.
I plan to make the script run on CI and fail if the generated file isn't updated, in a follow up PR.
Reviewed By: zackargyle
Differential Revision: D17183936
fbshipit-source-id: 99ce3fa5d7becc0ef20df5d439b175eedbe546f3
Summary:
We need to get rid of findNodeHandle calls so migrating scrollResponderScrollNativeHandleToKeyboard to take a ref to a host component.
I made this change with Flow, and tested by rendering UserJobApplicationForm
Reviewed By: mdvacca
Differential Revision: D17099280
fbshipit-source-id: 96af692006aace2c206f268f5416984b00f8a438
Summary:
In Windows, if you clicked on a Switch component to toggle it, you could see it "shimmy" back and forth once before settling. The native Switch ends up toggling three times every time it's invoked.
`Switch.js` prevents the native switch from toggling to the new value by explicitly setting the switch to `this.props.value` when it receives an `onChange` event. The re-setting of the value wasn't fast enough to prevent the `Switch` from starting to toggle, causing the visual shimmy.
The solution is taken from `TextInput`. `TextInput.js` stores `_lastNativeText` when it receives an `onChange` event. In `componentDidUpdate`, it puts `this.props.text` back on the native textbox if the value of `this.props.text` isn't the same as `_lastNativeText`, which is how it ensures that it is a controlled component. Porting this to the `Switch` results in only one toggle happening per invoke, removing the shimmy, while preserving the controlled component behavior.
This bug is not visible on Android or iOS, only Windows, however the code causing the bug was in `Switch.js` and it seems reasonable to avoid changing the value of the native switch excessively.
## Changelog
[General] [Fixed] - Fix excessive toggles on the Switch component
Pull Request resolved: https://github.com/facebook/react-native/pull/26496
Test Plan: Used RNTester on Android and iOS to test the Switch component and made sure that all scenarios behave as expected visually. Also ensured through the debugger that the value of the native switch is only being changed once, instead of three times.
Reviewed By: TheSavior
Differential Revision: D17468905
Pulled By: JoshuaGross
fbshipit-source-id: 92bf511510306968c3573ee4eed6df009850fd77
Summary: This was already deprecated, but without a message.
Reviewed By: zackargyle, ejanzer
Differential Revision: D17180347
fbshipit-source-id: 44aa5d1821e56f7600033e82062c4661fe663471
Summary:
React Native components need a mechanism to specify their value to assistive technologies. This PR adds the notion of accessibilityValueDescription-- a property which either contains a textual description of a component's value, or for range-based components, such as sliders and progress bars, it contains range information (minimum, current, and maximum).
On iOS, the range-based info if present is converted into a percentage and added to the accessibilityValue property of the UIView. If text is present as part of the accessibilityValueDescription, it is used instead of the range-based information.
On Android, any range-based information in accessibilityValueDescription is exposed in the AccessibilityNodeInfo's RangeInfo. Text which is part of accessibilityValueDescription is appended to the content description.
## Changelog
[GENERAL] [Change] - add accessibilityValuedescription property.
Pull Request resolved: https://github.com/facebook/react-native/pull/26169
Test Plan: Added two new accessibility examples to RNTester, one which uses text and another which uses range-based info in accessibilityValueDescription. Verified that they both behave correctly on both Android and iOS.
Differential Revision: D17444730
Pulled By: cpojer
fbshipit-source-id: 1fb3252a90f88f7cafe1cbf7db08c03f14cc2321
Summary: This function was deprecated in Dec 2016. It has no callsites at FB and should be deleted.
Reviewed By: zackargyle, ejanzer
Differential Revision: D17180174
fbshipit-source-id: de3ab78c469220b629ef7f6773d60507959f6db6
Summary:
This pull request makes properties of events' Flow types in `AndroidTextInputNativeComponent` be `$ReadOnly`.
This will make them more compatible with the callback types in `TextInput`.
## Changelog
[Internal] [Changed] - Made properties of events' Flow types in `AndroidTextInputNativeComponent` readonly
Pull Request resolved: https://github.com/facebook/react-native/pull/26469
Test Plan:
`yarn flow-check-ios` and `yarn flow-check-android` both pass.
No regressions to running `scripts/generate-rncore.sh` have been noted.
Differential Revision: D17435579
Pulled By: TheSavior
fbshipit-source-id: 92e6c0623c4dd3fe06ebfb22dc73916bf5917bcc
Summary: It looks like codegen supports string enums as long as defaults are provided. Uncommenting the enums and removing TODOs.
Reviewed By: rickhanlonii
Differential Revision: D17196139
fbshipit-source-id: a076b1a25eb38b23cfd53fd92e8c42f121d08d6b
Summary:
This diff replaces the usage of UIManagerModule.playTouchSound() in Pressability and Touchable for the SoundManager.playTouchSound()
Previously landed and unladed: D16543433
Reviewed By: rickhanlonii, JoshuaGross
Differential Revision: D17170140
fbshipit-source-id: 33a8ca508ec31f034c76fb0ac4107150d43c608b
Summary:
We added the accessibilityState property as a more semantically rich way for components to describe information about their state to accessibility services. This PR removes the old accessibilityStates property.
<!-- Explain the **motivation** for making this change. What existing problem does the pull request solve? -->
## Changelog
[General] [Change] - Remove accessibilityStates property.
Pull Request resolved: https://github.com/facebook/react-native/pull/26168
Test Plan: Ensure that RNTester accessibility examples function properly on both iOS and Android.
Differential Revision: D17152891
Pulled By: cpojer
fbshipit-source-id: d71d3cf0f2e0846979d2ba104b6c69e4e5725252
Summary: Flow type for AndroidTextInput. This could theoretically be used for the interface codegen in the future, and I did use this to codegen the scaffolding for AndroidTextInput (see previous diffs).
Reviewed By: mdvacca
Differential Revision: D16926831
fbshipit-source-id: d01c2e041efb4151f6091dd0fea191989d133881
Summary: FlatList and VirtualizedList were typing this value as any instead of using the actual type from ScrollView. I started with that change and then fixed the type to solve the other callsites in the codebase.
Reviewed By: zackargyle
Differential Revision: D17089934
fbshipit-source-id: bfc22cec9993904d779cad37b1de7cb3c0484d2c
Summary:
Reverting D16909622 and D16909622 due to T53098065. This change made TouchableNativeFeedback a bit less resilient to non native components being passed as the child. We probably need to handle this migration a little bit safer.
Original commit changeset: 902528623742
Differential Revision: D17096765
fbshipit-source-id: e3fc1a21504459b6d7ea5442c4bc926bbd77379d
Summary: Convert this to a UIManager command
Reviewed By: TheSavior
Differential Revision: D16973257
fbshipit-source-id: 0e129c17926229fc20d020e3c0e52a36b0b405d2
Summary:
After some thought, we decided we don't need the flexibility of
separate horizontal and vertical props - it would be much nicer
to just have a single prop for the edge length and then the native
code can enable the booleans as appropriate.
Original PR: https://github.com/facebook/react-native/pull/26163
Original commit changeset: f72a9a890d90
Reviewed By: TheSavior
Differential Revision: D16997468
fbshipit-source-id: 7973262287a7ec2cee5957f8dc1806a0f28c1432
Summary:
Move RCTAccessibilityManager to CoreModules (since that's the only dir that supports TM).
Fixup some variable names to match spec.
Reviewed By: RSNara
Differential Revision: D16861739
fbshipit-source-id: a0a53b221dcc172979d1f2c83851ab92e23f2333
Summary:
Instead of dispatching the command with findNodeHandle and the UIManager, go through the new API. This is safe because codegenNativeCommands can work at runtime as well as with the babel transform.
Changelog:
[Internal]
Reviewed By: rickhanlonii
Differential Revision: D16909599
fbshipit-source-id: 90252862374290dbeb7202483fa585b6a7051c12
Summary:
The types we were using before weren't very strict and it had been on my list to fix this. I *think* this is the right type. With Flow's type first project having these exported types will be necessary anyways so we can just use that for the ref.
Changelog:
[Internal]
Reviewed By: JoshuaGross
Differential Revision: D16930573
fbshipit-source-id: 05c1e097794633a2cefa7384c9d81ab15a63d8af
Summary: Explicitly define the types of the getters in `react-native-implementation` so we can enable Flow's types-first mode for that file.
Reviewed By: cpojer
Differential Revision: D16937607
fbshipit-source-id: 2e4cf483043a53c5407254ffa2b3211d40211019
Summary: `ProgressBarAndroid` exported the wrong type and Flow wasn't catching some issues with it because they were hidden by a `$FlowFixMe` annotation. This exports the right type and fixes the bad usages.
Differential Revision: D16938853
fbshipit-source-id: 7ea4bbf379a010a76dc68ccb405e1f890d7e590a
Summary: Include AndroidTextInputNativeComponent so we can rely on codegen and flow typing in a future diff.
Reviewed By: TheSavior
Differential Revision: D16903634
fbshipit-source-id: 767d7c854533d641eb7fcb2147bf584621581411
Summary: This error is not actionable or valuable right now.
Reviewed By: cpojer
Differential Revision: D16859423
fbshipit-source-id: b25504a9556b4d3102b35b2bffcd2d01566e0399
Summary:
This pull request moves `Text`'s prop types to the `DeprecatedPropTypes` folder.
This was already partly in progress - there were redundant `TextPropTypes` and `DeprecatedTextPropTypes` files so I removed one, and made sure the version with the doc strings was the one used.
## Changelog
[General] [Deprecated] - Move `Text` component's proptypes to DeprecatedPropTypes
Pull Request resolved: https://github.com/facebook/react-native/pull/26055
Test Plan: Flow checks pass for iOS and Android
Differential Revision: D16801078
Pulled By: TheSavior
fbshipit-source-id: ef19300945d48d0a4a83d728ee32cdf7d1c0f0cc