Repository navigation
The bottom bar and its panels, and kit.ui.statusLine() - #71
Merged
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
<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. WithoutstatusBarthe frame is as it was andshell.statusBarisnull.aria-haspopup="dialog",aria-expandedandaria-controls, named by its label and its content (aria-labelledbyon both).live: truemakes it a polite live region; otherwise nothing in the bar is announced.role="dialog"named bypanel.label,panel.widthpx wide (capped to the window), 6px over its item, the kit's Close at its top right and the app's elements initem.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.show(),item()andopen()(while hidden) are checked and refused with a message.The status line
kit.ui.statusLine({ text, tone, title })→{ element, set() }: aspan.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.jsis unchanged.The demo, tests and docs
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;liveonly when asked; the refusals;statusLine()'s tones and refusals.accessibility.spec.js); the item's and the panel's focus rings at 3:1 in every accent (keyboard.spec.js).visual.spec.jsadds 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.mdgains The Bottom Bar,docs/page-components.mdThe Status Line,docs/development.mdthe new images.