Automations and webhooks for the AT Protocol airglow.run

fix(header): make the active account stand out in the account menu #108

Open opened by tyb.there-hugo.dev

Follow-up to #35.

Problem #

In the avatar menu from #35, the active account is hard to pick out. Its only mark is a small accent check, which sits further right than the other rows' content, almost against the menu's border. A switchable account under the pointer or keyboard focus gets the grey surfaceHover background, so the account you are not on looks more highlighted than the one you are.

The rows under the divider don't match either: "View profile" and "Add account" render larger and at normal weight, while "Sign out @handle" and the account rows are fontSize.sm at medium weight.

Evidence #

  • app/components/Layout/Header/index.tsx:41: the active row is a bare <li class={s.menuRow} aria-current="true"> with the Check icon. The other account rows are a <button> or <a> with s.menuItem inside their <li>.
  • app/components/Layout/Header/styles.css.ts: menuCheck (marginInlineStart: "auto"), and menuRow, which has no background or other selected styling.
  • styles.css.ts: menuItem spreads menuRowBase's fontSize and fontWeight, then sets font: "inherit", which resets them. The globalStyle after it restores them for button only, so the <a> items ("View profile", "Add account") keep the inherited body font.
  • Seen on a dev instance signed in as @bob.pds.dev (active) and @alice.pds.dev, light theme.

Expected #

  • The active account row reads as the selected one at a glance, with a selected treatment from the theme (for example a vars.color.accentSubtle background, with the check or the handle in the accent colour), lined up with the other rows' padding. It is still not a control: no hover style or pointer cursor.
  • The active row looks clearly different from a switchable row's hover and focus states, so an inactive row never looks more selected than the active one.
  • Every row in the menu uses the same size and weight (fontSize.sm, fontWeight.medium), whether it is an <a>, a <button> or a plain row.

Acceptance criteria #

Out of scope #

What the menu contains and how switching works: #35's behaviour stays as it is.

Sign up or Sign in to add to the discussion.