Skip to content
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

fix: remove workaround for removing clipped subviews #2596

Merged
merged 2 commits into from
Jan 16, 2025

Conversation

kkafar
Copy link
Member

@kkafar kkafar commented Dec 30, 2024

Description

This PR removes the workaround introduced in series of PRs (listed chronologically here):

  1. fix(Android): incorrect childCount in removeViewAt when using flatlist on fabric #2307
  2. fix(Android): going back on fabric with nested list #2383
  3. fix(Android): going back on fabric with removeClippedSubviews #2495
  4. fix(Android): prevent crash when we can not insert any subviews into child #2531

For detailed description of error mechanism and broader discussion please refer to:

  1. my comment on #2495,
  2. my fix to RN core

tldr: When popping screen on Fabric we marked the views as "transitioning" and this led to view being effectively miscounted
during removal by view groups that supported react-native's subview clipping mechanism.

The issue has been present most likely in every version of the library when running on Android & Fabric, but it arose few months ago due to broader
adoption of the new architecture.

facebook/react-native#47634 is supposed to fix the underlying issue in react-native's core.

Changes

Removed the workaround code from Screen implementation on Android.

The

has been released with 0.77.0-rc.3 and followup small fixup:

has been released with 0.77.0-rc.4.

Therefore, with landing this PR we should limit our support on Fabric to 0.77.0.

Test code and steps to reproduce

Test2282 - note that there are few testing variants available there, you just need to comment (out) some parts of the code.

Checklist

  • Included code example that can be used to test this change
  • Ensured that CI passes

@kkafar kkafar changed the base branch from main to @kkafar/support-0.77 December 30, 2024 13:47
Base automatically changed from @kkafar/support-0.77 to main January 10, 2025 10:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant