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

Breakpoints don't trigger on iPadOS when resizing a window with Stage Manager #208

Closed
vanstinator opened this issue Jun 3, 2024 · 4 comments · Fixed by #209
Closed

Breakpoints don't trigger on iPadOS when resizing a window with Stage Manager #208

vanstinator opened this issue Jun 3, 2024 · 4 comments · Fixed by #209

Comments

@vanstinator
Copy link
Contributor

Description

iPadOS provides some primitive window management features through Stage Manager. When resizing a React Native view using Unistyles and breakpoints one would expect that as you make the window smaller your UI will re-render with the correct styling for the given set of breakpoints. Instead the UI stays the same and overflows outside of the bounds of the application window.

I'm happy to put together an example repo if necessary, but this behavior seems trivial to reproduce in any repo that I've tried it in.

Interestingly if I console.log the Dimensions.width or Dimsensions.height from the Dimensions package in react-native the values update in realtime as I resize the window. So it seems the RN runtime is detecting the size.

Steps to reproduce

  1. Grab an iPad or an iPad simulator
  2. Enable Stage Manager - https://support.apple.com/en-us/105075
  3. Install your favorite React Native app that uses Unistyles
  4. Change the size of the screen and observe the styles don't update accordingly

Snack or a link to a repository (optional)

No response

Unistyles version

2.7.2

React Native version

0.74.1

Platforms

iOS

Engine

Hermes

Architecture

Paper (old)

@vanstinator vanstinator changed the title Breakpoints don't trigger on iPad OS when making a window smaller with Stage Manager Breakpoints don't trigger on iPadOS when making a window smaller with Stage Manager Jun 3, 2024
@vanstinator vanstinator changed the title Breakpoints don't trigger on iPadOS when making a window smaller with Stage Manager Breakpoints don't trigger on iPadOS when resizing a window with Stage Manager Jun 3, 2024
@jpudysz
Copy link
Owner

jpudysz commented Jun 4, 2024

Hey 👋 thanks for the report.
Should be easy to do (I guess), and I'm willing to support it as I'm also building cross platform.

Will get back to you, when I will have a plan when to release it.

@vanstinator
Copy link
Contributor Author

I was interesting in learning more about unistyles and wanted to take a stab at this myself. It ended up being fairly simple!

#209

@jpudysz
Copy link
Owner

jpudysz commented Jun 4, 2024

How cool is that ?! Thank you!
I will review and test it. So most likely it will be merged in 1-2 days.

@vanstinator
Copy link
Contributor Author

How cool is that ?! Thank you!

No problem! Happy to help!

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 a pull request may close this issue.

2 participants