The theme switch sits in the top-right corner, outside the account menu; the menu should be the corner and the switch needs a better place #197
Labels
No labels
accessibility
authentication
breaking change
bug
documentation
enhancement
interface
internationalisation
observability
security
tier
1
tier
2
tier
3
tier/4
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Postulo/postulo#197
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Observation
The last thing at the top right of every page is the theme switch, not the account menu.
The header's right-hand group (
templates/base.html:80-117) runs, in order: the searchbox, the account menu, then
{% include "core/partials/theme_switch.html" %}. So thecorner a person reaches for their own name, their settings and Sign out — the corner
every application puts the account in, and the one the wiki's Getting started points at
("Your name, top right → Your details") — holds a sun-moon-monitor button, and the menu
sits one control in from the edge.
The account menu should be the outermost control at the top right, and the theme switch
needs a better place than beside it.
What the switch is, and where else it already lives
core/partials/theme_switch.htmlis one button with three states — light, dark, matchthe operating system — posting to
accounts:theme, applied byapp.js(:179-205)before the reply arrives. It is a convenience, and it is the second way to do the same
thing: Settings → Appearance is the explicit one, and the wiki says exactly that
("The switch at the top right of every page cycles through the same three; this is the
explicit version",
Getting-started.md:26). Nothing depends on the switch being in theheader: the script finds it by
data-theme-switchwherever it is, and the CSS picks theicon from
data-currenton the form.Where it could go
Three honest candidates, in the order they seem right:
Theme: dark (press to cycle), Server settings. It is a preference of the person
whose menu it is, the menu is already the one disclosure on the right, and the corner
then holds one control. The row is a form, as Sign out already is (
base.html:110),so the menu already knows how to hold a POST. Cost: the switch is one click further
away, which for a three-state cycle nobody presses twice a day is nothing.
a chrome-level preference sits on a good many sites. Cost: below the fold on a long
page — the same fold #195 is about.
away. Cost: the "apply before the reply" immediacy is lost, and somebody on a shared
machine who wants the page dark now has to find the setting.
Whichever it is, the theme switch leaves the header row, and the account menu becomes the
last child of the
ms-autogroup.What moves with it
tests/test_header.pysays, in its docstring and intest_the_right_side_holds_the_account_menu_and_the_theme_switch, that the right sideholds the menu and the switch, and
test_signed_out_visitors_see_neither_menu_nor_switchasserts the switch's absence for a visitor. Both change to say the new truth.
tests/e2e/test_accessibility.py:40excuses the switch and the menu from the landmarkrule because of where they sit; inside the menu or the footer that excuse changes shape.
Getting-started.md:26names the top right; the sentence moves with the button.mdthe search box is hidden and the row is wordmark,Menu, then the right group. The account menu becoming the corner control on a phone is
the same change and needs no separate treatment; the switch inside the menu is one row
fewer on a 320-pixel row that #165 already fought for.
Not in this issue: what the switch does, or the three states.