Skip to content
This repository has been archived by the owner on May 13, 2019. It is now read-only.

make navbar responsive to changes in dimensions #172

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

mvayngrib
Copy link
Contributor

[don't merge yet]

the issue i was having was that the navbar's right button wasn't adapting to screen resizes

this code mostly works (see edge case below), but it seems like it's going to be a pattern for many web components, as windows are much more flexible than on mobile. I wonder if we should factor out some of this code into a DimensionsAwareComponent and make other components that want to re-render on resize/orientation change extend from it. Internally in my own project, i'm using https://github.com/mvayngrib/react-native-orient for this kind of stuff

edge case: on the very first time I resize full screen to half-screen (I'm using the Spectacle App on OSX), the right button's css doesn't update, though the re-render does happen and with the correct style values. After that, it works fine, whether via Spectacle, or just dragging the edges.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant