forked from facebook/react-native
-
Notifications
You must be signed in to change notification settings - Fork 151
Merge up to 49f3f47b1e9b840e4374d46b105604f4d2c22dd5 #1628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Summary: Calls to Inspector::evaluate() and Inspector::executeIfEnabled() take a user-provided callback which are not try-guarded. This means that, should the user code throw, the inspector's process will likely die due to the unhandled exception. This change makes sure that, if the user provided callback throws, then the promise attached to those methods will be fulfilled by an exception. Change: [internal] Reviewed By: avp Differential Revision: D33852073 fbshipit-source-id: 7fbb6662b28d393a5d5b494c004aa9521e23ebb6
Summary: changelog: [internal] React on web uses microtasks to schedule a synchronous update for discrete event. Microtasks are not yet available in React Native and as a fallback, React uses native scheduler and task with immediate priority. Until Microtasks are in place, React Native needs to make sure all immediate tasks are executed after it dispatches each event. I tried to stay as close to [microtask standard](https://developer.mozilla.org/en-US/docs/Web/API/queueMicrotask) as I reasonably could. Once microtasks on RN are shipped, this code can be removed. Reviewed By: mdvacca Differential Revision: D33742583 fbshipit-source-id: eddebb1bd5131ee056252faad48327a70de78a4a
…ig() work on Venice Summary: Changelog: [Internal] Reviewed By: RSNara Differential Revision: D33860658 fbshipit-source-id: 41079b13acef531877c82dc0b2063dbe2b42edcf
Summary: Changelog: [Internal] Remove all the MCs that enable SVCs in Fabric, because we'll only test SVCs in Bridgeless mode to simplify rollout. There were complications with enabling SVCs in Fabric at a previous rollout. Reviewed By: RSNara Differential Revision: D33861243 fbshipit-source-id: fdbfedce77f8bd1bab2a807237017787ae8bf7c1
…e - for codegenNativeComponent Summary: Changelog: [Internal] Since DummyUIManager.getViewManagerConfig() & hasViewManagerConfig() are the same, it's safe to ship this before the native changes in this stack lands. Reviewed By: RSNara Differential Revision: D33832926 fbshipit-source-id: c0f0a169d02397e0f9125bb45d95d395c8bbc492
…e - Remove __fbStaticViewConfig & UIManagerInjection Summary: Changelog: [Internal] Reviewed By: RSNara Differential Revision: D33835081 fbshipit-source-id: ed625de3b2da73f98cdb9c9dc97086aa2c477e3a
Summary: Adds support for Animated.Color with native driver for Android. Reads the native config for the rbga channel AnimatedNodes, and on update(), converts the values into an integer (0xaarrggbb) Followup changes will include support for iOS and platform colors. Changelog: [Android][Added] - Support running animations with AnimatedColor with native driver Reviewed By: javache Differential Revision: D33833600 fbshipit-source-id: 2bf05c9715b603cf014ace09e9308b2bfd67f30a
Summary: JS changes to support D32138347 (facebook@a96bdb7). This was previously reverted due to missing iOS Paper support. Changelog: [Android][Fixed] Enable hitSlop to be set using a single number. Original commit changeset: 91cfcc86582c Original Phabricator Diff: D32559015 (facebook@589b129) Reviewed By: yungsters Differential Revision: D33453327 fbshipit-source-id: d289a0a8b8208bc9c68e6ca537632b745e8196ed
…ok#32989) Summary: Fixes a potential crash was introduced by facebook#30919 that aimed to get the keyboard height on devices with a Notch. The problem is that it considers that any ReactRootView will have an insets available. When using [react-native-navigation](https://github.com/wix/react-native-navigation) and assigning a Navigation button to the TopBar as a component, the component gets registered as a RootView but won't have any insets attach to the view. [getRootWindowInsets()](https://developer.android.com/reference/android/view/View#getRootWindowInsets()) in fact return a `WindowInset` only available if the view is attached, so when executing `checkForKeyboardEvents` method from ReactRootView, is trying to access the `DisplayCutout` of a null object, leading to a crash. ## Changelog [Android] [Fixed] - Fix potential crash if ReactRootView does not have insets attached. Pull Request resolved: facebook#32989 Test Plan: Without the code change: Notice how the second screen being push contains a React Component on the top right of the navigation bar, and when component is unmounted (going back) the app crashes. https://user-images.githubusercontent.com/6757047/151558235-39b9a8b5-be73-4c31-8053-02ce188637b8.mp4 crash log ``` 2022-01-28 10:27:52.902 15600-15600/com.mattermost.rnbeta E/AndroidRuntime: FATAL EXCEPTION: main Process: com.mattermost.rnbeta, PID: 15600 java.lang.NullPointerException: Attempt to invoke virtual method 'android.view.DisplayCutout android.view.WindowInsets.getDisplayCutout()' on a null object reference at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.checkForKeyboardEvents(ReactRootView.java:778) at com.facebook.react.ReactRootView$CustomGlobalLayoutListener.onGlobalLayout(ReactRootView.java:769) at android.view.ViewTreeObserver.dispatchOnGlobalLayout(ViewTreeObserver.java:1061) at android.view.ViewRootImpl.performTraversals(ViewRootImpl.java:3214) at android.view.ViewRootImpl.doTraversal(ViewRootImpl.java:2143) at android.view.ViewRootImpl$TraversalRunnable.run(ViewRootImpl.java:8665) at android.view.Choreographer$CallbackRecord.run(Choreographer.java:1037) at android.view.Choreographer.doCallbacks(Choreographer.java:845) at android.view.Choreographer.doFrame(Choreographer.java:780) at android.view.Choreographer$FrameDisplayEventReceiver.run(Choreographer.java:1022) at android.os.Handler.handleCallback(Handler.java:938) at android.os.Handler.dispatchMessage(Handler.java:99) at android.os.Looper.loopOnce(Looper.java:201) at android.os.Looper.loop(Looper.java:288) at android.app.ActivityThread.main(ActivityThread.java:7839) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:548) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1003) ``` After applying the patch which is only a null check validation and does not change any previous behavior https://user-images.githubusercontent.com/6757047/151558429-9ff1a608-abb6-4168-8db9-df0c3c71d79e.mp4 Reviewed By: cortinico Differential Revision: D33844955 Pulled By: ShikaSD fbshipit-source-id: ed5579ad3afeed009c61cc1851eee45c70087cf5
Summary: Changelog for 0.67.2 ## Changelog [Internal][Changed] - Release Changelog Pull Request resolved: facebook#33007 Test Plan: N/A Reviewed By: cortinico Differential Revision: D33894314 Pulled By: ShikaSD fbshipit-source-id: fc7571e39adc25e2f39db362f35d685cbc10d096
Summary: Android 11 (API 30) introduced a new interface for changing the appearance of the status bars with [`WindowInsetsController#setSystemBarsAppearance`](https://developer.android.com/reference/kotlin/android/view/WindowInsetsController#setsystembarsappearance) and deprecated using the `WindowManager#systemUiVisibility` properties. Apparently, once you call `setSystemBarsAppearance` Android will no longer respect `systemUiVisibility` and if anyone, such as the Android 12 Splash Screen library, happens to call it, it will break status bars. This PR augments the RN StatusBarModule to use the new interface on Android 11+. Also updated the rn-tester app, see video. https://user-images.githubusercontent.com/1124321/151321561-8202e237-cf7d-45ce-b957-18b5bafd17c4.mov ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [Android] [Changed] - Use new StatusBar API on Android 11 (API 30)+ Pull Request resolved: facebook#32975 Reviewed By: cortinico Differential Revision: D33814853 Pulled By: ShikaSD fbshipit-source-id: c0f2651015dddb4871a3e3b26642f76a46da2a76
…brary with direct call to fb_java_library_android Summary: Replace fb_xplat_platform_specific_rule calls where rule = fb_java_library with direct call to fb_java_library_android Reviewed By: alexmalyshev Differential Revision: D33852709 fbshipit-source-id: 1ff3a1225e681d0924ec04e955b0039724182b1c
… rule = fb_java_library with direct call to fb_java_library_android Differential Revision: D33852709 (facebook@dc507be) Original commit changeset: 1ff3a1225e68 Original Phabricator Diff: D33852709 (facebook@dc507be) fbshipit-source-id: 10db2d1bda1ea69b9a0226041493af06b78c16c4
Summary: ## Impact Fix the Static ViewConfig for <View/>. This diff fixes the base ViewConfig for all HostComponents on both platforms. Consequently, it simplifies SVC reconciliation efforts, by nearly eliminating the first of these classes of SVC errors: 1. Unexpected properties in SVC 2. Missing properties in SVC 3. Not matching properites in SVC ## What is the base ViewConfig on each iOS/Android? **On iOS:** - All props come from ViewManagers - All HostComponent ViewManagers extend <View/> ViewManager https://pxl.cl/1SxdF Therefore, the base ViewConfig for all components should be <View/>'s static ViewConfig. **On Android:** The component model is a bit more complicated: https://pxl.cl/1Vmp5 Takeaways: - Props come from Shadow Nodes **and** ViewManagers - Nearly all HostComponent ViewManagers extend BaseViewManager. But, that's not <View/>'s ViewManager. - <View/>'s ViewManager is [ReactViewManager](https://fburl.com/code/0zalv8zk), which is a descendent of BaseViewManager, and declares its own ReactProps. So, on Android, it's not safe for the base ViewConfig to be <View>'s ViewConfig: 1. No components actualy incorportate <View/>'s props 2. Some components don't even incorporate BaseViewManager's props. So, what should the base ViewConfig be on Android? - Nearly all components extend BaseViewManager. BaseViewManager must have a shadow node [that extends LayoutShadowNode](https://www.internalfb.com/code/fbsource/[47d68ebc06e64d97da9d069f1ab662b392f0df8a]/xplat/js/react-native-github/ReactAndroid/src/main/java/com/facebook/react/uimanager/BaseViewManager.java?lines=40). Therefore, we'll make the base ViewConfig on Android be generated by BaseViewManager + LayoutShadowNode. ## Changes In this diff, I removed ReactNativeViewViewConfig, and introduced a new view config called PlatformBaseViewConfig. This ViewConfig partial will capture all the props available on all HostComponents on **both** platforms. This may not necessarily be the props made available on <View/>. The only components that don't extend the base platform props are: RCTTextInlineImage. What we do with these components is TBD. Changelog: [Internal] Reviewed By: p-sun, yungsters Differential Revision: D33135055 fbshipit-source-id: 7299f60ae45ed499ce47c0d0a6309a047bff90bb
Summary: Removes `ColorPropType`, `EdgeInsetsPropType`, `PointPropType`, and `ViewPropTypes` from the React Native Public API. Accessing these will now cause an error to be thrown with a message to use the `deprecated-react-native-prop-types` package. These were deprecated in React Native v0.66. Changelog: [General][Removed] - Removed `ColorPropType`, `EdgeInsetsPropType`, `PointPropType`, and `ViewPropTypes`. Reviewed By: kacieb Differential Revision: D33746966 fbshipit-source-id: 61d264d133f42008c7ff252e6ebbb8b47747939c
Summary: Similarly to D29864944 (facebook@6d4fff2) we want to use `getWindowDisplayMetrics` instead of `getScreenDisplayMetrics`. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D33916223 fbshipit-source-id: cae07b1f0c1498745f28d0b9f860edcc55bde5ed
Summary: Running `yarn audit` shows a vulnerability in the `shelljs` version we're currently using  This PR upgrades `shelljs` from 0.8.4 to 0.8.5 in order to mitigate this vulnerability More info on GHSA-4rq4-32rv-6wp6 ## Changelog [Internal] [Security] - Upgrade shelljs to v0.8.5 in order to fix Improper Privilege Management vulnerability Pull Request resolved: facebook#33001 Test Plan: There are no API changes between versions 0.8.4 and 0.8.5, so just testing the scripts that use this lib should be enough. Reviewed By: cortinico Differential Revision: D33897436 Pulled By: lunaleaps fbshipit-source-id: f32b118ff47c6135845ac4de425feb8ebea220a8
Summary: D33740360 (facebook@16ed62a) broke Explore VR on React Native. The app would go into a loop on boot and not finish mounting. This is probably a product code issue, but it's not a trivial issue to solve. Unlanding to unblock the RN migration. Changelog: [internal] internal Reviewed By: mdvacca Differential Revision: D33918026 fbshipit-source-id: cc77c70ece9994d82c91f7ae8783e959629e9cfb
Summary: Adds support for platform colors in AnimatedColor. Passes the processed native color object to the native ColorAnimatedNode via the native config; ColorAnimatedNode then uses ColorPropConverter.getColor to resolve the resource path. Note: setting a platform color via setValue on an existing AnimatedColor is not supported yet Changelog: [Android][Added] - Support platform color with AnimatedColor Reviewed By: yungsters Differential Revision: D33922266 fbshipit-source-id: 04d39a5ce0872b31d06ffbd4639d2f2213cf3314
Summary: Removes the `propTypes` member from the `Image`, `Text`, and `TextInput` components. They have been deprecated since React Native v0.66. Changelog: [General][Removed] - Removed `Image.propTypes`, `Text.propTypes`, and `TextInput.propTypes`. Reviewed By: kacieb Differential Revision: D33750298 fbshipit-source-id: 085f83ad838196bdd531b097b8ce5957270c3ad1
Summary: Removes the `deprecated-react-native-props` dependency from `react-native`. This is now possible because all of the deprecated call sites have been removed: - `Image.propTypes` - `Text.propTypes` - `TextInput.propTypes` - `ColorPropType` - `EdgeInsetsPropType` - `PointPropType` - `ViewPropTypes` Changelog: [General][Removed] - Removed `deprecated-react-native-props` as a package dependency. Reviewed By: kacieb Differential Revision: D33750413 fbshipit-source-id: 003fb275d1ce766cbce2b44708dd254243abb33b
Summary: [Hermes][Inspector] Implement the CDP API for calling a function on an object. Changelog: [Internal] Reviewed By: avp Differential Revision: D33722301 fbshipit-source-id: da26e865cf29920be77c5c602dde1b443b4c64da
Summary: Update LinkingExample "Open external URLs" description to mitigate confusion about opening custom schemes in the simulator when testing, as suggested by Luna here facebook#32962 (comment) ## Changelog [Internal] [Changed] - Update LinkingExample "Open external URLs" description Pull Request resolved: facebook#33023 Test Plan: 1. Build RNTester iOS app 2. Head to the APIs example, Linking -> "Open external URLs" https://user-images.githubusercontent.com/11707729/152087644-7e95692c-5180-465b-9fc8-2a637a091deb.mov Reviewed By: cortinico Differential Revision: D33941963 Pulled By: dmitryrykun fbshipit-source-id: 5f58d7f71aee61518b0b8fd92d7b78ac8bff4d4b
Summary: Danger 7 -> 11 ## Changelog [Internal] [Changed] - Updates Danger used in PR checking from v7 to v11 Pull Request resolved: facebook#33027 Test Plan: Works when testing locally ``` > DANGER_GITHUB_API_TOKEN=XXYYZZ yarn danger pr facebook#32955 yarn run v1.22.15 $ node ./node_modules/.bin/danger pr facebook#32955 Starting Danger PR on facebook#32955 --- Accurate Error due to not being able to write to labels --- ## Failures `node` failed. ## Messages :clipboard: Missing Summary - <i>Can you add a Summary? To do so, add a "## Summary" section to your PR description. This is a good place to explain the motivation for making this change.</i> - :clipboard: Missing Test Plan - <i>Can you add a Test Plan? To do so, add a "## Test Plan" section to your PR description. A Test Plan lets us know how these changes were tested.</i> - :clipboard: Missing Changelog - <i>Can you add a Changelog? To do so, add a "## Changelog" section to your PR description. A changelog entry has the following format: `[CATEGORY] [TYPE] - Message`. <details>CATEGORY may be: - General - iOS - Android - JavaScript - Internal (for changes that do not need to be called out in the release notes) TYPE may be: - Added, for new features. - Changed, for changes in existing functionality. - Deprecated, for soon-to-be removed features. - Removed, for now removed features. - Fixed, for any bug fixes. - Security, in case of vulnerabilities. MESSAGE may answer "what and why" on a feature level. Use this to briefly tell React Native users about notable changes.</details></i> ## Markdowns Danger: ⅹ Failing the build, there is 1 fail. error Command failed with exit code 1. info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command. ``` Reviewed By: GijsWeterings Differential Revision: D33941271 Pulled By: cortinico fbshipit-source-id: 359c0076a160a8eeac897a2e1556d3e4d3db5e04
Summary: Venice uses `SurfaceHandler` abstraction which start/stops surfaces independently from `Binding.cpp`, so previous `onSurfaceStart/Stop` callback would not be triggered. On Android, each surface is used exactly once at the time of writing, so we can use `register/unregister` callbacks to create/clear remembered views for the surface. Changelog: [Internal] Reviewed By: sammy-SC Differential Revision: D33845685 fbshipit-source-id: 8de4204c7498176fdbe8d44fbc5f2e4079212a1c
…acebook#33019) Summary: This PR bumps the CLI dependency to v7, which is a new version made so that we can obtain the new version of Metro via react-native-community/cli@b53ba5b After merging this, we should cherry pick this commit in the 0.68 branch and do a new RC ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://github.com/facebook/react-native/wiki/Changelog --> [General] [Changed] - Bump RN CLI to v7, and Metro to 67 Pull Request resolved: facebook#33019 Test Plan: Tried some quick local testing with test-manual-e2e, seems to be working fine: <img width="929" alt="Screenshot 2022-02-01 at 16 38 01" src="https://user-images.githubusercontent.com/16104054/152010647-f0a7a803-6e46-41d4-91fc-5f9d6753f88e.png"> Reviewed By: cortinico Differential Revision: D33918810 Pulled By: ShikaSD fbshipit-source-id: 28ff52c4c89b5ca2390527aa6c66fb2ce236316e
Summary: This enables concurrent task exection and parallel downloads See also michel-kraemer/gradle-download-task#138 ## Changelog [General] [Changed] - Update gradle-download-task to 5.0.1 to support concurrent downloads Pull Request resolved: facebook#32995 Test Plan: Build runs successfully. Reviewed By: ShikaSD Differential Revision: D33892817 Pulled By: cortinico fbshipit-source-id: 515443573e17a5c2b16a1cf3cea4bf3c5c2d96a7
…32895) Summary: I was looking at the hermes chrome devtools integration and noticed requests to `Runtime.getHeapUsage` which was not implemented. When implemented it will show a summary of memory usage of the javascript instance in devtools. <img width="325" alt="image" src="https://user-images.githubusercontent.com/2677334/149637113-e1d95d26-9e26-46c2-9be6-47d22284f15f.png"> ## Changelog [General] [Added] - Implement Runtime.getHeapUsage for hermes chrome inspector Pull Request resolved: facebook#32895 Test Plan: Before <img width="912" alt="image" src="https://user-images.githubusercontent.com/2677334/149637073-15f4e1fa-8183-42dc-8673-d4371731415c.png"> After <img width="1076" alt="image" src="https://user-images.githubusercontent.com/2677334/149637085-579dee8f-5efb-4658-b0a8-2400bd119924.png"> Reviewed By: christophpurrer Differential Revision: D33616658 Pulled By: ShikaSD fbshipit-source-id: 49d863e6a58d4a92d4c86f9a288ac33ed8d2cb0d
Summary: This change makes automatic sample profiling registration opt in. This is in preparation for an upcoming change where hermes will enforce that the sampling profiler must be destroyed on the same thread it was created. Changelog: [internal] Reviewed By: sammy-SC Differential Revision: D33826992 fbshipit-source-id: 89843b5fc5b936f674a8d0a470e92af0cd8f6125
Summary: title Changelog: [Changed][Android] - Added DoNotStripAny proguard rules Reviewed By: cortinico Differential Revision: D33921797 fbshipit-source-id: 93628d6222c74976b40efc2507a482d8a6a4fe1b
Summary: This comment was out of date. Changelog: [Internal] Reviewed By: sshic Differential Revision: D34113966 fbshipit-source-id: 0768baa9238736aea26e354792096fea6bb7fcdb
Summary: That's a really nit change, but when we moved the Makefile deps to be on separate lines, we havent' done the same for the codegen. Here I'm doing it. Changelog: [Internal] [Changed] - Place Android.mk dependencies on separate lines for codegen Reviewed By: ShikaSD Differential Revision: D34144715 fbshipit-source-id: be9d5fb75b6b93c0b2bb479145053ae6f201e1fc
Summary: Currently we are using Appcompat in version 1.0.2 which is almost 4 years old now, this PR updates it to version 1.4.1. Using Appcompat 1.0.2 was also causing a crash on RNTester due to an error where FontFamily's method was not found (Related to facebook#33065) Closes facebook#31620 ## Changelog [Android] [Changed] - Bump android Appcompat to 1.4.1 Pull Request resolved: facebook#33072 Test Plan: Use `./scripts/test-manual-e2e.sh` to test both RNTester and a new app Reviewed By: cortinico Differential Revision: D34107105 Pulled By: ShikaSD fbshipit-source-id: 966e4687b09ae50a88ee518622f073d72e8c6550
Summary: Adds support for Animated.Color with native driver for iOS. Reads the native config for the rbga channel AnimatedNodes, and on update(), converts the values into a SharedColor. Followup changes will include support for platform colors. Ran update_pods: https://www.internalfb.com/intern/wiki/React_Native/Preparing_to_Ship/Open_Source_Pods/ Changelog: [iOS][Added] - Support running animations with AnimatedColor with native driver Reviewed By: sammy-SC Differential Revision: D33860583 fbshipit-source-id: 990ad0f754a21e3939f2cb233bcfa793ef12eb14
ff467fd to
375109e
Compare
mischreiber
approved these changes
Jan 12, 2023
Saadnajmi
commented
Jan 13, 2023
Saadnajmi
commented
Jan 13, 2023
Saadnajmi
commented
Jan 13, 2023
Saadnajmi
commented
Jan 13, 2023
React/Fabric/Mounting/ComponentViews/TextInput/RCTTextInputComponentView.mm
Show resolved
Hide resolved
Saadnajmi
commented
Jan 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Please select one of the following
Summary
Merge up to facebook@49f3f47 which is a change we had already cherry picked to our repo: #1513 . I am doing it this order to try and minimize conflicts
Interesting commits:
Changeling
[macOS] [Added] - Merge up to 49f3f47
Test Plan
RNTester launches and seems fine. TextInput (which had a few macOS specific changes) didn't crash for:
Screen.Recording.2023-01-11.at.2.04.27.PM.mov