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(router): Drawer layout incorrect position on initial load #24197

Merged
merged 5 commits into from
Sep 4, 2023

Conversation

marklawlor
Copy link
Contributor

Why

expo/router#837

ExpoRouter provides a SafeAreaContextProvider with an initial value of 0 for all dimensions. The drawer layout uses these dimensions to calculate the necessary x offset for its 'closed' state. These calculations assume a minimum screen size, so having 0 caused it to initially render on the screen

How

We only need these initial values for static rendering, so now we only provide them when rendering SSR.

Test Plan

Tested manually by creating a new project.

Checklist

@marklawlor marklawlor requested a review from EvanBacon as a code owner August 31, 2023 07:46
@expo-bot expo-bot added the bot: passed checks ExpoBot has nothing to complain about label Aug 31, 2023
@EvanBacon EvanBacon merged commit fdcbdd0 into main Sep 4, 2023
@EvanBacon EvanBacon deleted the marklawlor/router/initial-layout branch September 4, 2023 20:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bot: passed checks ExpoBot has nothing to complain about
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants