Skip to content

The bottom bar and its panels, and kit.ui.statusLine() - #71

Merged
WillTDA merged 2 commits into
masterfrom
status-bar
Oct 24, 2026
Merged

WillTDA merged 2 commits into
masterfrom
status-bar

Conversation

@WillTDA

@WillTDA WillTDA commented Oct 24, 2026

Copy link
Copy Markdown
Contributor

Adds a bar along the window's bottom to the shell, with a panel each item opens, and the card's status line on its own (#67).

The bottom bar

const shell = kit.ui.mountShell({ …, statusBar: { items: [{ id, label, live, panel: { label, width } }] } });
shell.statusBar.show(visible);                  // hidden until shown
const item = shell.statusBar.item(id);          // { button, panel, open(), close(), opened }
  • A <footer class="kit-statusbar"> after the frame, under the rail and the sections: 26px, a line along its top, the tertiary background, 0.75rem text. While it shows, the frame takes the rest of the window, so nothing scrolls. Without statusBar the frame is as it was and shell.statusBar is null.
  • Each item is a borderless button the app fills, washed in the accent when hovered and while open, with aria-haspopup="dialog", aria-expanded and aria-controls, named by its label and its content (aria-labelledby on both). live: true makes it a polite live region; otherwise nothing in the bar is announced.
  • Its panel is a non-modal role="dialog" named by panel.label, panel.width px wide (capped to the window), 6px over its item, the kit's Close at its top right and the app's elements in item.panel. It opens on a click, Enter or Space and takes the focus. Escape, Close, Tab past its last control (or Shift+Tab before its first) close it with the focus back on the item; a click outside closes it and leaves the focus where the click put it. One panel is open at a time; show(false) closes it.
  • The options, show(), item() and open() (while hidden) are checked and refused with a message.

The status line

kit.ui.statusLine({ text, tone, title }) → { element, set() }: a span.kit-card-status.kit-tone-<tone> with its dot and text, the tone checked against the card's tones, the title the text unless given. card.update() now builds its line through it (a span rather than a div, drawn the same), so the two can't drift; e2e/cards.spec.js is unchanged.

The demo, tests and docs

  • The demo gains a Checks item with a panel (its checks, Check Again, Show Overview), hidden by default, so the 62 existing images are unchanged.
  • e2e/status-bar.spec.js: hidden until shown; under the rail and the sections, nothing scrolling; the name and expanded state; opening by click, Enter and Space; the focus in and back on each way out; one panel at a time; live only when asked; the refusals; statusLine()'s tones and refusals.
  • axe on the bar and its open panel in both themes and every accent (accessibility.spec.js); the item's and the panel's focus rings at 3:1 in every accent (keyboard.spec.js).
  • visual.spec.js adds the bar (its item focused by keyboard) and its open panel, in the demo's accent and the three apps', both themes: 78 images. Baselines from the hand-run job, in a commit to follow.
  • test/kit-css.test.js: the panel itself is the one focusable thing drawn without a ring (it takes the focus so its name is read; its controls have rings).
  • docs/shell.md gains The Bottom Bar, docs/page-components.md The Status Line, docs/development.md the new images.

kit.ui.mountShell({ statusBar: { items: [{ id, label, live, panel: { label, width } }] } })
adds a 26px bar along the window's bottom, under the rail and the sections,
hidden until shell.statusBar.show(true); while it shows, the frame takes the
rest of the window. Each item is a borderless button the app fills, named by
its label and its content, with aria-haspopup, aria-expanded and
aria-controls; live: true makes it a polite live region. Its panel is a
non-modal dialog over it, the app's own elements beside the kit's Close: it
opens on a click, Enter or Space and takes the focus, and Escape, Close, Tab
past its last control or a click outside close it, the focus going back to
the item except after a click. One panel is open at a time.

kit.ui.statusLine({ text, tone, title }) is a card's status line on its own,
a span so it can sit in a button; a card now builds its own through it.

The demo gains a Checks item with a panel, hidden by default, so the 62
existing images stay as they are; the visual spec adds the bar and its open
panel in every accent and both themes (78 images, baselines to come).
Sixteen images from the hand-run job: the bar and its panel in the demo's
accent and each app's, in both themes. The twelve existing images the runner
redrew are left as they were; each still matches.
@WillTDA
WillTDA merged commit c05edf4 into master Oct 24, 2026
9 checks passed
@WillTDA
WillTDA deleted the status-bar branch October 24, 2026 21:43
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.

1 participant