Summary:
Related to #22100
Turn on Flow strict mode for StaticContainer.react
This component needed proper Props type definition. I went through the only component (`TabBarItemIOS.ios`) using this to try to know the most appropriate props.
- All flow tests succeed.
[GENERAL] [ENHANCEMENT] [StaticContainer.react.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22121
Differential Revision: D12929646
Pulled By: TheSavior
fbshipit-source-id: 8826aa7bc83c854efdd71cdb4fba3d7ca98f2fce
Summary:
Related to #22100
Enhance Flow types for RefreshControl specifying `onRefresh` props type.
There are still 2 `any` left using `requireNativeComponent` that need to be addressed to turn Flow to strict mode.
I went through `RCTRefreshControl` and `AndroidSwipeRefreshLayout` classes to understand where this method came from.
- All flow tests succeed.
[GENERAL] [ENHANCEMENT] [RefreshControl.js] - Flow onRefresh type
Pull Request resolved: https://github.com/facebook/react-native/pull/22119
Differential Revision: D12919764
Pulled By: TheSavior
fbshipit-source-id: 9ba675be8dbce77d77972acb904fc13c68524831
Summary:
Related to #22100
Turn Flow strict mode on for ScrollViewMock.
This file used to declare jest var as `any` but jest module is already typed in root flow folder.
Note: I had to use a quick fix for polyfillPromise. See here #22101
- All flow tests succeed.
[GENERAL] [ENHANCEMENT] [ScrollViewMock.js] - Flow strict mode
Pull Request resolved: https://github.com/facebook/react-native/pull/22103
Differential Revision: D12918380
Pulled By: TheSavior
fbshipit-source-id: cd3aba47b1a43e76a7da09e15cc2d9cfcdf7f56d
Summary:
Related to #21581
This PR was already opened here https://github.com/facebook/react-native/pull/21600 but seems to be inactive.
Remove createReactClass from ProgressBarAndroidExample.
- `yarn run flow` && `yarn run flow-check-android` succeed.
- RNTester app ProgressBarAndroidExample on Android.
[GENERAL] [ENHANCEMENT] [ProgressBarAndroidExample.android.js] - rm createReactClass
Pull Request resolved: https://github.com/facebook/react-native/pull/21874
Reviewed By: TheSavior
Differential Revision: D12827689
Pulled By: RSNara
fbshipit-source-id: 46c70ea67dddf5d928fe936a28ef4a0a929d127f
Summary:
This PR converts the use of `NativeMethodsMixin` in `CheckBox.android.js`, and converts it to an ES6-style class.
Pull Request resolved: https://github.com/facebook/react-native/pull/21585
Reviewed By: TheSavior
Differential Revision: D12827768
Pulled By: RSNara
fbshipit-source-id: c113c221335e61e015a20bbb6bcff5f9837f9022
Summary:
Fixes lots of ESLint warnings. Many of them where in PR #20877 by janicduplessis which requested to split the linting fixes from configuration and package changes.
I solved only the issues that I was most certain about but I would love to get hands on all of them with a little bit of input.
Pull Request resolved: https://github.com/facebook/react-native/pull/22062
Differential Revision: D12889447
Pulled By: TheSavior
fbshipit-source-id: 35f7a08104a5b859c860afdde4af2b32c0685c50
Summary:
Adds the displayName prop to `View` and `Text` components. Because these now use `React.forwardRef`, they were showing as `Component` instead of their actual names.
Thanks to ljharb for helping to pinpoint the source of the issue!
Fixes#21937
Pull Request resolved: https://github.com/facebook/react-native/pull/21950
Differential Revision: D12827060
Pulled By: TheSavior
fbshipit-source-id: d812cae14d53ad821ab5873e737db63ad1a989e3
Summary: Currently the pull to refresh icon on browse feed is super cut off on Android. Expose the progressViewOffset prop from FBPullToRefresh to support offsetting the PTR component to make the component more visible.
Reviewed By: yungsters
Differential Revision: D10274679
fbshipit-source-id: 1735c4d2d98523ccc3d1ec3733465028ae33df7b
Summary:
This PR converts `ProgressViewIOS` from a `createReactClass` component to a functional component, and removes the remaining proptypes. Its use of `NativeMethodsMixin` has been ported to a `forwardRef` to the native component.
Pull Request resolved: https://github.com/facebook/react-native/pull/21588
Reviewed By: hramos
Differential Revision: D10338888
Pulled By: RSNara
fbshipit-source-id: c49807e97a0e2cf774971d9aa5a8426f15a3e48d
Summary: There are no longer any callsites to this in React Native so we can remove it from the repo!
Reviewed By: RSNara
Differential Revision: D10316313
fbshipit-source-id: bd63c823c56bb1914e4249d972e0ce503aa189f8
Summary:
Updated Button component inspiration. Refactored code takes advantage of Platform Specific Code, as we want to re-use as much code as possible.
1. Import Button component
2. Button should work the same
https://github.com/facebook/react-native/pull/19752
[GENERAL] [ENHANCEMENT] [Button] - Uses spread operator for platform specific code in creating styles
Pull Request resolved: https://github.com/facebook/react-native/pull/21535
Differential Revision: D10248048
Pulled By: TheSavior
fbshipit-source-id: 7260fa56f15b70b7c9499c8da418db7b2214b0dd
Summary:
Related to #21485.
Removed `TimerMixin` from the `TouchableWithoutFeedback` component since it is currently not used.
Added tests cases for `TouchableWithoutFeedback` to check for any runtime issues.
Pull Request resolved: https://github.com/facebook/react-native/pull/21493
Differential Revision: D10219098
Pulled By: RSNara
fbshipit-source-id: d9517b2bd5b72b0450fa864f3556673ae3181552
Summary:
This PR splits and renames all references of ViewAccessibility to DeprecatedViewAccessibility
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21422
Reviewed By: yungsters
Differential Revision: D10132659
Pulled By: RSNara
fbshipit-source-id: 68c371230c69ed37c3e44bf8a36043adb04afc78
Summary: Fixes the runtime value of `ReactNativeStyleAttributes` to correctly map to `true` instead of strings (as returned by `keyMirror`).
Reviewed By: TheSavior
Differential Revision: D10057235
fbshipit-source-id: dc855cff3a114761098ed5176b2e6e25412481dc
Summary:
related #21342
This is a first PR for this repo.
So, if there are any problem, please tell me 🙇
TODO
* delete props types
* apply read only interface
CheckList
- [x] `yarn prettier`
- [x] `yarn flow-check-android`
Pull Request resolved: https://github.com/facebook/react-native/pull/21347
Differential Revision: D10095503
Pulled By: TheSavior
fbshipit-source-id: fd1adb5edf19234ae8ae9f3fe732b03a521eb82b
Summary: Replaced each view manager access with a getViewManager() function call. This will later be used to lazily load view manager classes by allowing java to avoid sending the entire list of view managers to JS.
Reviewed By: QueryConnectionException
Differential Revision: D9695788
fbshipit-source-id: 949858aa2f0b0b00b68e260461ba8f1d085cf07f
Summary: D10013265 introduces flow types for `PanResponder`. This diff fixes the facebook-internal flow errors that surface as a result.
Reviewed By: TheSavior
Differential Revision: D10035046
fbshipit-source-id: fbba3d61e68851dda2da4f8e98238e0fdb35a27e
Summary:
There were approximately 350 unused suppressions in xplat/js when checking with .flowconfig.android
The flow team is partially responsible for this, since our release process hasn't changed since we added the flowconfig. In the diff beneath this one, I added the functionality necessary for us to not add any more unused suppressions. To test it, I made this diff. The steps were:
1. Start iOS server
2. Start android server
3. remove unused ios suppressions
4. remove unused android suppressions
5. add ios suppressions with site=react_native_ios_fb
6. add android suppressions with site=react_native_android_fb
7. remove unused ios suppressions. The ones that are unused are ones where an android comment was inserted as well, since the ios comment no longer is next to the error
8. add suppressions using ios flowconfig with site=react_native_fb
9. remove unused android suppressions. The unused ones are ones that were moved up when the cross-platform suppressions were inserted.
I'm going to make this into a script to make sure we don't contribute anymore unused suppressions from our side.
The controller you requested could not be found. nolint
Reviewed By: TheSavior
Differential Revision: D10053893
fbshipit-source-id: 7bee212062f8b2153c6ba906a30cf40df2224019
Summary:
related #21342
The `render` function, I was not able to specifically type since the props passed to it may vary. At the moment only `renderRow` function from ListView component is using StaticRenderer, and the type of the renderRow function is `Function`.
Let me know what your thoughts are on this. Thank you
Pull Request resolved: https://github.com/facebook/react-native/pull/21348
Differential Revision: D10084990
Pulled By: TheSavior
fbshipit-source-id: a87a8d4976c6ffaf83dc0fddc758869dbc2e2803
Summary:
This PR splits EdgeInsetsPropTypes into EdgeInsetsPropTypes with only flow types and DeprecatedEdgeInsetsPropTypes inside DeprecatedProptypes with only PropTypes.
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21351
Reviewed By: RSNara
Differential Revision: D10081512
Pulled By: TheSavior
fbshipit-source-id: 267a6fbb455e02dd7f2b0f3b59790e96387eaa09
Summary:
related #21342
This is a first PR for this repo.
So, if there are any problem, please tell me 🙇
TODO
* delete props types
* apply read only interface
CheckList
- [x] `yarn prettier`
- [x] `yarn flow-check-ios`
Pull Request resolved: https://github.com/facebook/react-native/pull/21346
Differential Revision: D10081962
Pulled By: TheSavior
fbshipit-source-id: 32387c58f180b9aa5f854e323a4bb29aa73f04c8
Summary:
This PR moves `DeprecatedViewPropTypes` to a new `DeprecatedViewProps` folder, and copies all documentation comments to the relevant Flow types file.
Pull Request resolved: https://github.com/facebook/react-native/pull/21349
Differential Revision: D10080802
Pulled By: TheSavior
fbshipit-source-id: af4881f3b12e8a1e675b849e0fcf0cc57a68e57f
Summary:
This PR is the result of running `yarn prettify` on the codebase - which caught a few files that were not prettified. This will make instructing people to run prettify a bit less complicated, since unrelated files will not show up in diffs.
Pull Request resolved: https://github.com/facebook/react-native/pull/21327
Differential Revision: D10046057
Pulled By: TheSavior
fbshipit-source-id: 2c771a3c758c72816c707e32ee2f4587e466f277