Summary:
This PR tries to consolidate Android native dependencies versions to make it less error prone to version bumps.
Pull Request resolved: https://github.com/facebook/react-native/pull/20742
Differential Revision: D9818155
Pulled By: hramos
fbshipit-source-id: 9bf631640910edad5731014f4e23dbca45af2b59
Summary:
This PR does 2 things:
* Have Facebook internal dependencies only be added if `IS_OSS_BUILD` is `True`. This syntax is used in other BUCK files in the codebase.
* `ReactAndroid/src/androidTest/java/com/facebook/react/tests/core/BUCK`
* `ReactAndroid/src/androidTest/java/com/facebook/react/testing/rule/BUCK`
* Add a missing Android dependency to this BUCK file:
* `ReactAndroid/src/main/java/com/facebook/react/BUCK`
As a result, `test_android` is passing again.
Pull Request resolved: https://github.com/facebook/react-native/pull/21083
Differential Revision: D9809808
Pulled By: hramos
fbshipit-source-id: c840ea2892006a88fe13de1b1324746d030ebaf2
Summary:
@public
As we're doing in D9440914 (OSS 64a52532fe), send text metrics in an onTextLayout callback. These can be used by surrounding views for doing complicated layout like:
- displaying a cursor at the end of text
- vertical centering using capheight-baseline
This right now isn't very performant but is only done when `onTextLayout` is set. I plan to optimize it with a capheight and xheight cache in a follow up diff.
Reviewed By: achen1
Differential Revision: D9585613
fbshipit-source-id: aa20535b8371d5aecf15822d66a0d973c9a7eeda
Summary: This diff adds a new property in ReactWebView to be able to configure allowFileAccess
Reviewed By: achen1
Differential Revision: D9789466
fbshipit-source-id: 39d042ac6ef69e44f006a4c4b0c2dd900f84dbc9
Summary: Back out D9614432 and partially revert D9623235 to unbreak OSS.
Reviewed By: hramos
Differential Revision: D9779548
fbshipit-source-id: 931c4987ed5acbae3790c42717662fed77599335
Summary: This change drops the year from the copyright headers and the LICENSE file.
Reviewed By: yungsters
Differential Revision: D9727774
fbshipit-source-id: df4fc1e4390733fe774b1a160dd41b4a3d83302a
Summary: buildifier was updated and now we sort loads!
Reviewed By: zertosh
Differential Revision: D9771824
fbshipit-source-id: 0001aa5f656d4aa40b3498d5bfd792a3d14e56e1
Summary: Adding a QPL point for initializing Hermes to both (MP) HOME_TTI and (RN) CORE.
Reviewed By: yungsters
Differential Revision: D9725795
fbshipit-source-id: 673f54950a2d9ebfa496a000a0d47aabf290bfc8
Summary:
The React Native Web View takes a method option to determine if HTTP GET or HTTP POST should be used.
For iPhone this is not case sensitive, meaning that `method: "post"` is allowed.
For Android "post" is not understood and therefore the request will be using HTTP GET.
I suggest we ignore case for the method, or throw an Exception.
Pull Request resolved: https://github.com/facebook/react-native/pull/21010
Differential Revision: D9700895
Pulled By: hramos
fbshipit-source-id: 3fa904e7946dd40958cb44f9a234ee66cb68fab2
Summary: An experiment was added to A/B test eager modules. Removing this experiment, as the next diff on this stack has a different way to add eager modules per route.
Reviewed By: achen1
Differential Revision: D9685803
fbshipit-source-id: ca6c91ca377b6dfaf5accda1e1f6bbfe17b1d616
Summary:
Some of the native modules are accessed using `getNativeModule()` may not have an `ReactModule` annotation. As a result, such native modules cannot be found.
This diff adds a better error message, and also adds the annotation to Mobile Home's `PushNotificationManager` that is accessed using the `getNativeModule()`
Differential Revision: D9697256
fbshipit-source-id: 2e2f7d2f1eb705c9c515ff40d9acbc53055c26d8
Summary: setupReactContext wasn't ending because D9664719 added incorrect end markers. Need to use either Systrace.endSection() or SystraceMessage.endSection().flush().
Differential Revision: D9695854
fbshipit-source-id: e0f7d492bc58536ce242962438edac7eec671867
Summary: The logic in NativeModuleRegistryBuilder.processPackage was getting pretty complex with lot of branches. Moved the logic to get actual packages into each of the packages, instead of having it in NativeModuleRegistryBuilder.
Reviewed By: achen1
Differential Revision: D9618140
fbshipit-source-id: 4be82ec65b0bd92f11f8b77044004e10c9d3b1a1
Summary:
Added systrace to the following sections
1. When Marketplace Home Fragment is created
2. On initialization of Catalyst Instance
Reviewed By: achen1
Differential Revision: D9665376
fbshipit-source-id: e48e9f50dad42c71fb2151538f65bc54939adc1e
Summary: tired of looking around for this thread. named it "create_react_context"
Differential Revision: D9664714
fbshipit-source-id: 8839b5724fe2516fc46de3dd40971c52a5a8168f
Summary:
- Differentiate when the constants are coming from lazy view managers or not
- Add systrace sections to each reactpackage iteration for lazy view managers
Differential Revision: D9664719
fbshipit-source-id: 3b8c6b3b40667a833471fcb957367501781b0f5d
Summary:
Currently `ReactModuleSpecProcessor` looks at each of the modules, and sees if the module inherits from `CxxModuleWrapper` to see if it is a C++ module or not. With this change, we now require C++ modules to explicitly specify that they are C++ modules, instead of doing annotation processing magic.
Also note that annotation processor do not work with interfaces but with classes only, so this also removes the dependency of the annotation processor from the bridge buck target.
Reviewed By: achen1
Differential Revision: D9597352
fbshipit-source-id: fd847ac382699d2ab78f7d7c6e2dbd7c60d3f0c4
Summary: Reverting D9304307 and also adding CountEnum annotation to ReactMarkerConstants. This way we get the typesafety of the enum with the optimization of converting to int in production builds. More on the count: https://our.intern.facebook.com/intern/wiki/Android-java-transforms/the-count/
Reviewed By: achen1
Differential Revision: D9623235
fbshipit-source-id: ab992e7edb6cf999f5f122faee31075a63782411
Summary: Unused loads hurt readability and take time to process.
Reviewed By: hramos
Differential Revision: D9494120
fbshipit-source-id: 455b56efadab1cb976344cffcb427772bfda2f71
Summary:
release method of local_ref and global_ref doesn't call deallocator, in fact, it leaves the caller responsible for deletion of the reference, while otherwise the reference is released on scope left.
Fixes#18292.
Pull Request resolved: https://github.com/facebook/react-native/pull/20913
Differential Revision: D9616237
Pulled By: hramos
fbshipit-source-id: 021aa3e4f039e6b7a98da3e4224c1ee49d5a4921
Summary: Add native android nav bar. Title and button info are from FBDynamicNavigationOption. Set through setBarOption.
Reviewed By: achen1
Differential Revision: D9367058
fbshipit-source-id: 0f3f790d2c4d3af97568927993964678bc028bc3
Summary: A cell syntax load crept into RN. Remove it so it works with oss
Reviewed By: scottrice
Differential Revision: D9596187
fbshipit-source-id: 1f3138b760f63ae4b1fa23a034e6b9a86396ff50
Summary: Added `snapToStart` and `snapToEnd` props to ScrollView which work together with `snapToOffsets` and determine whether the beginning and end of the list automatically count as snap offsets or not. If not, the list is allowed to free-scroll between its start/end and the first/last snap offset.
Reviewed By: sahrens
Differential Revision: D9442386
fbshipit-source-id: 47a5fdb20f884542434b01b1f0a486ed2b478c6e
Summary:
* Added snapToOffsets prop to ScrollView. Allows snapping at arbitrary points.
* Fixed pagingEnabled not being overridden by snapToInterval on iOS.
* Fixed Android *requiring* pagingEnabled to be defined alongside snapToInterval.
* Added support for decelerationRate on Android.
* Fixed snapping implementation. It was not calculating end position correctly at all (velocity is not a linear offset).
* Resolves https://github.com/facebook/react-native/issues/20155
* Added support for new content being added during scroll (mirrors existing functionality in vertical ScrollView).
* Added support for snapToInterval.
* Resolves https://github.com/facebook/react-native/issues/19552
Reviewed By: yungsters
Differential Revision: D9405703
fbshipit-source-id: b3c367b8079e6810794b0165dfdbcff4abff2eda
Summary: This diff reverts the changes in the name for AndroidHorizontalScrollView and AndroidHorizontalScrollContentView that caused a redbox for continuous OTA users
Reviewed By: fkgozali
Differential Revision: D9561972
fbshipit-source-id: 3d8e9ee8bb6081107bc8d315af16885bb003148e
Summary: And migrated ReactRootViewTestCase to use ReactNativeTestRule.
Reviewed By: mdvacca
Differential Revision: D9557362
fbshipit-source-id: 1469d0ad8c125b5ea729371d81956e61780c56cf
Summary: It's unclear if this was a recent regression or not (too lazy to find out), but instrumentation tests are failing because FrescoModule is never initialized (see task for trace). Based on the initial introduction of this class (D2448321) it appears that FrescoModule was always intended to be initialized on startup. Let's eagerly init Fresco in that case.
Reviewed By: fkgozali
Differential Revision: D9556864
fbshipit-source-id: 0b670dec46f5087b3794330931ddf5d7782c8367
Summary: This diff updates the size of RootShadowNode and re-render RN views when the Size of the Android React View changes
Reviewed By: achen1
Differential Revision: D9173758
fbshipit-source-id: 7cc6bbfb646025c3ec1773ab041eb9207623af71
Summary: This diff implements the HorizontalScrollView component for Android Fabric C++, as part of this diff I also re-named the components AndroidHorizontalScrollContentView for RCTAndroidHorizontalScrollContentView and AndroidHorizontalScrollView for RCTAndroidHorizontalScrollView. This might sound against our plan of removing the RCT preffix, but it is to make it simpler to map components between current implementation of RN and Fabric (otherwise we don't know when to add the RCT preffix in Android side to find the right View Manager), later we can just remove the preffix from C++, Android, iOS and JS.
Reviewed By: shergin, achen1
Differential Revision: D9122729
fbshipit-source-id: e9299552857c6dd0c18abfa5fa49a3d50e221729
Summary:
The full idea for eagerly creating Native Modules is articulated here https://fb.quip.com/vWcLAup3a6kR
TLDR:
1) Move lazy native module work from the mqt_js thread to the background thread which processes packages. This also moves it from post-network to pre-network.
2) For a quick test, decide which modules to eagerly create with a QE flag.
3) Eagerly create the modules by opting-out of the ReactModuleInfo pipeline which was built for lazy native modules.
Reviewed By: achen1
Differential Revision: D9503934
fbshipit-source-id: 0cd8337ad294cd0f8be692fecbf4292d204f3ec4
Summary:
Accessibility roles are enums that are looked up by matching a string accessibility role from JS to the enum's name using .toUpperCase(). .toUpperCase() causes issues in certain languages such as Turkish because the "i"s translate to "?".
D9402330 tried to address this by forcing the .toUpperCase to use Locale.US, but now it sometimes translates to "?"
Use .equalsIgnoreCase() instead to avoid translations.
Reviewed By: mdvacca, mmmulani
Differential Revision: D9497494
fbshipit-source-id: 0f8b7f2071b08ccb86655fee7bfd2d009ddde8eb
Summary:
Bump android gradle plugin to 3.1.4. We have been stay to 2.x too long. With 3.x we can have instant run and great performance and new features brought by google.
Also thanks to CFKevinRef great pr to make this possible.
pass all current ci. I have also tested RNTester release version works without crash.
https://github.com/facebook/react-native/pull/17967.
[GENERAL] [ANDROID] [FEATURE] - bump android gradle to 3.1.4
Pull Request resolved: https://github.com/facebook/react-native/pull/20767
Differential Revision: D9437576
Pulled By: hramos
fbshipit-source-id: 6084056a1390582a75a879918f2538b0480f6299
Summary:
I found that android support library 27.x (874cca1ac2) requires compileSdkVersion to be 27. Also found that many FB projects use SDK 27.
Pull Request resolved: https://github.com/facebook/react-native/pull/20777
Differential Revision: D9478431
Pulled By: hramos
fbshipit-source-id: ca100f6b5b39e7d112926124423f9510a0efc291