Skip to content

fix(Main): switcher state and breakpoints between is_mobile#735

Merged
GeopJr merged 1 commit intomainfrom
fix/main/switcher-state-breakpoints-is-mobile
Jan 4, 2024
Merged

fix(Main): switcher state and breakpoints between is_mobile#735
GeopJr merged 1 commit intomainfrom
fix/main/switcher-state-breakpoints-is-mobile

Conversation

@GeopJr
Copy link
Owner

@GeopJr GeopJr commented Jan 2, 2024

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 the is-mobile one 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-mobile and one for the breakpoint.

@GeopJr
Copy link
Owner Author

GeopJr commented Jan 4, 2024

Merging and hoping for the best

@GeopJr GeopJr merged commit 2310f18 into main Jan 4, 2024
@GeopJr GeopJr deleted the fix/main/switcher-state-breakpoints-is-mobile branch January 4, 2024 17:57
@IBBoard
Copy link

IBBoard commented Jan 5, 2024

Works for me on an initial test. It started with the view buttons and they're appearing and disappearing as expected so far 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Headerbar conditions regression

2 participants