Skip to content

Conversation

rozele
Copy link
Contributor

@rozele rozele commented Mar 7, 2025

Summary:
This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in onViewRemoved prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was added to fix a bug in Reanimated (see #43389). cc @bartlomiejbloniarz to confirm if this Reanimated issue resurfaces from this change.

Fixes #49838

Changelog

[Android][Fixed] Fixes issue with z-indexed sibling removal

Differential Revision: D70795631

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner labels Mar 7, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70795631

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70795631

@rozele rozele force-pushed the export-D70795631 branch from 151f67c to fcc1631 Compare March 7, 2025 19:02
rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 7, 2025
Summary:

This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling.

## Changelog

[Android][Fixed] Fixes issue with z-indexed sibling removal

Differential Revision: D70795631
@rozele rozele force-pushed the export-D70795631 branch from fcc1631 to 7d07edb Compare March 7, 2025 19:03
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70795631

rozele added a commit to rozele/react-native-macos that referenced this pull request Mar 7, 2025
Summary:
Pull Request resolved: facebook#49900

This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling.

## Changelog

[Android][Fixed] Fixes issue with z-indexed sibling removal

Differential Revision: D70795631
@rozele rozele force-pushed the export-D70795631 branch from 7d07edb to 729a0ce Compare March 7, 2025 19:08
@bartlomiejbloniarz
Copy link
Contributor

Hi! We also introduced a change in reanimated so that even without the change in RN the problem was fixed. I created the PR because it seemed to me that removing already removed views shouldn't decrease the counter. But maybe there is some flow, where the view is already removed when it gets to this function (and it's a valid removal).

Summary:

This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in `onViewRemoved` prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was [added](facebook#43389) to fix a bug in Reanimated. cc bartlomiejbloniarz to confirm if [this Reanimated issue](software-mansion/react-native-reanimated#5715) resurfaces from this change.

Fixes facebook#49838

## Changelog

[Android][Fixed] Fixes issue with z-indexed sibling removal

Differential Revision: D70795631
@rozele rozele force-pushed the export-D70795631 branch from 729a0ce to 1c52230 Compare March 10, 2025 17:37
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D70795631

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @rozele in 34ae9fa

When will my fix make it into a release? | How to file a pick request?

@react-native-bot react-native-bot added the Merged This PR has been merged. label Mar 10, 2025
@facebook-github-bot facebook-github-bot added the Merged This PR has been merged. label Mar 10, 2025
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 34ae9fa.

@fbp93
Copy link

fbp93 commented Mar 13, 2025

@bartlomiejbloniarz @RSNara Can we please release this fix for 0.77 ? 🙏 Also, Is it enough this change or you must release also the changes mentioned here to make it work?

react-native-bot pushed a commit that referenced this pull request Apr 1, 2025
Summary:
Pull Request resolved: #49900

This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in `onViewRemoved` prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was [added](#43389) to fix a bug in Reanimated. cc bartlomiejbloniarz to confirm if [this Reanimated issue](software-mansion/react-native-reanimated#5715) resurfaces from this change.

Fixes #49838

## Changelog

[Android][Fixed] Fixes issue with z-indexed sibling removal

Reviewed By: NickGerleman, cipolleschi

Differential Revision: D70795631

fbshipit-source-id: 500af92226be29af73f36f911ffff27a0c083ae9
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @rozele in 31e09bc

When will my fix make it into a release? | How to file a pick request?

react-native-bot pushed a commit that referenced this pull request Jun 4, 2025
Summary:
Pull Request resolved: #49900

This appears to fix an issue where removing a sibling with zIndex breaks drawing of the next sibling. The theory is that eager return in `onViewRemoved` prevents the view from reverting into a state where it no longer uses custom draw order. However, tracing back history, this eager return was [added](#43389) to fix a bug in Reanimated. cc bartlomiejbloniarz to confirm if [this Reanimated issue](software-mansion/react-native-reanimated#5715) resurfaces from this change.

Fixes #49838

## Changelog

[Android][Fixed] Fixes issue with z-indexed sibling removal

Reviewed By: NickGerleman, cipolleschi

Differential Revision: D70795631

fbshipit-source-id: 500af92226be29af73f36f911ffff27a0c083ae9
@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @rozele in eeb9612

When will my fix make it into a release? | How to file a pick request?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0.77: Animated make some views disappearing (Android)
5 participants