Summary:
@public
Besides `pointerEvents` there are other two props that affect hit-testing mechanism: `zIndex` and `clipToBounds`.
The default UIKit implementation does not take this into an account (it always assume that `clipToBounds` is true and `zIndex` is same). `betterHitTest` does it right.
Reviewed By: sahrens
Differential Revision: D9688876
fbshipit-source-id: dadfd5e5541ddd1a744fbd8c6b10949c0e266069
Summary:
@public
In RN we have special `pointerEvents` prop that controls whether the View can be the target of touch events.
This is a pretty straight-forward implementation of that.
Reviewed By: sahrens
Differential Revision: D9688877
fbshipit-source-id: 1524647b0a33e4dd14563f531d636469bf3bdef7
Summary:
@public
Trivial.
We should not use the name of the effort in the API interfaces where it's not neccecery.
Reviewed By: sahrens
Differential Revision: D9652991
fbshipit-source-id: 52b99e39f92926f9fc99626690eb4385195558f6
Summary:
@public
Apparently, we have to call `ReactFabric.unmountComponentAtNode(tag)` instead of `AppRegistry.unmountApplicationComponentAtRootTag(tag)`.
Reviewed By: sahrens
Differential Revision: D9652730
fbshipit-source-id: f56dba7dbe5421a7d939b91178db5104476fe550
Summary:
@public
RCTSurfaceRegistry always promised this in the documentation but never actually did.
Reviewed By: sahrens
Differential Revision: D9652732
fbshipit-source-id: f3d06b95192e024273dc0e3a1c2753ca92370338
Summary:
@public
Now we simply skip `uiManagerDidFinishTransaction` calls if they refer to unregister surfaces. In the future, after we have proper asynchronous scheduling and sync unmounting (and if we chose to have sync unmounting), we can avoid this situation (and assert in this cases).
Reviewed By: sahrens
Differential Revision: D9652731
fbshipit-source-id: e376ea1ae4f93960a903e6397d843bd7c4b72400
Summary:
@public
We don't need this anymore.
The same functionality is now implemented as `ShadowView::operator==` in much more reasonable way.
Reviewed By: sahrens
Differential Revision: D9649821
fbshipit-source-id: 8cd5f3cb4f583fd10d2d1e060aba914541341b5b
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: Follow up for 0df92afc1c -- the file refences need to be removed from Xcode project.
Reviewed By: shergin
Differential Revision: D9728433
fbshipit-source-id: ed4e69ff14413b1c4e64250c3f9716375d95fbc2
Summary:
One of our automated project tools noted that these were all missing their copyright headers.
Pull Request resolved: https://github.com/facebook/react-native/pull/21000
Differential Revision: D9721495
Pulled By: hramos
fbshipit-source-id: 6ccf0f37165a0fe16cf06bd996d615f2286101dc
Summary:
This also relink the require() onto `RamBundle.js` from Metro so we can remove `unbundle.js` from there completely.
Pull Request resolved: https://github.com/facebook/react-native/pull/21013
Reviewed By: hramos
Differential Revision: D9721443
Pulled By: jeanlauliac
fbshipit-source-id: 3e42ebde4cb2c735ef0934ba3b1e20f1054440df
Summary:
This script is not yet used. Regardless, Node 10 has been working fine for a while now.
Pull Request resolved: https://github.com/facebook/react-native/pull/21001
Differential Revision: D9721549
Pulled By: hramos
fbshipit-source-id: 44b5e2f9ec9b622a364491840f8bd8092f0399ff
Summary:
Basically, saw this commit this morning and had a chance to discuss it with matthargett and AndrewJack and overall I agree with their criticism about 3 days being too little time for people to react to it.
Pull Request resolved: https://github.com/facebook/react-native/pull/21015
Differential Revision: D9721393
Pulled By: hramos
fbshipit-source-id: 524c0b87987a8b76fa8d5e223fb5ed5a56a8c648
Summary:
@public
Just movin' stuff around.
This shouldn't render any actual metrics yet on Android, need native changes for that.
Reviewed By: achen1
Differential Revision: D9584669
fbshipit-source-id: 4b6169b14d1f2053258191f67e1f361a4b714a8e
Summary:
@public
Apperently, we don't need to store and parse this because we are already doing this for `yogaStyle` field.
Reviewed By: sahrens
Differential Revision: D9649549
fbshipit-source-id: a84a5518674f4c2d574a060cdbebb9562121f5f4
Summary:
@public
Now all configurations or border styles are supported by RCTViewComponentView (and all subclasses).
Reviewed By: sahrens
Differential Revision: D9631868
fbshipit-source-id: 3a5b141ac5ffa9c28f4ebb0718f2fc935b8f1a75
Summary:
@public
Empty (nullptr) color should be treated as `Clear` color ({0, 0, 0, 0} - black, fully tranparent), so `colorComponentsFromColor()` was changed to accomodate this (previously it crashed).
Reviewed By: rsnara
Differential Revision: D9631865
fbshipit-source-id: e211f34a89e9f5f86d9fca2789c7163db4feaab1
Summary:
@public
We will use that in RCTFabric module.
Reviewed By: sahrens
Differential Revision: D9631866
fbshipit-source-id: a8e4074189359ad6014d0506d6a1e020b5d0d330
Summary:
@public
Apparently, it's how it should be.
Reviewed By: rsnara
Differential Revision: D9631870
fbshipit-source-id: 46f58270104d699fbc9abe21062c12f791460536
Summary:
@public
Previously, ViewProps class coundn't represent whole spectre of possible values of border metrics (e.g. the border color was unified).
Now it's complete and direction-specific.
Reviewed By: sahrens
Differential Revision: D9628361
fbshipit-source-id: 6d3b3d4d7e3008e2168cbca732ff99fe5ea595e8
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:
This fixes issues #18954 and #15497
The transformation from Set to (an reversed) Array does not work on Android devices when the remote debugging was started with `react-native run-android`.
<!--
Required: Write your motivation here.
If this PR fixes an issue, type "Fixes #issueNumber" to automatically close the issue when the PR is merged.
-->
Add the following code to your App.js and run the app with `react-native run-android` in an Android device:
```
componentDidMount() {
BackHandler.addEventListener('hardwareBackPress', () => {
console.warn('Callback called. Do not close app. Do nothing at all.');
return true; // Do not close the app.
});
}
```
After adding this, the app should NOT close when you press the back button. Without this fix, the app closes (which is the default behaviour).
See also the comments from Victoriayangx in #18954 and #15497.
<!--
Does this PR require a documentation change?
Create a PR at https://github.com/facebook/react-native-website and add a link to it here.
-->
<!--
Required.
Help reviewers and the release process by writing your own release notes. See below for an example.
-->
[ANDROID] [BUGFIX] [BackHandler] - Fix that BackHandler was not called on Android
<!--
**INTERNAL and MINOR tagged notes will not be included in the next version's final release notes.**
CATEGORY
[----------] TYPE
[ CLI ] [-------------] LOCATION
[ DOCS ] [ BREAKING ] [-------------]
[ GENERAL ] [ BUGFIX ] [ {Component} ]
[ INTERNAL ] [ ENHANCEMENT ] [ {Filename} ]
[ IOS ] [ FEATURE ] [ {Directory} ] |-----------|
[ ANDROID ] [ MINOR ] [ {Framework} ] - | {Message} |
[----------] [-------------] [-------------] |-----------|
EXAMPLES:
[IOS] [BREAKING] [FlatList] - Change a thing that breaks other things
[ANDROID] [BUGFIX] [TextInput] - Did a thing to TextInput
[CLI] [FEATURE] [local-cli/info/info.js] - CLI easier to do things with
[DOCS] [BUGFIX] [GettingStarted.md] - Accidentally a thing/word
[GENERAL] [ENHANCEMENT] [Yoga] - Added new yoga thing/position
[INTERNAL] [FEATURE] [./scripts] - Added thing to script that nobody will see
-->
Pull Request resolved: https://github.com/facebook/react-native/pull/19077
Reviewed By: yns88
Differential Revision: D9692298
Pulled By: hramos
fbshipit-source-id: 4526b07a4924055ebc9c42e02615c27aa5c97fbb
Summary:
Legacy navigator impl. There are other alternatives that should be used instead.
Part of the slimmening effort as described here: https://github.com/react-native-community/discussions-and-proposals/issues/6
Reviewed By: TheSavior
Differential Revision: D9677824
fbshipit-source-id: 24ae500751d2a8c398f246d36604a58f0b3c113b
Summary:
This version of metro contains experimental support for inlining import statements, which will unblock RAM bundling for opensource users that use imports, yay!!!
Publishing as a minor version, since there are no breaking changes. This way, this will also be available already in RN 0.57, since it depends on Metro 0.57 (https://fburl.com/t2j2k2sw).
/cc @[805780135:Eli White], @[1268286274:David Vacca], @[121800083:Héctor Ramos]
Reviewed By: mjesun
Differential Revision: D9682357
fbshipit-source-id: ddd450649e55ee37701667cdff0e81165875e76d
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:
D8842691 split AccessibilityTraits into multiple RN properties. However, the accessor code did not support REMOVING traits.
This results in buttons that were disabled (AccessibilityTraits & NotEnabled === true) never being enabled.
Fix the issue by making the split accessors properly mask in the bits, allowing you unset them without disturbing bits managed by the other accessor.
NOTE: setting AccessibilityTraits and AccessibilityRole or AccessibilityStates will still result in bugs.
Reviewed By: shergin
Differential Revision: D9661970
fbshipit-source-id: 77d70dd0754f2eaf8cbf895bfc13757c697a76d8
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:
The default react-native template has ic_launcher_round icons on the resources but has not been used.
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 Request resolved: https://github.com/facebook/react-native/pull/20968
Differential Revision: D9661731
Pulled By: hramos
fbshipit-source-id: ad8f2f952df2c32aea2a8d3e69c445ed27387aa6
Summary:
**Motivation**
Whenever a user changes the system font size to its maximum allowable setting, React Native apps that allow font scaling can become unusable because the text gets too big. Experimenting with a native app like iMessage on iOS, the font size used for non-body text (e.g. header, navigational elements) is capped while the body text (e.g. text in the message bubbles) is allowed to grow.
This PR introduces a new prop on `<Text>` and `<TextInput>` called `maxFontSizeMultiplier`. This enables devs to set the maximum allowed text scale factor on a Text/TextInput. The default is 0 which means no limit.
Another PR will add this feature to Android.
**Test Plan**
I created a test app which utilizes all categories of values of `maxFontSizeMultiplier`:
- `undefined`: inherit from parent
- `0`: no limit
- `1`, `1.2`: fixed limits
I tried this with `Text`, `TextInput` with `value`, and `TextInput` with children. For `Text`, I also verified that nesting works properly (if a child `Text` doesn't specify `maxFontSizeMultiplier`, it inherits it from its parent).
Lastly, we've been using a version of this in Skype for several months.
**Release Notes**
[GENERAL] [ENHANCEMENT] [Text/TextInput] - Added maxFontSizeMultiplier prop to prevent some text from getting unusably large as user increases OS's font scale setting (iOS)
Adam Comella
Microsoft Corp.
Pull Request resolved: https://github.com/facebook/react-native/pull/20915
Differential Revision: D9646739
Pulled By: shergin
fbshipit-source-id: c823f59c1e342c22d6297b88b2cb11c5a1f10310