feat: merge 0.85-merge into 0.84-merge - #3062
Closed
Saadnajmi wants to merge 586 commits into
Closed
Conversation
Summary: Pull Request resolved: react#55525 [changelog](https://github.com/facebook/flow/blob/main/Changelog.md) Changelog: [Internal] Reviewed By: marcoww6 Differential Revision: D92902224 fbshipit-source-id: 52ef18ab4c8d841d3e84acbcac03813366a528e6
Summary: Pull Request resolved: react#55526 This allows character styling to be implemented, which can draw to the canvas, before or after main text draw, with full access to layout information. This allows very efficiently drawing some effects not possible on TextView. Changelog: [Android][Added] -Add Unstable DrawCommandSpan Usable with PreparedLayoutTextView Reviewed By: Abbondanzo Differential Revision: D92796048 fbshipit-source-id: 8ec542152c6a5c7c4a4d9cc99ace2edf42ef493e
…ga/algorithm (react#55522) Summary: Pull Request resolved: react#55522 Reviewed By: cortinico Differential Revision: D92810369 fbshipit-source-id: f2125a8fbaae3486b4a4ace59e513ce2a9367824
…in truncated text range (react#55518) Summary: ### Title [iOS] Inline attachments in truncated Text still visible (Fabric) --- ### Description On iOS with the New Architecture (Fabric), inline attachments in a `<Text>` that lie beyond the `numberOfLines` limit are still being rendered instead of being clipped. As a result, the attachment that should be clipped appears just above its wrapper. See screenshots below. --- ### MANDATORY Reproducer https://snack.expo.dev/kamildelekta/truncatedtextattachmentvisiblebug --- ### Screenshots of issue Only `maxLines` changes between these two screenshots. You can check it yourself in the expo snack above. | Text | Truncated Text | | --------- | ------- | |<img width="250" height="1027" alt="maxLines4" src="https://github.com/user-attachments/assets/bc93a03a-7819-4ec6-84ab-dea2bd7cbe6c" /> | <img width="250" height="1029" alt="maxLines3" src="https://github.com/user-attachments/assets/25eee68d-ef10-40d2-a657-b9dc9e158c1b" /> | ### React Native Version ``` "react-native": "0.83.0" ``` --- ### Affected Platforms only IOS New Arch --- Pull Request resolved: react#55518 Test Plan: **Visible cases** Tested multiple layouts where the attachment is in range; the attachment is shown and laid out correctly. **Clipped cases** Tested both clipping paths: (1) attachment after the last visible line → `isOutsideVisibleRange`; (2) attachment in the truncated "..." range → `isInTruncatedRange`. In both cases the attachment is correctly clipped. **Context** Before this change we only had `isInTruncatedRange`. Handling for `isOutsideVisibleRange` was added. The example below shows that these two clipping cases are mutually exclusive; in the app, both cases correctly clip the attachments. Testing code: ``` <View style={{ flex: 1, justifyContent: 'center', padding: 16, alignItems: 'stretch' }}> <Text style={{ fontSize: 20, fontWeight: 'bold', marginBottom: 8, color: 'react#333' }}> Correctly clipped </Text> {/* Case 1: isOutsideVisibleRange: 1, isInTruncatedRange: 0 */} <Text numberOfLines={3} style={{ fontSize: 18, borderWidth: 1, marginBottom: 16, textAlign: 'justify' }}> Line 1{'\n'}Line 2{'\n'}Line 3{'\n'} <View style={{ width: 20, height: 20, backgroundColor: 'red' }} /> </Text> {/* Case 2: isOutsideVisibleRange: 0, isInTruncatedRange: 1 */} <Text numberOfLines={1} style={{ fontSize: 18, width: 200, borderWidth: 1, marginBottom: 8 }}> Long text that truncates with ellipsis <View style={{ width: 20, height: 20, backgroundColor: 'blue' }} /> </Text> <Text style={{ fontSize: 20, fontWeight: 'bold', marginTop: 16, marginBottom: 8, color: 'react#333' }}> Visible </Text> <Text style={{ fontSize: 12, color: 'react#666', marginBottom: 4, marginTop: 8 }}>First char</Text> <Text numberOfLines={2} style={{ fontSize: 18, borderWidth: 1, marginBottom: 16, textAlign: 'justify' }}> <View style={{ width: 20, height: 20, backgroundColor: 'green' }} /> text after attachment </Text> <Text style={{ fontSize: 12, color: 'react#666', marginBottom: 4 }}>Middle of line</Text> <Text numberOfLines={3} style={{ fontSize: 18, borderWidth: 1, marginBottom: 16, textAlign: 'justify' }}> Line 1{'\n'}Line 2 with <View style={{ width: 20, height: 20, backgroundColor: 'green' }} /> {'\n'}Line 3 </Text> <Text style={{ fontSize: 12, color: 'react#666', marginBottom: 4 }}>End of line 1</Text> <Text numberOfLines={3} style={{ fontSize: 18, borderWidth: 1, marginBottom: 16, textAlign: 'justify' }}> Line 1 <View style={{ width: 20, height: 20, backgroundColor: 'orange' }} /> {'\n'}Line 2{'\n'}Line 3 </Text> <Text style={{ fontSize: 12, color: 'react#666', marginBottom: 4 }}>Short text, end</Text> <Text style={{ fontSize: 18, borderWidth: 1, marginBottom: 16, textAlign: 'justify' }}> Short text <View style={{ width: 20, height: 20, backgroundColor: 'orange' }} /> </Text> <Text style={{ fontSize: 12, color: 'react#666', marginBottom: 4 }}>Only attachment on line</Text> <Text numberOfLines={2} style={{ fontSize: 18, borderWidth: 1, textAlign: 'justify' }}> <View style={{ width: 20, height: 20, backgroundColor: 'purple' }} /> {'\n'}Second line </Text> </View> ``` and here some examples: | oldArch | newArch | newArch fixed | --------- | ------- | ------- | |<img width="250" height="2622" alt="oldArch" src="https://github.com/user-attachments/assets/aaffac4c-f3da-43ff-9560-7eb6e5258eb3" /> | <img width="250" height="2622" alt="newArch" src="https://github.com/user-attachments/assets/8905bb4e-8431-4f4d-ae46-770705520a61" /> | <img width="250" height="2622" alt="newArchFixed" src="https://github.com/user-attachments/assets/f786178e-438d-4a90-8ccf-9802181b5d8c" />| --- ## Changelog: [iOS] [Fixed] - Inline attachments after the last visible line in truncated text are now correctly marked as clipped. --- ### Output of `npx react-native-community/cli info` ``` System: OS: macOS 26.2 CPU: (12) arm64 Apple M4 Pro Memory: 982.39 MB / 48.00 GB Shell: version: "5.9" path: /bin/zsh Binaries: Node: version: 22.14.0 path: /nix/store/04fc23dsflkxl4s9p6lkigia1hq3vjp2-nodejs-22.14.0/bin/node Yarn: version: 1.22.19 path: /Users/kamil/.nix-profile/bin/yarn npm: version: 10.9.2 path: /nix/store/04fc23dsflkxl4s9p6lkigia1hq3vjp2-nodejs-22.14.0/bin/npm Watchman: version: 2024.03.11.00 path: /Users/kamil/.nix-profile/bin/watchman Managers: CocoaPods: version: 1.15.2 path: /Users/kamil/.nix-profile/bin/pod SDKs: iOS SDK: Platforms: - DriverKit 25.2 - iOS 26.2 - macOS 26.2 - tvOS 26.2 - visionOS 26.2 - watchOS 26.2 Android SDK: Not Found IDEs: Android Studio: Not Found Xcode: version: 26.2/17C52 path: /usr/bin/xcodebuild Languages: Java: Not Found Ruby: version: 2.6.10 path: /usr/bin/ruby npmPackages: "react-native-community/cli": installed: 20.0.0 wanted: 20.0.0 react: installed: 19.2.0 wanted: 19.2.0 react-native: installed: 0.83.0 wanted: 0.83.0 react-native-macos: Not Found npmGlobalPackages: "*react-native*": Not Found Android: hermesEnabled: true newArchEnabled: true iOS: hermesEnabled: true newArchEnabled: true info React Native v0.83.2 is now available (your project is running on v0.83.0). ``` --- Reviewed By: NickGerleman Differential Revision: D92991293 Pulled By: CalixTang fbshipit-source-id: ebd097c4311a18e0f628fe5dd3eec353582ce423
Summary: Pull Request resolved: react#55499 Fixed multiple lint warnings in NativeViewHierarchyManager.java: 1. ClownyBooleanExpression: Added SuppressLint for intentionally disabled DEBUG_MODE (ReactBuildConfig.DEBUG && false). This pattern is used to easily enable debug mode by changing to just ReactBuildConfig.DEBUG. 2. NullableAnnotationShouldNotAddToPrimitiveTypes: Removed Nullable from getInstanceHandle() which returns a primitive long. Primitives can't be null; this method throws exceptions instead of returning null. 3. NotInvokedPrivateMethod: Removed unused private methods arrayContains() and getReactContextForView() which were dead code. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D91992935 fbshipit-source-id: 367f0d9a6b3f5bbbf10d61c0e5ba02071eb60ee8
…ct#55515) Summary: Pull Request resolved: react#55515 Add updateRuntimeShadowNodeReferencesOnCommitThread feature flag to enable syncing the shadow nodes on commits running on the allowed thread. This feature flag is more flexible than updateRuntimeShadowNodeReferencesOnCommit, which only would sync on commits originating from the React renderer. Changelog: [Internal] Reviewed By: javache Differential Revision: D92913632 fbshipit-source-id: ff619d3f88580de2d290305d2fc67bd75d52be79
Summary: Pull Request resolved: react#55488 This diff introduces docs for the Animation Backend # Changelog [General][Added] - AnimationBackend docs Reviewed By: NickGerleman Differential Revision: D92826716 fbshipit-source-id: f3f48f66d85c6a586a520f8015a0f988decc5885
…t#55400) Summary: Since HermesV1 is enabled by default in React Native 0.84, the prebuilt Android artifacts are compiled with the flag `HERMES_V1_ENABLED`. This results in dropping some inspector symbols, in my case `enableDebugging` and `disableDebugging` from `inspector-modern/chrome/Registration.cpp`. This is problematic, because even if the app sets `hermesV1Enabled=false` in `gradle.properties`, it's shipped with binaries compiled with `hermesV1Enabled=true`. This makes it so I'm expecting symbols that should be available when `HERMES_V1_ENABLED` macro isn't defined - but they aren't available. I don't know what other symbols could lead to compilation failures, maybe shipping a whole other binary would be a better idea. For the time being I made a simple fix that would provide fallback implementations instead of not generating them at all. ## Changelog: [ANDROID] [FIXED] - Provide symbol fallbacks for `inspector-modern/chrome/Registration.h` when HermesV1 is disabled. Pull Request resolved: react#55400 Test Plan: I tested these changes (although in `Registration.h` file) in a project, not building from source, and they worked. Reviewed By: cipolleschi Differential Revision: D92964824 Pulled By: cortinico fbshipit-source-id: a87ceab6d25095062de200d1a08821dba379240d
…react#55528) Summary: Pull Request resolved: react#55528 Move the RCT_DEV_SETTINGS_ENABLE_PACKAGER_CONNECTION define from RCTDefines.h to RCTDevSettings.mm, which is its only consumer. This removes a __has_include dependency from the shared header, making RCTDefines.h usable as a standalone lightweight target without pulling in RCTPackagerConnection.h. Changelog: [Internal] Reviewed By: cipolleschi Differential Revision: D93018381 fbshipit-source-id: bff276bb788197bb59a7f4626cc355d85a8dea87
Summary: Pull Request resolved: react#55536 Changelog: [Internal] Reviewed By: vzaidman Differential Revision: D92831007 fbshipit-source-id: 60089442334ca5be6046bfd7f16c816d57e62408
Summary: Pull Request resolved: react#55537 Changelog: [General] [Added] - Create featureflag viewTransitionEnabled This diff adds a new React Native feature flag `viewTransitionEnabled` to gate the View Transition API feature. The View Transition API enables animated transitions between views, providing a smooth visual experience when navigating between screens or updating UI elements. This flag allows the feature to be gradually rolled out and tested before full enablement. The flag is added across all platform layers: - JavaScript (ReactNativeFeatureFlags.js, NativeReactNativeFeatureFlags.js) - Android Kotlin (ReactNativeFeatureFlags.kt, provider, accessor, defaults) - C++/JNI (ReactNativeFeatureFlags.cpp/h, JReactNativeFeatureFlagsCxxInterop) - Feature flag config (ReactNativeFeatureFlags.config.js) Default value is `false` to ensure the feature is opt-in during experimentation. Reviewed By: NickGerleman Differential Revision: D92713074 fbshipit-source-id: cd9e567df3135f99c8a931fffab655f16883cf94
Summary: [Android][Fixed] - Fix null pointer crash in FabricUIManagerBinding::driveCxxAnimations by adding null check for scheduler Pull Request resolved: react#55529 Crash failures during e2e: https://www.internalfb.com/intern/test/562949977559616 logview: https://fburl.com/logview/65na7gyr Reason: null dereference Pull Request resolved: react#55529 Crash failures during e2e: https://www.internalfb.com/intern/test/562949977559616 logview: https://fburl.com/logview/65na7gyr Reason: null dereference Reviewed By: javache Differential Revision: D92986523 fbshipit-source-id: 2a193cdc93a44a59fedfb7974bb694546a2000f6
Summary: Pull Request resolved: react#55501 The BaseVMFocusChangeListener inner class does not reference any members of its outer class BaseViewManager. Making it static improves memory efficiency by avoiding the implicit reference to the outer class instance. Also removed the unused type parameter <V extends View> and changed the method parameters from T to View since only View interface methods are used. changelog: [internal] internal Reviewed By: cortinico Differential Revision: D92020879 fbshipit-source-id: a26378ed6f9f5dfcc64c49aaf734559e1e7be09e
…5502) Summary: Pull Request resolved: react#55502 This change adds missing Override annotations to three methods in LayoutShadowNode that override methods from the parent class: - setFlex(float) - setFlexGrow(float) - setFlexShrink(float) These methods call super.setFlex/setFlexGrow/setFlexShrink, indicating they override parent methods and should have Override annotations for code clarity and compiler checking. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D92021000 fbshipit-source-id: 28a4d0676c18d99dddb173066964cd8c5ea321ac
…ct#55503) Summary: Pull Request resolved: react#55503 Remove unused code that was triggering lint warnings: 1. Remove `walkUpUntilNativeKindIsParent` private method that was never invoked 2. Remove `parent` variable in `applyLayoutBase` that was never accessed Both were leftover from NativeKind removal. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D92021031 fbshipit-source-id: 7549efd01ddf167df4a130c255ccf1c8d663e1d2
…55504) Summary: Pull Request resolved: react#55504 Replace `TextUtils.join(", ", features)` with the idiomatic Kotlin `features.joinToString(", ")`. This fixes the HasBetterKotlinAlternativeMethod lint warning and removes the now-unused TextUtils import. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D92021387 fbshipit-source-id: 38510d3c36ccaf899826f604ed4dd1e843ebe039
…AttributeProps (react#55505) Summary: Pull Request resolved: react#55505 Replace `TextUtils.join(", ", features)` with Kotlin's idiomatic `features.joinToString(", ")` to fix the HasBetterKotlinAlternativeMethod lint warning. Also removed the now-unused `TextUtils` import while keeping the `TextUtils.TruncateAt` import that is still in use. changelog: [internal] internal Reviewed By: alanleedev Differential Revision: D92021465 fbshipit-source-id: 3cb9e286f9f46f82817b0257dde73230ba2298d6
…t#55491) Summary: Pull Request resolved: react#55491 Fixes crash in `ShadowNode::cloneMultipleRecursive` which tried to access a missing root's family from the `childrenCount` map. The main issue is that in some cases there is no path between the given families to update and the root shadow node. The solution is to check after building the `childrenCount` map if it contains the root family and return `nullptr` otherwise. This behavior is closer to the `getAncestors` method which returns an empty array if there is no ancestor-descendant relationship. Due to this change, an additional check in `AnimationBackendCommitHook` is also required. ## Changelog: [General][Fixed] - Fixed crash in `cloneMultiple` when families have no path to root Reviewed By: zeyap Differential Revision: D92838809 fbshipit-source-id: a87de2c171e4f0f71e566806f5c012ab0bac69fd
…react#55534) Summary: Pull Request resolved: react#55534 Replace react_native_assert calls with real bounds checks in RawPropsKeyMap::at() and RawPropsKey::render() to prevent SIGILL/SIGTRAP crashes. In at(), an invalid length now returns kRawPropsValueIndexEmpty instead of trapping. In render(), an overlong prop name is clamped to kPropNameLengthHardCap - 1 instead of asserting. Changelog: [Internal] Reviewed By: mdvacca Differential Revision: D93094839 fbshipit-source-id: 29250d06cb93e84507000551a7a60a09f2df8288
Summary: Pull Request resolved: react#55542 Adds tests demonstrating that all target versions of Hermes (Legacy Hermes, Static Hermes stable, Static Hermes trunk) support multi-session debugging when integrated into React Native's CDP backend. Changelog: [Internal] Reviewed By: hoxyq Differential Revision: D90888853 fbshipit-source-id: 7ea1be837bde6d71ae2bca2b1487e00c62a44928
…ypes) to latest minors (react#55543) Summary: Pull Request resolved: react#55543 @public This diff updates several Babel packages to their latest versions: - `babel/code-frame`: 7.29.0 - `babel/generator`: 7.29.1 - `babel/parser`: 7.29.0 - `babel/template`: 7.28.6 - `babel/traverse`: 7.29.0 - `babel/types`: 7.29.0 Not bumping `core` or `runtime` here because they're a bit more involved, and I'm mainly interested in `traverse`. The packages here are the closure of traverse's dependency graph. Changelog: [Internal] Reviewed By: yungsters Differential Revision: D92983519 fbshipit-source-id: 9f2e71fb5d453606c697d52539f0056b7a29bc45
Summary: Pull Request resolved: react#55470 LogBox errors and warnings can affect performance trace measurements by triggering UI updates during profiling. This change adds a mechanism to suppress LogBox messages when CDP performance tracing is active. It clears the logbox when tracing starts and drops messages during tracing The implementation consists of: 1. **Native observer infrastructure** (`RuntimeTarget.cpp/h`, `RuntimeTargetPerformanceTracerObserver.cpp/h`): `RuntimeTarget` subscribes to the `PerformanceTracer` singleton's state changes and forwards them into JavaScript. It uses helper functions in `RuntimeTargetPerformanceTracerObserver` to install a `__PERFORMANCE_TRACER_OBSERVER__` object on the JavaScript global (a global because it needs to exist before the module system initializes), which tracks tracing state and notifies subscribers via `onTracingStateChange`. 2. **JavaScript observer** (`PerformanceTracerObserver.js`): Provides a clean API to check tracing status (`isTracing()`) and subscribe to state changes. Gracefully handles environments where native support isn't available. 3. **LogBox integration** (`LogBoxData.js`): Subscribes to the performance tracer observer and: - Clears all LogBox messages when tracing starts - Skips logging new errors and exceptions while tracing is active This ensures trace measurements are not impacted by LogBox UI rendering during profiling sessions. Changelog: [GENERAL] [CHANGED] - Suppress LogBox warnings and errors during CDP performance tracing Reviewed By: hoxyq Differential Revision: D92527815 fbshipit-source-id: 975e042766194d9702be2c9e222fd452bb99d841
Summary: Similiar to how a specific port can be set also allow for setting a specific ip for the dev server. This allows for easy configuration to aid in generating [reproducible builds](https://izzyondroid.org/docs/reproducibleBuilds/). ## Changelog: <!-- Help reviewers and the release process by writing your own changelog entry. Pick one each for the category and type tags: [ANDROID] [ADDED] - Allow specifying dev server ip via gradle property For more details, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [ANDROID] [ADDED] - Allow specifying dev server ip via gradle property Pull Request resolved: react#55531 Test Plan: 1) Add `reactNativeDevServerIp=localhost` to `gradle.properties` 2) Generate an APK 3) Analyze the APK and check that the value of the string resource type `react_native_dev_server_ip` matches the value set in `gradle.properties`. Reviewed By: cortinico Differential Revision: D93143296 Pulled By: CalixTang fbshipit-source-id: d0be23e9495f0ba1a6034dc31b6e725fd94a6a02
Summary: Pull Request resolved: react#55546 Changelog: [Internal] It looks like we have completely misunderstood the semantic of `clipChildren`. Looking at the Android [source code](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/java/android/view/ViewGroup.java;l=4607?q=setClipToPadding&ss=android%2Fplatform%2Fsuperproject&fbclid=IwY2xjawP8LExleHRuA2FlbQIxMQBzcnRjBmFwcF9pZAEwAAEeQkZx96WcTaA0mIUVGXeFAxH_aLVBMR0an0N8jeKCYX4E-j9HW0eLnzZcSJI_aem__yWzHP0_x-bPxCQS1nN19w), it seems that `setClipChildren(true)` on a ViewGroup X means clipping **each child** to the **child's own bounds**, not the parent's bound. Which means also [this](https://www.internalfb.com/code/aosp-vendor-meta-coresdk/[oculus-14.0%3Af0b9166acbb68da2e1e9f7622ba1b7fcee672ebc]/api-src/volumetricwindow/java/horizonos/view/interaction/providers/ViewInteractionNodeProvider.java?lines=502) line in HzOS is based on the same incorrect assumption. Ultimately, RN should not be populating `clipChildren` when `overflow: hidden` is set. Reviewed By: javache Differential Revision: D93237429 fbshipit-source-id: 0c3b18c829ef3880f8cc931263792c50aafa1333
Summary: Pull Request resolved: react#55547 Changelog: [Internal] It looks like we have completely misunderstood the semantic of `clipChildren`. Looking at the Android [source code](https://cs.android.com/android/platform/superproject/+/android-latest-release:frameworks/base/core/java/android/view/ViewGroup.java;l=4607?q=setClipToPadding&ss=android%2Fplatform%2Fsuperproject&fbclid=IwY2xjawP8LExleHRuA2FlbQIxMQBzcnRjBmFwcF9pZAEwAAEeQkZx96WcTaA0mIUVGXeFAxH_aLVBMR0an0N8jeKCYX4E-j9HW0eLnzZcSJI_aem__yWzHP0_x-bPxCQS1nN19w), it seems that `setClipChildren(true)` on a ViewGroup X means clipping **each child** to the **child's own bounds**, not the parent's bound. Which means also [this](https://www.internalfb.com/code/aosp-vendor-meta-coresdk/[oculus-14.0%3Af0b9166acbb68da2e1e9f7622ba1b7fcee672ebc]/api-src/volumetricwindow/java/horizonos/view/interaction/providers/ViewInteractionNodeProvider.java?lines=502) line in HzOS is based on the same incorrect assumption. Ultimately, RN should not be populating `clipChildren` when `overflow: hidden` is set. Reviewed By: Abbondanzo Differential Revision: D93238810 fbshipit-source-id: aff74b1f339fa707bcec1667580ce710a49f93dd
Summary: Pull Request resolved: react#55551 Changelog: [Internal] - Migrated 8 files in `xplat/js/react-native-github/packages/rn-tester/` from the manual `useRef(new Animated.Value(x))` pattern to the `useAnimatedValue(x)` hook. Reviewed By: fabriziocucci Differential Revision: D93258352 fbshipit-source-id: 778a2edbd3e168284c5e6b313bd3aa0102d0523f
Summary: Pull Request resolved: react#55434 This is used by `Image`, to render a different component when under a `TextAncestorContext`, but the underlying component is remapped by Fabric to instead be interpreted as `Image`. We can delete the code JS side safely, since it will use the existing registered View manager, Fabric will already redirect to. We can also then delete the redirection in Fabric, since the component is no longer ever used. See `componentNameByReactViewName.cpp`, where this is also removed. Changelog: [Internal] Reviewed By: mdvacca, javache, cortinico Differential Revision: D92481981 fbshipit-source-id: c33897efee124eaabed5447266389f34709650e0
Summary: Pull Request resolved: react#55539 Move `useAnimatedValueXY` and `useAnimatedColor` hooks into react-native-github so they can be used by OSS alongside the existing `useAnimatedValue` hook which can only take number value. ## Changelog: [General] [Added] - upstream useAnimatedColor and useAnimatedValueXY Reviewed By: fabriziocucci Differential Revision: D93125807 fbshipit-source-id: 74fb3925e8d495cddce7b28bdf852995854f85bb
…ing (react#55527) Summary: Pull Request resolved: react#55527 On API 25 (Nougat), the `DST_OUT` + `EVEN_ODD` inverse path technique in `clipWithAntiAliasing()` doesn't render correctly — it erases all image content instead of just the area outside the rounded rect. The bug manifests specifically with ReactImageView (Fresco-backed) but not plain ImageView. ReactImageView's Fresco hierarchy configures `RoundingParams.RoundingMethod.BITMAP_ONLY`, which causes the drawable chain to draw through a `BitmapShader`-based paint. This shader-based drawing interacts badly with the `EVEN_ODD` fill + `DST_OUT` compositing inside a hardware-accelerated `saveLayer` on API 24's Skia renderer. The fix replaces the `EVEN_ODD` + `DST_OUT` technique with a nested `saveLayer` using `DST_IN` compositing, following the same pattern used by Facebook's Keyframes library (`AbstractLayer.applyClip`). The mask shape is drawn into a separate layer; when restored with `DST_IN`, content is preserved only where the mask is opaque. A `drawColor(CLEAR)` call after `saveLayer` ensures the layer starts fully transparent — without this, on API 24, the layer may retain parent content, causing `DST_IN` to see non-zero alpha everywhere and clip nothing. Changelog: [Android][Fixed] - Fix image content disappearing on API 24 (Nougat) when antialiased border radius clipping is applied Reviewed By: NickGerleman Differential Revision: D92980234 fbshipit-source-id: ea6d05d8f06346371eab1c406538e91bbd78d0ae
…tency (react#54833) Summary: Pull Request resolved: react#54833 Changelog: [General][Changed] - Refactor how shadow tree revisions are promoted as latest for JS consistency Changes `LazyShadowTreeRevisionConsistencyManager::updateCurrentRevision` to pull the latest commited revision for a given surface id instead of accepting the new revision as a parameter. This way, the new revision is read from the same place for every update, which opens up the way to implement commit branching. This change will allow to always read from the JS tree revision, if it exists. Reviewed By: rubennorte Differential Revision: D88151490 fbshipit-source-id: 05b9c5e0bf87c7984513bc853a173ad25d4ff592
Summary: Pull Request resolved: react#55816 Changelog: [Internal] Reviewed By: andra-marinescu Differential Revision: D94756771 fbshipit-source-id: dd5cc72bc2ce65a9407ae728f149d2541d596ef9
…texts (react#55810) Summary: Pull Request resolved: react#55810 `DisplayMetricsHolder.initDisplayMetrics()` calls `context.getSystemService(WINDOW_SERVICE)` which throws `IllegalAccessException` on Android 11+ (API 30+) when called from a non-visual context (e.g. Application context). Multiple callers pass non-Activity contexts (ReactHostImpl, UIManagerModule, DeviceInfoModule, ReactInstance, ReactInstanceManager). This adds a try-catch around the WindowManager access as defense-in-depth. When it fails, `screenDisplayMetrics` retains the values already copied from resource display metrics via `setTo()`, which is a graceful degradation (only missing system decor dimensions like nav bar height). Changelog: [Internal] - Guard WindowManager access in DisplayMetricsHolder against non-visual contexts on API 30+ Reviewed By: javache, mdvacca Differential Revision: D94283765 fbshipit-source-id: 51c3ead60784d30d74fcb9111924aed3ca8483ec
…hDevTools`, infer from `env()` instead. (react#55805) Summary: Pull request resolved: react#55805 Currently the RN Babel preset has this surprising bit of behaviour: ```js module.exports = (options, babel) => { if (options.withDevTools == null) { const env = process.env.BABEL_ENV || process.env.NODE_ENV; if (!env || env === 'development') { return getPreset(null, {...options, dev: true}, babel); } } return getPreset(null, options, babel); }; ``` If the (undocumented, otherwise unused) `withDevTools` option is set (to anything), we will override any given value of `dev` to `true` if `BABEL_ENV` || `NODE_ENV || 'development' === 'development'`. To put that another way, with `NODE_ENV=development` and `BABEL_ENV` unset, we would always produce a dev bundle even if `{ dev: false }` Expo sets `withDevTools: false` to stop this happening, and always set `dev` (so this diff means **no observable change under Expo**): https://github.com/expo/expo/blob/4a46dbff7a5a77d9fe06d30a70d7fab38cfc7f9a/packages/babel-preset-expo/build/index.js#L235-L236 This odd-looking override was introduced in 2017 in react@bc22a4d / D5237158 as a way to gate `babel/plugin-transform-react-jsx-source`, *before the preset accepted any other options* - it was never intended to override `dev`. Now, we gate that same plugin under `options.dev`. ## Inferring `dev` when unspecified The one potentially load-bearing piece of this is that, when a consumer specifies neither `withDevTools` nor `dev` (or maybe no options at all), this code serves to infer it from `process.env.BABEL_ENV || process.env.NODE_ENV`, which is reasonable and actually closer to the way typical plugins/presets work, but a better mechanism compatible with Babel's cache is to use the `env()` API (which defaults to `process.env.BABEL_ENV || process.env.NODE_ENV`, so preserves behaviour). https://babeljs.io/docs/config-files#apienv ## This change - Removes the obsolete use of `withDevToolss`, and never overrides the explicitly-passed `dev` - Where `dev` is not specified, falls back to the Babel environment. Changelog: [General][Fixed] Babel-preset: Don't override explicitly-passed `dev` config if obsolete `withDevTools` is missing Reviewed By: huntie Differential Revision: D94660480 fbshipit-source-id: 5dfae8fb704e6881b03120cd14510795382a98ba
…ementation (react#55818) Summary: Pull Request resolved: react#55818 This unblocks the Android CI on master The deprecated getUIImplementation() method was returning null, which could cause NullPointerExceptions for callers that still depend on it. Return a new UIImplementation instance instead. Changelog: [Internal] - Fix `UIManagerModule.getUIImplementation()` to return a non-null `UIImplementation` instead of null Reviewed By: alanleedev Differential Revision: D94743629 fbshipit-source-id: df129f87c310a68634678ff7ed90e77275b02b51
Summary: Pull Request resolved: react#55767 Add new Fantom integration tests for ActivityIndicator, achieving 100% line coverage for ActivityIndicator.js (from 0%). Changelog: [Internal] Reviewed By: CalixTang Differential Revision: D94360957 fbshipit-source-id: 1312e45bdf0ed9cf6c337b101b83c7b9e456c4d1
Summary: Pull Request resolved: react#55794 Format the error messages coming from bundling to mainting the formatting and make these easier to read. Changelog: [Internal] Reviewed By: javache Differential Revision: D94611951 fbshipit-source-id: cbb8b2d1ff517b5487d4b799b1e2e3476629f84c
Summary: Pull Request resolved: react#55788 changelog: [internal] Reviewed By: mdvacca Differential Revision: D90813408 fbshipit-source-id: cc1c19728a9ccae58408d8e39b83d7121712c49d
…t#55809) Summary: When a PR targets a `-stable` branch, `github.ref_name` is the PR branch (not ending in `-stable`), so the version script was incorrectly running. Added a check for `github.base_ref` to also skip the script when the PR target branch is a stable branch. ## Changelog: [Internal] - Skip set-rn-artifacts-version for PRs targeting stable branches Pull Request resolved: react#55809 Test Plan: CI should pass without running the artifacts version script on PRs targeting stable branches. Reviewed By: cortinico Differential Revision: D94678295 Pulled By: cipolleschi fbshipit-source-id: 5809ec710c191075f1bc1528ecff95f8bd745257
…t mutate `process.env.BABEL_ENV` (react#55806) Summary: Pull Request resolved: react#55806 After react#55805, the RN Babel preset no longer reads `process.env.BABEL_ENV` directly, instead using Babel's `env()` API, which is both cache-aware and properly respects explicit `envName` config. See: - https://babeljs.io/docs/config-files#apienv - https://babeljs.io/docs/options#envname Now, instead of mutating `process.env.BABEL_ENV` to force the environment for a transform (and having to worry about restoring it to avoid side-effects), we can just specify `envName` instead. Changelog: [Internal] Reviewed By: javache Differential Revision: D94662935 fbshipit-source-id: 598a8dd53e33e4b5edfe62778a61c6bf3c48a4e7
Summary: Pull Request resolved: react#55820 changelog: [internal] Add Fantom integration test for processBoxShadow. Uses `fantom_flags enableOptimizedBoxShadowParsing:*` to automatically test both code paths. Reviewed By: joevilches Differential Revision: D94796393 fbshipit-source-id: 5e56ba3c784b896575a534daf6eb05645475354b
Summary: Pull Request resolved: react#55680 changelog: [internal] Replace TinyMap<Tag, X> with std::unordered_map<Tag, X>. There is no detectable regression in performance and code is simpler, let's remove TinyMap. ``` ┌────────────────────────────┬──────────────────┬───────────────────────────────────┬───────────────┐ │ Benchmark │ TinyMap (before) │ unordered_map + ctor size (after) │ Change │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ 100 uncollapsable views │ 1,499,917 ns │ 1,343,333 ns │ -10.4% │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ 1000 uncollapsable views │ 52,148,021 ns │ 44,131,792 ns │ -15.4% │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ 100 views large props │ 5,131,292 ns │ 4,529,937 ns │ -11.7% │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ 1000 views large props │ 82,706,813 ns │ 84,334,167 ns │ +2.0% (noise) │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ 1500 views large props │ 61,470,542 ns │ 62,976,646 ns │ +2.5% (noise) │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ deep (depth=5, breadth=4) │ 32,672,583 ns │ 30,700,542 ns │ -6.0% │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ deep (depth=7, breadth=3) │ 78,523,542 ns │ 74,121,729 ns │ -5.6% │ ├────────────────────────────┼──────────────────┼───────────────────────────────────┼───────────────┤ │ deep (depth=10, breadth=2) │ 48,328,562 ns │ 45,702,188 ns │ -5.4% │ └────────────────────────────┴──────────────────┴───────────────────────────────────┴───────────────┘ ``` Reviewed By: NickGerleman Differential Revision: D90346356 fbshipit-source-id: 90a26da056202d75bc74fec0ed00439a8dbf16cb
Summary: Pull Request resolved: react#55851 Changelog: [Internal] just missing tests Reviewed By: javache Differential Revision: D94904120 fbshipit-source-id: fb73fc92e0ea30b3e37a1fd5725d3bec1b89fb1f
react#55850) Summary: Pull Request resolved: react#55850 D91320248 removed `receiveTouches` from the `RCTEventEmitter` interface entirely. This was too big of a breaking change — ecosystem libraries that implement `RCTEventEmitter` or `RCTModernEventEmitter` and override `receiveTouches` would fail to compile. This brings back `receiveTouches` on `RCTEventEmitter` but with a default no-op implementation, so existing implementers that override it continue to compile, and new implementers don't need to provide one. Changelog: [Android][Changed] Re-added `receiveTouches` to `RCTEventEmitter` with a default no-op implementation to avoid breaking ecosystem libraries Reviewed By: cortinico Differential Revision: D94903267 fbshipit-source-id: fd89da9714b02a72c6ff271375307f620f5d2e3d
Summary: Pull Request resolved: react#55825 changelog: [internal] Hoist regex patterns to module-level constants to avoid recompiling them on every function call. This optimization targets a hotspot identified via JS sampling profiler. Benchmark results show 6-7% improvement in "views with large props and styles" tests: - render 100 views with large props/styles: 9.48ms → 8.89ms (-6.2%) - render 1500 views with large props/styles: 137.2ms → 127.5ms (-7.0%) Reviewed By: javache, NickGerleman Differential Revision: D92153667 fbshipit-source-id: d4cd98d34e968b2cea5a491ede4ed727273708cd
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
0.85-merge into 0.84-merge
Collaborator
Author
|
🤖 Copilot: Closing this replacement PR because JJ will remain the topology and evolution tool. Continue review on #3033. |
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
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.
Supersedes
Replaces #3033 with the locally recreated DAG node.
dcd3d60324c220393aae7729bb538235f3c70416ad2ef30ebf06fb1010d15bd600205c0467e09278709ce0e32fad29abc8c332b24dbeedfe522e06c14e523454f442f907a4c63505fa349c0abd8e5b07saadnajmi/dag/0.84-mergeRecreation evidence
The ordered-parent DAG, conflict provenance, consumer-liveness checks, tree-delta confinement, validation logs, and verified bundle are archived in the Phase 1 evidence package. Published as a draft replacement for review.