Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

[v1.0.0-rc3] Splash screen jumps on initial load (android prebuild) #240

Closed
jjenzz opened this issue Jan 31, 2023 · 5 comments
Closed

[v1.0.0-rc3] Splash screen jumps on initial load (android prebuild) #240

jjenzz opened this issue Jan 31, 2023 · 5 comments
Labels
external Issue cannot be solved by modifying the code in this repo

Comments

@jjenzz
Copy link

jjenzz commented Jan 31, 2023

Summary

when moving to prebuild (npx expo prebuild) from a fresh install (npx create-react-native-app -t with-router) the splash screen will jump up for one frame on android during app load. it also still occurs when upgrading to 1.0.0-rc3.

you can slow the following video frame-by-frame to see what i mean:

CleanShot.2023-01-31.at.14.22.06.mp4

the two frames where the jump occurs (i've drawn a redline to highlight the difference in position):

image

while it is hard to catch this with the naked eye in this demo, the jump is much more prominent in our real-world app that takes a little longer to load.

i'm not entirely sure if this is a router issue or more generic expo issue so happy to move it to the correct place if there is somewhere more suitable.

Minimal reproducible example

https://github.com/jjenzz/expo-splash-jump

@jjenzz jjenzz changed the title [v1.0.0-rc3] Splash screen jumps on initial load [v1.0.0-rc3] Splash screen jumps on initial load (android prebuild) Jan 31, 2023
@EvanBacon
Copy link
Contributor

It's most likely not an Expo Router issue. I'd imagine the problem is related to the status bar being "translucent" (ie. position: absolute), this causes the quick shift upward. https://docs.expo.dev/versions/latest/config/app/#translucent

@jjenzz
Copy link
Author

jjenzz commented Feb 1, 2023

to clarify, this issue doesn't occur in a managed workflow, simply moving from managed to bare introduces it afaict.

i have not rendered a StatusBar component anywhere in linked source and haven't configured one in app.json so i am curious what difference moving to prebuild could have here? does it make the status bar translucent?

EDIT: i've recreated this issue in the expo repo as it sounds like that is a more suitable place for it. lmk if not :)

@EvanBacon
Copy link
Contributor

@jjenzz you can try removing the StatusBar component that is rendered in Expo Router but it should be benign.

There is no bare/managed anymore (we need to improve our docs on this). "Managed" is now bare + prebuild. You can either manually run prebuild, or use EAS Build which runs prebuild to generate the native code required for building meaning there should be virtually no difference (outside of minor build-time changes in Expo Go).

The previous "managed workflow" would embed the JS in a shell application which would never match the "bare workflow" variation, we fully removed this by migrating to EAS Build.

@jjenzz
Copy link
Author

jjenzz commented Feb 2, 2023

i am perhaps confusing things by using the wrong terminology in that case, apologies. but what i mean is that npx create-react-native-app -t with-router and then npm run android does not have the issue, but as soon as i run npx expo prebuild to create the ios and android folders, an npm run android will have this issue.

thanks for the status bar suggestion, i will give that a try.

@EvanBacon EvanBacon added the external Issue cannot be solved by modifying the code in this repo label Feb 9, 2023
@matuskropuch
Copy link

For me, removing the StatusBar as you have suggested fixes the jump.

@expo expo locked and limited conversation to collaborators May 21, 2023
@EvanBacon EvanBacon converted this issue into discussion #595 May 21, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
external Issue cannot be solved by modifying the code in this repo
Projects
None yet
Development

No branches or pull requests

3 participants