Rapid icon indicating copy to clipboard operation
Rapid copied to clipboard

Handle orientation change

Open bhousel opened this issue 6 months ago • 0 comments

I would say yeah go with that- but pick whichever axis is longer to do the accordion thing (say, if the user has their phone on its side, we should absolutely change the flex flow and collapse left-right)

Originally posted by @Bonkles in https://github.com/facebook/Rapid/issues/1497#issuecomment-2261489632

This is a good idea that came up on the "sidebar fixes" discussion - we should handle changes in the screen orientation, so that if a user is on mobile (or a desktop user just resizes their browser window to be narrow) our sidebar/inspector can relocate to a better place.

There is a browser standard interface for noticing when the screen changes, also CSS media properties that can probably detect this.
https://developer.mozilla.org/en-US/docs/Web/API/ScreenOrientation https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries

bhousel avatar Aug 01 '24 13:08 bhousel