-
-
Notifications
You must be signed in to change notification settings - Fork 538
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
Header jump when animation is set for bottom tab navigator #2536
Comments
@matinzd This doesn't fix the issue. |
That is the same issue but it's not caused by the same thing. Now the new tab animation is causing this issue which is not the same as that one. The workaround may work but it's not a correct solution. I also usually use scroll view with automatic inset adjustment so that I don't need to take care of the header height. |
I agree with you. And that hack actually doesn't fix the issue. |
Alright, I could pretty much narrow it down. It is indeed related to the new animation I guess, and in my case it was triggered because we enabled It's now also reproducible in the Expo Snack using stock react navigation v7. https://snack.expo.dev/@hirbod/native-stack-navigator-header-to-non-header I suspect this PR caused it: https://github.com/software-mansion/react-native-screens/pull/2477 ScreenRecording_12-05-2024.03-40-32_1.MP4EDIT: 100% isolated reproducible with react-native-screens alone. |
Any attempts to fix this? |
I also found out that useHeaderHeight changes to some weird values when screen is mounted within tab navigation. Here is how useHeaderHeight behaves when component re-renders when it's inside tab navigator:
Here is how it behvaes when we navigate to another stack:
You can see it here as well: |
UPDATE
I updated the reproducible. Please take a look at it. This is so annoying. |
I digged more into the react navigation code and I found that those incorrect values are being emitted from |
Sorry for mentioning you here but It's been a long time I opened this issue and I am still waiting for your response. I know you are very busy with all the new arch changes but it would be so helpful if we can also get this issue fixed. I am also available to hop on a call with you on discord to dig into this. Thank you @kkafar for all the work you are putting in for this repo! |
I haven't had opportunity to work on this yet, but I should have capacity to look into it tomorrow / at Monday. |
Description
Moving this issue from react-navigation/react-navigation#12273.
The header will have an initial jump when animation is set for tab navigator. It doesn't matter if it's set to
fade
orshift
.Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-11-18.at.14.15.22.mp4
Expected behavior
The header should not flicker or have jumps.
Simulator.Screen.Recording.-.iPhone.16.Pro.-.2024-11-18.at.14.15.10.mp4
Steps to reproduce
Set bottom tab animation to
fade
orshift
.Snack or a link to a repository
https://github.com/matinzd/ReactNavigationHeaderFlicker
Screens version
4.1.0
React Native version
0.76.2
Platforms
iOS
JavaScript runtime
Hermes
Workflow
React Native (without Expo)
Architecture
Fabric (New Architecture)
Build type
Debug mode
Device
iOS simulator
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: