Remove setViewZIndex and associated state from BaseViewManager#56717
Closed
javache wants to merge 1 commit intofacebook:mainfrom
Closed
Remove setViewZIndex and associated state from BaseViewManager#56717javache wants to merge 1 commit intofacebook:mainfrom
javache wants to merge 1 commit intofacebook:mainfrom
Conversation
Summary: This is a follow-up to D91121582 which deprecated ReactZIndexedViewGroup and removed custom draw order logic from ReactViewGroup. That diff kept `setZIndex()` in BaseViewManager and BaseViewManagerDelegate for backward compatibility, to be removed in a follow-up. This diff completes that cleanup by removing: - The `setZIndex` method from `BaseViewManager` (which called `ViewGroupManager.setViewZIndex` and triggered `updateDrawingOrder()` on the parent) - The `Z_INDEX` case from `BaseViewManagerDelegate` - The `zIndexHash` WeakHashMap, `setViewZIndex`, and `getViewZIndex` static methods from `ViewGroupManager`'s companion object - The `ViewGroupDrawingOrderHelper` class, which was dead code (marked `LegacyArchitecture`, no longer imported anywhere) and depended on the removed `getViewZIndex` Z-index is now fully managed at the C++ Fabric layer, and these Android-side mechanisms are no longer needed. Changelog: [Android][Removed] Removed ViewGroupDrawingOrderHelper and ReactZIndexedViewGroup Differential Revision: D104101783
|
@javache has exported this pull request. If you are a Meta employee, you can view the originating Diff in D104101783. |
Collaborator
|
This pull request was successfully merged by @javache in c49aa90 When will my fix make it into a release? | How to file a pick request? |
|
This pull request has been merged in c49aa90. |
j-piasecki
pushed a commit
to software-mansion/react-native-gesture-handler
that referenced
this pull request
May 8, 2026
## Summary - Remove the `getChildInDrawingOrderAtIndex` abstraction from `ViewConfigurationHelper` and its implementation in `RNViewConfigurationHelper` - Inline `viewGroup.getChildAt(i)` at the two call sites (`GestureHandlerOrchestrator` and `HoverGestureHandler`) - `ReactViewGroup.getZIndexMappedChildIndex` is a legacy architecture API that has been a no-op (returns its input unchanged) and has been removed in facebook/react-native#56717 ## Test plan - Android build via `cd apps/basic-example && yarn android`
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.
Summary:
This is a follow-up to D91121582 which deprecated ReactZIndexedViewGroup and removed custom draw order logic from ReactViewGroup. That diff kept
setZIndex()in BaseViewManager and BaseViewManagerDelegate for backward compatibility, to be removed in a follow-up.This diff completes that cleanup by removing:
setZIndexmethod fromBaseViewManager(which calledViewGroupManager.setViewZIndexand triggeredupdateDrawingOrder()on the parent)Z_INDEXcase fromBaseViewManagerDelegatezIndexHashWeakHashMap,setViewZIndex, andgetViewZIndexstatic methods fromViewGroupManager's companion objectViewGroupDrawingOrderHelperclass, which was dead code (markedLegacyArchitecture, no longer imported anywhere) and depended on the removedgetViewZIndexZ-index is now fully managed at the C++ Fabric layer, and these Android-side mechanisms are no longer needed.
Changelog: [Android][Removed] Removed ViewGroupDrawingOrderHelper and ReactZIndexedViewGroup
Differential Revision: D104101783