Breakpoints don't trigger on iPadOS when resizing a window with Stage Manager
vanstinator opened this issue · comments
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
- Grab an iPad or an iPad simulator
- Enable Stage Manager - https://support.apple.com/en-us/105075
- Install your favorite React Native app that uses Unistyles
- 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)
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.
I was interesting in learning more about unistyles and wanted to take a stab at this myself. It ended up being fairly simple!
How cool is that ?! Thank you!
I will review and test it. So most likely it will be merged in 1-2 days.
How cool is that ?! Thank you!
No problem! Happy to help!