Due to an influx of spam, we have had to impose restrictions on new accounts. Please see this page for instructions on how to get full permissions. Sorry for the inconvenience.
Our regular stack switcher pattern doesn't work on mobile sizes, because
it uses horizontally stacked text labels, which means it can grow quite wide depending on the language
often there are buttons in the header bar in addition to the switcher
it's at the top of the screen, which is hard to reach on mobile
The proposed solution is a new switcher which uses an icon in addition to the label, and changes its layout depending on the available space. At large sizes, the icons and labels can be stacked horizontally, but at smaller sizes this can be changed to vertical, with a smaller text size. On very small sizes, which are mostly used in the portrait orientation on phones, the switcher moves to the bottom, both to have more space and be easier to reach.
@zbrown How is the switcher progressing? I tested your branch and it seems to work well already. I will need it pretty soon to finish the preferences window. :)
@adrien.plazas Yes, sorry life has got busy for me recently
No need to apologize, it's normal. :)
Pushed my latest changes if you can polish it off, will be nice to see it used
Great! I'll check that out. :D
I really don't like how the custom css is loaded at the moment, not sure what the best solution is there
I don't know what you talk about exactly, but regarding style changes the best is likely to submit thm to Adwaita, even if it means having to depend on a newer version of GTK.
On Matrix we discussed a widget that could contain the header bar's switcher and the window title to display when the action bar is visible. I think I found a nice way to implement that widget.
That widget would be a container able to contain any number of children. It would display only one of its children at a time, and potentially transitioning with a crossfade animation. The order of its children would matter as it would display the first of its children that fits into its available size. Its size request would be the one of its smallest child. If a child's size is larger than its previous sibbling's, it will simply be ignored and won't be displayed, regardless of the available size, as by definition there would always be a previous sibbling that fits in.
In practice, that means that if we put a switcher and a title label into such a widget and the title is larger than the switcher, the title label would simply never be shown.
The visible child would be RO-accessible, meaning that you can know when the switcher is visible and when the title is, allowing to trigger the visibility of the actionbar switcher accordingly.
Edit: I don't think such a widget could work for both orientation, so it likely should be a GtkOrientable.
Edit2: We may also want children to have arbitrary breakpoints to use in place of the minimum size to know which widget to show but which doesn't affect the size request, so the users don't have to work around this by manually setting a size request.