Summary: Many of the optional types from the PR could have been made non-optional. I just made the change because it was simple enough to make and verify.
Reviewed By: TheSavior
Differential Revision: D10131969
fbshipit-source-id: b84693b5549708d7948fe3fd54295bc80be93790
Summary:
Currently, loading SO libraries is pretty expensive. While they are triggered due to accessing `ReadableNativeArray`. However, with preloader experiments, this block seems to move around and is loaded when the first dependent class loads it.
Also, as a part of D10108380, this will be moved again.
Adding a trace to keep track of where it moves.
Reviewed By: achen1
Differential Revision: D9890280
fbshipit-source-id: 4b331ef1d7e824935bf3708442537349d2d631d0
Summary:
This PR fixes an obscure rendering bug on iOS for borders with asymmetric radii. It appears to be a problem with the custom drawing that React Native performs when it cannot use native UIKit/CoreAnimation border drawing.
Pull Request resolved: https://github.com/facebook/react-native/pull/21208
Differential Revision: D10130120
Pulled By: hramos
fbshipit-source-id: d9fbc5c622c060db15658d038a068216b47bb26d
Summary: This change implements `onLayoutOnly` for regular bare <View> component (*not* for its descendants!) After this view flattening is actually starting working for all platforms.
Reviewed By: mdvacca
Differential Revision: D9511001
fbshipit-source-id: 3562dd1b7570a064150f100cc2e1bc4220b81290
Summary:
Thank you for sending the PR! We appreciate you spending the time to work on these changes.
Help us understand your motivation by explaining why you decided to make this change.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
_Pull requests that expand test coverage are more likely to get reviewed. Add a test case whenever possible!_
Pull Request resolved: https://github.com/facebook/react-native/pull/21396
Differential Revision: D10119630
Pulled By: RSNara
fbshipit-source-id: d0fe193eee976b9b18a2eb467b5f3af48bd7d2de
Summary: Upgrades all dependents of `fbjs` to the latest version.
Reviewed By: mjesun
Differential Revision: D10100661
fbshipit-source-id: 2e2af616cb2b5eab560872b6c6c60ed264e986b2
Summary:
Update several files to use the proper copyright header:
```
// Copyright (c) Facebook, Inc. and its affiliates.
//
// This source code is licensed under the MIT license found in the
// LICENSE file in the root directory of this source tree.
```
In the case of Xcode project files, I used the shortform version, `Copyright (c) Facebook, Inc. and its affiliates.`
Reviewed By: axe-fb
Differential Revision: D10114529
fbshipit-source-id: a1f2d5a46d04797c1cf281ea9ab80d3a2caa6fb4
Summary:
This fixes cookie missing bug on Android 5.0 and above.
On Android 5.0 and above, after the app successfully obtains the cookie, you kills the App within 30 seconds and restarts the App. It accesses the interface that needs to carry the cookie and finds that the cookie does not exist.
Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior.
Updated tests for the addCookies function to include test cases specifying Android version, and tested on the command line in my app to make sure it has the expected behavior.
[ANDROID] [BUGFIX] [Cookie] - Fix cookies lost on Android 5.0 and above
Pull Request resolved: https://github.com/facebook/react-native/pull/19770
Differential Revision: D10114102
Pulled By: hramos
fbshipit-source-id: 5b4766f02f70541fd46ac5db36f1179fe386ac7a
Summary:
Fixes our top crash when framework try drop a view from parent, but it's a null (already removed etc.).
Fixes#20288
Pull Request resolved: https://github.com/facebook/react-native/pull/20465
Differential Revision: D10113976
Pulled By: hramos
fbshipit-source-id: 34f5654f3bdbc63eb7f7d0b5c94885576fc3cdcd
Summary:
... instead of using direction access to `ygNode.getLayout()` object.
Suddenly, YGLayout object that YGNode exposes contains unresolved/directional-unaware styles. To get resolved directional-aware styles we have to use functions from Yoga.h.
I am not happy with this solution, I will try to implement something like `ygNode.getResolvedLayout()` and use that instead.
This change fixes strange missing horizontal padding around some views.
Reviewed By: mdvacca
Differential Revision: D10112049
fbshipit-source-id: 4b6ef39d8dd34e78a4592962e8af4eeaa5028768
Summary:
update creation logic for text shadow: allow shadows with zero offset when the radius is nonzero
(?should we also add a check to drop the node as a no-op when color.alpha == 0 ?)
Reviewed By: yungsters
Differential Revision: D10017778
fbshipit-source-id: 0168ac6db5ad22a5d7eb32dcd184aede361d6651
Summary: That should save us some app size kilobytes.
Reviewed By: mdvacca
Differential Revision: D10081499
fbshipit-source-id: 2b950768c609b412f9be332c22b6b1e96657e5ea
Summary:
This change adds getter for overflow attribute in ReactViewGroup class. Overflow setting can affect how view children are drawn but also how hit testing behaves when receiving touch. Exposing this setting makes it possible for gesture-handler library to implement proper hit testing that takes into account overflow property of a view.
Pull Request resolved: https://github.com/facebook/react-native/pull/21398
Differential Revision: D10105398
Pulled By: shergin
fbshipit-source-id: 15ae2b31be3bf80e7e1d28b87ce4474af0f486f5
Summary: UIAnimationDragCoefficient is 10.0 in tests for some reason, but we need it to be 1.0 for our tests.
Reviewed By: PeteTheHeat
Differential Revision: D10096375
fbshipit-source-id: 9acd042a3d87a9c6a253745fe48145f0442f6567
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:
Removes the prop types from `LayoutAnimation` and refines the Flow types.
This also disables `LayoutAnimation.checkConfig` with a `console.error`.
Reviewed By: bvaughn
Differential Revision: D10057234
fbshipit-source-id: a386f3d7dd5deafa1d4681d1f49821821fda9a6a
Summary:
Replaces `ImageResizeMode` with a Flow type.
JavaScript enums provide little value when you have a type system.
Reviewed By: bvaughn, TheSavior
Differential Revision: D10057237
fbshipit-source-id: f108b60795a6d82a6786421e4ac72aeedc53bee8
Summary:
Part of: https://github.com/facebook/react-native/issues/21342
This PR removes the prop types for the components `SwipeableFlatList` and `SwipeableQuickActions`.
The props for `SwipeableFlatList` have been left as not $ReadOnly, because it needs the types in `Libraries/Lists/*` to also be cleaned up. A todo notice has been added.
Pull Request resolved: https://github.com/facebook/react-native/pull/21384
Differential Revision: D10099694
Pulled By: TheSavior
fbshipit-source-id: 424b900942c9a7889b664f351f79abee55923430
Summary:
This PR moves and renames all references of StyleSheetPropType to DeprecatedStyleSheetPropType
Related to #21342
Pull Request resolved: https://github.com/facebook/react-native/pull/21380
Differential Revision: D10098216
Pulled By: TheSavior
fbshipit-source-id: da8d927f87bd37cdabc315e0aa17b6ae208f7124
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:
We are currently iterating through each view manager to get its class name to pass to JS. JS uses this list to define lazy property accesses for each view manager to grab the constants synchronously. This results in each view manager's class loading immediately -- causing a small perf hit.
Let's avoid this view managers list entirely. JS is able to access each view manager directly by calling getConstantsForViewManager(name)
Reviewed By: TheSavior
Differential Revision: D9930713
fbshipit-source-id: 4aa013f8398d4f51b7eef07937d2977ba1950726
Summary: Similar to ComponentsConfiguration used by Litho. Allows us to abtest without having to pipe everything through ReactInstanceManager
Reviewed By: axe-fb
Differential Revision: D9930707
fbshipit-source-id: 43edf7d8fa2bab7b7888df57ea1bec2b4726f51b
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:
This PR removes the remaining proptypes from `SwipeableListView`, and cleans up its flow types a bit. Its RNTester example has also been cleaned up, and turned into an ES6 class.
`ListView`'s props have been exported so this can use it.
Pull Request resolved: https://github.com/facebook/react-native/pull/21298
Reviewed By: TheSavior
Differential Revision: D10085505
Pulled By: RSNara
fbshipit-source-id: 20300d582f33b83dfc13cc5ddc71de5ab44bb90b
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:
This PR adds flow types to the `PanResponder` module. It is part of my effort to flowtype the `Swipable*` classes.
A new `touchHistory` field had to be added to `SyntheticEvent` as well.
Pull Request resolved: https://github.com/facebook/react-native/pull/21291
Reviewed By: TheSavior
Differential Revision: D10013265
Pulled By: RSNara
fbshipit-source-id: 3cd65a0eae41c756d1605e6771588d820f040e2a
Summary:
This PR is a WIP for adding tests for out-of-tree platform support. [I originally had issues](https://github.com/facebook/react-native/pull/20825#issuecomment-416433611) with this, so I want to give it a try in a separate pull request. None of these issues appear on my machine while running these tests as of this rebase - if everything seems okay on CircleCI after this rebase against `master`, I will ditch the [WIP] tag. Otherwise, I will see if I can find a way to make this work.
The bunch of JS files that will give this a "Large PR" tag are in `RNTester/js/OutOfTreeTestPlatform` - they are only used by the bundler and not executed at any point in time. So if another file needs to be added when React Native's module structure changes, you do not need to have a functional JS file in there as a stub. `module.exports` could be `null` if you wanted. I just had copied over stubs from `Libraries` because I wanted a non-trivial haste module map to be in the test.
Pull Request resolved: https://github.com/facebook/react-native/pull/20932
Reviewed By: axe-fb
Differential Revision: D9818112
Pulled By: hramos
fbshipit-source-id: 0b53359b84430fdefb972587c95d19f85773c5fa
Summary: We want to be able to log individual points from JS.
Reviewed By: ejanzer
Differential Revision: D10050400
fbshipit-source-id: eadd81a8cf70082998950c19a98c3de979eb148a
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