This repository was archived by the owner on May 13, 2019. It is now read-only.
make navbar responsive to changes in dimensions#172
Open
mvayngrib wants to merge 1 commit intotaofed:masterfrom
Open
make navbar responsive to changes in dimensions#172mvayngrib wants to merge 1 commit intotaofed:masterfrom
mvayngrib wants to merge 1 commit intotaofed:masterfrom
Conversation
fd82f25 to
ffeee8e
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[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.