fix(Main): switcher state and breakpoints between is_mobile#735
Merged
Conversation
Owner
Author
|
Merging and hoping for the best |
|
Works for me on an initial test. It started with the view buttons and they're appearing and disappearing as expected so far 🙂 |
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 join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
fix: #734
To avoid a breakpoint condition hell, let's just wrap it in another stack.
The problem:
We want the main window to show the main view switcher and switcher bar ONLY in narrow mode (
is-mobile). To achieve the bottom bar one, is-mobile is bound to its visibility and the main view breakpoint is bound to its reveal property. That way, there are two visibility states. That is not the case for the switcher however, if the switcher is not visible, the headerbar stack cannot set it as the visible child, so both the breakpoint condition and theis-mobileone need to be in sync. That led to the previous very complicated solution.This time let's just have 2 visibility states for it, like the switcher bar, using two stacks, one for
is-mobileand one for the breakpoint.