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

Expo router with orientation unlocked and new architecture collapsing area unexpectedly. #28984

Open
psquizzle opened this issue May 20, 2024 · 0 comments
Labels
needs review Issue is ready to be reviewed by a maintainer Router expo-router

Comments

@psquizzle
Copy link

Minimal reproducible example

https://github.com/psquizzle/expo-51-orientation-issue.git

Which package manager are you using? (Yarn is recommended)

yarn

If the issue is web-related, please select the bundler (web.bundler in the app.json)

None

Summary

When using ScreenOrientation.unlockAsync(); from expo-orientation views appear to collapse to fit the previous height / width based on the previous orientation.

This only happens with:

  • Non-development build (works as expected in dev builds).
  • New architecture enabled (works as expected when using old arch.

To reproduce bug, build the linked repository to a non-dev build. Go to the second tab, turn phone to landscape rotate back to portrait and navigate back to the first tab. The first tabs layout will be wrong.

AF3FB1A2-FE07-4EC4-B864-5CF03DB95A89_1_105_c

4719784A-3C25-4A2F-940F-385974B375A3_1_105_c

Environment

expo-env-info 1.2.0 environment info:
System:
OS: macOS 14.5
Shell: 5.9 - /bin/zsh
Binaries:
Node: 21.6.2 - /opt/homebrew/bin/node
Yarn: 1.22.19 - /usr/local/bin/yarn
npm: 10.2.4 - /opt/homebrew/bin/npm
Watchman: 2023.12.04.00 - /opt/homebrew/bin/watchman
Managers:
CocoaPods: 1.14.3 - /Users/peter/.rbenv/shims/pod
SDKs:
iOS SDK:
Platforms: DriverKit 23.5, iOS 17.5, macOS 14.5, tvOS 17.5, visionOS 1.2, watchOS 10.5
IDEs:
Android Studio: 2023.1 AI-231.9392.1.2311.11330709
Xcode: 15.4/15F31d - /usr/bin/xcodebuild
npmPackages:
expo: ~51.0.2 => 51.0.2
expo-router: ~3.5.11 => 3.5.11
react: 18.2.0 => 18.2.0
react-dom: 18.2.0 => 18.2.0
react-native: 0.74.1 => 0.74.1
react-native-web: ~0.19.10 => 0.19.11
npmGlobalPackages:
eas-cli: 9.0.7
Expo Workflow: bare

@psquizzle psquizzle added needs validation Issue needs to be validated Router expo-router labels May 20, 2024
@expo-bot expo-bot added needs review Issue is ready to be reviewed by a maintainer and removed needs validation Issue needs to be validated labels May 20, 2024
@psquizzle psquizzle changed the title Expo router with orientation unlocked collapsing area although flex:1, corresponding to previous width / height. Expo router with orientation unlocked and new architecture collapsing area unexpectedly. May 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs review Issue is ready to be reviewed by a maintainer Router expo-router
Projects
None yet
Development

No branches or pull requests

2 participants