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

[WIP] Fix useWindowDimensions returns swapped height and width in iOS #9

Closed
wants to merge 1 commit into from
Closed

Conversation

azimgd
Copy link

@azimgd azimgd commented Apr 26, 2022

Summary

We should handle following scenarios properly when the app is in foreground:

  • Rotating device should emit dimensions based with respect to orientation [implemented in RN]
  • Only unique dimensions should be emitted [implemented in RN]
  • App going background and then foreground should only emit foreground dimensions [bug in RN, to be fixed]
  • Split screen mode should emit correct dimensions [buggy, to be fixed]
  • Split screen resize should emit correct dimensions [implemented in RN]

Fixes useWindowDimensions() returns swapped height and width in iOS

Expensify/App#2727

Changelog

[CATEGORY] [TYPE] - Message

Test Plan

  • Open an app on iPad and watch for useWindowDimensions result
  • Rotating orientation should return actual dimensions
  • Rotating orientation in landscape should not first emit dimensions for portrait and then for landscape
  • Split screen should return actual dimensions
  • Resizing split screen should return actual dimensions

- App going background and then foreground should only emit foreground dimensions
- Split screen mode should emit correct dimensions
- Split screen resize should emit correct dimensions
@azimgd azimgd changed the title Fix useWindowDimensions returns swapped height and width in iOS [WIP] Fix useWindowDimensions returns swapped height and width in iOS Apr 26, 2022
@azimgd azimgd marked this pull request as draft April 26, 2022 16:53
@azimgd azimgd closed this Oct 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[$16,000] Let's fix a React Native issue -- useWindowDimensions() returns swapped height and width in iOS
1 participant