-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix sticky header #7668
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
Fix sticky header #7668
+20
−3
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
bartlomiejbloniarz
approved these changes
Jun 17, 2025
piaskowyk
approved these changes
Jun 17, 2025
This was referenced Jun 18, 2025
This was referenced Jun 25, 2025
MatiPl01
pushed a commit
that referenced
this pull request
Jun 26, 2025
<!-- Thanks for submitting a pull request! We appreciate you spending the time to work on these changes. Please follow the template so that the reviewers can easily understand what the code changes affect. --> This PR fixes sticky header on both Android and iOS. Together with @bartlomiejbloniarz we found out that sticky header issue can be fixed by commenting out `// isPaused_ = true;` line. However, this can lead to starvation of commits coming from React. So the best workaround so far is to pause Reanimated commits only in `ReanimatedCommitHook` only for commits coming from React and skip pausing them for other commits like state updates after scroll. Note that this PR uses the new signature of `shadowTreeWillCommit` method which is available from RN 0.80. <video src="https://github.com/user-attachments/assets/ad36b502-88c5-4215-9ee6-51c26e9bb05c" alt="after" /> <!-- Provide a minimal but complete code snippet that can be used to test out this change along with instructions how to run it and a description of the expected behavior. -->
MatiPl01
added a commit
that referenced
this pull request
Jun 26, 2025
Cherry-pick of the #7668 --------- Co-authored-by: Tomasz Zawadzki <[email protected]>
github-merge-queue bot
pushed a commit
that referenced
this pull request
Jul 23, 2025
## Summary This PR reverts the conditional skip of reanimated commits (#7668). This breaks sticky headers, but fixes starvation issues, that would manifest on C++ state updates. To fix the stick header one must use the `DISABLE_COMMIT_PAUSING_MECHANISM` feature flag in reanimated and the `preventShadowTreeCommitExhaustionWithLocking` in react-native. ## Test plan
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 PR fixes sticky header on both Android and iOS.
Together with @bartlomiejbloniarz we found out that sticky header issue can be fixed by commenting out
// isPaused_ = true;
line. However, this can lead to starvation of commits coming from React. So the best workaround so far is to pause Reanimated commits only inReanimatedCommitHook
only for commits coming from React and skip pausing them for other commits like state updates after scroll.Note that this PR uses the new signature of
shadowTreeWillCommit
method which is available from RN 0.80.ScreenRecording_06-17-2025.13-15-51_1.MP4