@alis-build/design-system 0.11.3 → 0.13.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/alisx.css +43 -5
- package/components/AppButton.md +1 -0
- package/components/AppComposer.md +1 -1
- package/components/AppIconButton.md +11 -4
- package/components/AppKeys.md +52 -0
- package/components/AppMenu.md +3 -2
- package/components/AppShell.md +22 -7
- package/components/AppShortcutSheet.md +84 -0
- package/components/AppTitleBar.md +41 -6
- package/components/AppTooltip.md +48 -0
- package/components/README.md +3 -1
- package/package.json +1 -1
- package/rules/README.md +1 -0
- package/rules/buttons.md +6 -0
- package/rules/icons.md +1 -1
- package/rules/known-gaps.md +1 -2
- package/rules/page.md +15 -3
- package/rules/quick-start.md +4 -2
- package/rules/shortcuts.md +95 -0
- package/rules/type.md +4 -0
- package/tokens.json +1 -1
package/alisx.css
CHANGED
|
@@ -217,7 +217,7 @@ button, input, textarea, select { font: inherit; }
|
|
|
217
217
|
/* ── Type-style completions the token classes can't carry ── */
|
|
218
218
|
.text-eyebrow{text-transform:uppercase}
|
|
219
219
|
.text-metric-value{font-variant-numeric:tabular-nums}
|
|
220
|
-
@media (max-width:599px){.text-welcome-title{font-size:32px;line-height:40px}}
|
|
220
|
+
@media (max-width:599px){.text-welcome-title{font-size:32px;line-height:40px}.text-page-title{font-size:18px;line-height:24px;letter-spacing:-0.02em}}
|
|
221
221
|
|
|
222
222
|
/* ── Face and weight, beside a role class: the role keeps the size ── */
|
|
223
223
|
.text-mono{font-family:var(--font-mono)}
|
|
@@ -413,8 +413,12 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
413
413
|
.app-titlebar--detail .app-titlebar__name{flex:1 1 100%}
|
|
414
414
|
/* The first verb's label meets the pane edge, as the close glyph does */
|
|
415
415
|
.app-titlebar--detail .app-titlebar__actions{flex-basis:100%;margin-left:calc(var(--space-24) * -1)}
|
|
416
|
-
/*
|
|
417
|
-
@media (
|
|
416
|
+
/* One markup for both windows: a part that exists only on a phone, or only above one */
|
|
417
|
+
@media (min-width:600px){.app-compact-only{display:none!important}}
|
|
418
|
+
@media (max-width:599px){.app-wide-only{display:none!important}}
|
|
419
|
+
/* Compact window: one 56 bar. Menu or back, the name, the lead as its glyph alone, then ⋯ holding every other verb.
|
|
420
|
+
Its 48 targets sit 4 in and its glyphs 16 in; a name with nothing before it starts on the content's 24 edge. A row's meta gives way to its title */
|
|
421
|
+
@media (max-width:599px){.app-titlebar:not(.app-titlebar--detail){gap:0;padding:env(safe-area-inset-top,0px) var(--space-8) 0}.app-titlebar:not(.app-titlebar--detail) .app-titlebar__row{flex-wrap:nowrap;gap:0;min-height:56px}.app-titlebar:not(.app-titlebar--detail) .app-titlebar__name{flex:1;gap:var(--space-4)}.app-titlebar:not(.app-titlebar--detail) .app-titlebar__leading{margin-left:0}.app-titlebar:not(.app-titlebar--detail) .app-titlebar__name:not(:has(.app-titlebar__leading)) .app-titlebar__title{padding-left:var(--space-16)}.app-titlebar:not(.app-titlebar--detail) .app-titlebar__actions{flex-wrap:nowrap;gap:0;margin-left:0}.app-titlebar__lead{width:40px;min-width:0;height:40px;padding:0;gap:0;border-color:transparent;background:transparent;color:var(--on-surface)}.app-titlebar__lead .app-icon{margin:0;font-size:24px}.app-titlebar:not(.app-titlebar--detail) .app-tabs{margin:0 calc(var(--space-8) * -1);padding:0 var(--space-8)}.app-titlebar__lead .app-titlebar__label{position:absolute;width:1px;height:1px;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}.app-titlebar .app-icon-btn{color:var(--on-surface)}.app-row:not(.app-row--nav):not(.app-row--agent-chat) .app-row__meta{display:none}}
|
|
418
422
|
/* The filter row sits in .app-shell__content, which already pads the sides */
|
|
419
423
|
.app-filterrow{display:flex;flex-wrap:wrap;align-items:center;gap:var(--space-8)}
|
|
420
424
|
/* Search leads the row; the controls follow it; the count closes the row and answers them */
|
|
@@ -478,12 +482,13 @@ a.app-row,a.app-card{text-decoration:none}
|
|
|
478
482
|
/* breakpoint-medium (840): the detail pane slides over the content */
|
|
479
483
|
@media (max-width:839px){.app-shell--detail{grid-template-columns:var(--nav-width) minmax(0,1fr)}.app-shell__detail{position:fixed;top:0;right:0;bottom:0;width:min(var(--detail-width),100%);background:var(--surface);box-shadow:var(--elevation-3),0 0 0 100vmax color-mix(in srgb,var(--scrim) 32%,transparent);border-left:0;z-index:2}}
|
|
480
484
|
/* breakpoint-compact (600): the navigation pane collapses to a column of icons */
|
|
481
|
-
|
|
485
|
+
/* Compact window: the navigation pane becomes a drawer, the same pane at the same width, opened by the title bar's
|
|
486
|
+
menu button (app-shell--nav-open) over a scrim, as a detail pane slides over a narrow window */
|
|
487
|
+
@media (max-width:599px){.app-shell,.app-shell--detail{grid-template-columns:minmax(0,1fr)}.app-shell__nav{display:none;position:fixed;top:0;bottom:0;left:0;z-index:3;width:var(--nav-width);max-width:calc(100% - 56px);padding-top:calc(var(--space-16) + env(safe-area-inset-top,0px));overflow-y:auto;background:var(--surface);border-right:0;box-shadow:var(--elevation-3),0 0 0 100vmax color-mix(in srgb,var(--scrim) 32%,transparent)}.app-shell--nav-open .app-shell__nav{display:flex}.app-tab{padding:0 var(--space-16)}.app-tab.is-selected::after{left:var(--space-16);right:var(--space-16)}.app-shell__detail{width:100%}}
|
|
482
488
|
|
|
483
489
|
/* ── Navigation pane · brand, account card ── */
|
|
484
490
|
.app-brand{display:flex;align-items:center;min-height:48px;padding:0 var(--space-16);margin-bottom:var(--space-16)}
|
|
485
491
|
.app-brand__wordmark{display:block;width:auto}
|
|
486
|
-
.app-brand__mark{display:none;width:auto}
|
|
487
492
|
.app-account{display:flex;align-items:center;gap:var(--space-12);width:100%;min-height:56px;margin-top:var(--space-8);padding:var(--space-8);border:1px solid var(--outline-variant);border-radius:var(--radius-lg);background:transparent;color:var(--on-surface);text-align:left;font:inherit}
|
|
488
493
|
.app-account__avatar{flex:none;width:36px;height:36px;border-radius:50%;object-fit:cover}
|
|
489
494
|
span.app-account__avatar{display:flex;align-items:center;justify-content:center;background:var(--surface-container-highest);color:var(--on-surface)}
|
|
@@ -815,6 +820,39 @@ a.app-attachment{color:inherit;text-decoration:none}
|
|
|
815
820
|
.app-token{display:inline;padding:2px 6px;margin:0 1px;border-radius:var(--radius-sm);background:var(--surface-container-highest);color:var(--on-surface);font-weight:600;white-space:nowrap;text-decoration:none;-webkit-box-decoration-break:clone;box-decoration-break:clone;user-select:all}
|
|
816
821
|
.app-token>.app-icon{display:inline-block;font-size:1em;width:1em;height:1em;margin-right:var(--space-4);vertical-align:-0.125em;color:var(--on-surface-variant)}
|
|
817
822
|
a.app-token,button.app-token{border:0;font:inherit;font-weight:600;cursor:pointer}
|
|
823
|
+
/* ── Keys · a shortcut, one cap per key (rules/shortcuts.md) ── */
|
|
824
|
+
.app-keys{display:inline-flex;align-items:center;gap:var(--space-4);flex:none;margin:0;font:inherit;vertical-align:middle;white-space:nowrap}
|
|
825
|
+
.app-key{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:20px;height:20px;padding:0 var(--space-4);border-radius:var(--radius-xs);background:var(--surface-container-highest);color:var(--on-surface-variant);font-family:var(--font-sans);font-size:12px;line-height:16px;font-weight:600;font-style:normal;font-variant-numeric:tabular-nums}
|
|
826
|
+
.app-keys__then{color:var(--on-surface-variant);font-family:var(--font-sans);font-size:12px;line-height:16px;font-weight:400}
|
|
827
|
+
/* What a screen reader says for caps it can't read aloud (⌘, ⇧): in the sheet and in prose */
|
|
828
|
+
.app-keys__said{position:absolute;width:1px;height:1px;margin:-1px;padding:0;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}
|
|
829
|
+
/* On a grey field the cap lifts to white; the search field's key shows only while it is empty and unfocused */
|
|
830
|
+
.app-search .app-key{background:var(--surface)}
|
|
831
|
+
/* On a touch screen there is no keyboard to press them: the search field's cap and a menu row's keys leave */
|
|
832
|
+
@media (pointer:coarse){.app-search>.app-keys,.app-menu__hint>.app-keys{display:none}}
|
|
833
|
+
.app-search:focus-within>.app-keys,.app-search:has(>.app-search__input:not(:placeholder-shown))>.app-keys{display:none}
|
|
834
|
+
/* Single-key shortcuts off (set on the root): letter caps leave tooltips and menus, and dim in the sheet */
|
|
835
|
+
[data-single-keys="off"] .app-keys--single{display:none}
|
|
836
|
+
[data-single-keys="off"] .app-shortcuts .app-keys--single{display:inline-flex;opacity:.38}
|
|
837
|
+
.app-shortcuts[data-single-keys="off"] .app-keys--single{display:inline-flex;opacity:.38}
|
|
838
|
+
/* ── Tooltip · names a control and carries its keys: inverse, below, after 200ms ── */
|
|
839
|
+
.app-tooltip{position:fixed;z-index:40;display:inline-flex;align-items:center;gap:var(--space-8);max-width:240px;min-height:28px;box-sizing:border-box;margin:0;padding:var(--space-4) var(--space-8);border-radius:var(--radius-sm);background:var(--inverse-surface);color:var(--on-inverse-surface);font-family:var(--font-sans);font-size:12px;line-height:16px;font-weight:500;pointer-events:none}
|
|
840
|
+
.app-tooltip[hidden]{display:none}
|
|
841
|
+
.app-tooltip:has(>.app-keys:last-child){padding-right:var(--space-4)}
|
|
842
|
+
.app-tooltip .app-key{background:color-mix(in srgb,var(--on-inverse-surface) 16%,transparent);color:var(--on-inverse-surface)}
|
|
843
|
+
.app-tooltip .app-keys__then{color:inherit;opacity:.72}
|
|
844
|
+
[data-single-keys="off"] .app-tooltip:has(>.app-keys--single:last-child){padding-right:var(--space-8)}
|
|
845
|
+
/* ── Shortcut sheet · the keys of this screen, then everywhere; in the detail pane's place ── */
|
|
846
|
+
.app-shortcuts{display:flex;flex-direction:column;gap:var(--space-24);flex:1;min-height:0}
|
|
847
|
+
.app-shortcuts__group{display:flex;flex-direction:column;margin:0}
|
|
848
|
+
.app-shortcuts__heading{margin:0 0 var(--space-4);color:var(--on-surface-variant)}
|
|
849
|
+
.app-shortcuts__note{margin:0 0 var(--space-4);color:var(--on-surface-variant)}
|
|
850
|
+
.app-shortcuts__row{display:flex;align-items:center;justify-content:space-between;gap:var(--space-16);min-height:36px}
|
|
851
|
+
.app-shortcuts__group>dl{margin:0}
|
|
852
|
+
.app-shortcuts__row>dt,.app-shortcuts__row>dd{margin:0}
|
|
853
|
+
.app-shortcuts__note[hidden]{display:none}
|
|
854
|
+
/* The foot stays in view while the groups scroll under it */
|
|
855
|
+
.app-shortcuts__foot{position:sticky;bottom:0;margin-top:auto;padding-top:var(--space-16);border-top:1px solid var(--outline-variant);background:var(--background)}
|
|
818
856
|
/* ── Drop target, while something is dragged over it ── */
|
|
819
857
|
.drop-target{outline:2px dashed var(--primary);outline-offset:-2px;background-color:color-mix(in srgb,var(--primary) calc(var(--state-dragged) * 100%),transparent)}
|
|
820
858
|
|
package/components/AppButton.md
CHANGED
|
@@ -12,6 +12,7 @@ Emphasis is allocated, not chosen ([buttons.md](../rules/buttons.md)).
|
|
|
12
12
|
- **Error** (`app-btn--error`) for destructive actions, at the same level. **Quiet** (`app-btn--quiet`, `on-surface-variant`) for a quiet action beside content.
|
|
13
13
|
- No tonal or elevated buttons. A filled button scales to 97% and rounds to 12px when pressed (the CSS does it).
|
|
14
14
|
- An icon only when the button sits in a set people scan, or `add` on a New or Add action wherever it sits ([buttons.md](../rules/buttons.md) § The form). No other icon on a filled or outlined button, and none on a dialog action.
|
|
15
|
+
- **A shortcut** never goes in the label. A button with one takes an [AppTooltip](AppTooltip.md) that says the label and its keys, and `aria-keyshortcuts` ([shortcuts.md](../rules/shortcuts.md)); a button without one has no tooltip.
|
|
15
16
|
- The visible box is `control-height` (36px, 48 on touch), padded 24, and the target is `touch-target` ([buttons.md](../rules/buttons.md)). Text and outlined buttons are 600, the filled button 700. `app-btn--small` (32px, padded 12) belongs only in a table row. Inside a toggle group or table row, add `app-target--none`.
|
|
16
17
|
- **Loading** shows the work on the control the user pressed: a 16px spinner replaces the icon and the label stays (or becomes the present participle, "Deploying"). The button is busy, not disabled: full colour, presses ignored until it settles.
|
|
17
18
|
- Work with steps you can count (a deploy, an upload) moves its indicator into the content once it starts: an [AppProgress](AppProgress.md), and the button goes back to rest. One wait, one indicator ([loading.md](../rules/loading.md)).
|
|
@@ -131,7 +131,7 @@ Where you write to Alis, an agent or a person. One floating surface with three b
|
|
|
131
131
|
## Behaviour you must supply
|
|
132
132
|
|
|
133
133
|
- **The state machine** above: swap the trailing button's glyph, `aria-label` and `title`, and add or remove the plain voice buttons, on every change to the draft, the tray or the agent's state. `disabled` on Send until there is something to send and every tile is ready.
|
|
134
|
-
- **Keyboard**, on the editor only (never a window listener): Enter sends; Shift
|
|
134
|
+
- **Keyboard**, on the editor only (never a window listener): Enter sends; Shift Enter adds a line (no hint line says so: Send's [AppTooltip](AppTooltip.md) carries Enter, and the [AppShortcutSheet](AppShortcutSheet.md) lists both); ignore Enter while `isComposing` (IME) or while a suggestion menu is open ([AppMenu](AppMenu.md)). In a call, Enter with text sends into the call. While Alis works with the queue off, Enter does nothing.
|
|
135
135
|
- **Auto-grow**: set the textarea's height to its `scrollHeight` on input; the editor caps it at eight lines and scrolls.
|
|
136
136
|
- **Recording**: start on the mic (holding Space outside a text field is a shortcut), run the timer, drive the meter bars' heights from the input level (`aria-hidden`; hold them still under `prefers-reduced-motion`). Under about a second is too short.
|
|
137
137
|
- **Live**: toggle `is-alis` on `.app-composer` while Alis speaks and `is-muted` while muted (and `aria-pressed` on the mute toggle); update the status word, which is a live region.
|
|
@@ -5,7 +5,7 @@ A 20px glyph in a 40px box that performs one action.
|
|
|
5
5
|
## Use / don't use
|
|
6
6
|
|
|
7
7
|
- `on-surface-variant`, no fill, no border, no shadow, no product colour ([buttons.md](../rules/buttons.md)).
|
|
8
|
-
- The label is required: it is the accessible name and the tooltip.
|
|
8
|
+
- The label is required: it is the accessible name and its [AppTooltip](AppTooltip.md), which carries the keys when it has a shortcut. No `title` as well: the browser would show a second tooltip.
|
|
9
9
|
- An icon button is not a selection. The one exception is a **toggle** (on or off, and stays that way): selected, it takes the `secondary-container` fill with a filled glyph.
|
|
10
10
|
- If it shows a word, use [AppButton](AppButton.md). If it does nothing on its own, it is an [AppIcon](AppIcon.md).
|
|
11
11
|
- `app-icon-btn--small` (32px box; on touch its target still projects to 48) for the title bar's verbs and a detail pane's close. In a list row's trailing slot or a table cell the CSS shrinks it to 32px and drops the projected target for you.
|
|
@@ -13,11 +13,17 @@ A 20px glyph in a 40px box that performs one action.
|
|
|
13
13
|
## Markup
|
|
14
14
|
|
|
15
15
|
```html
|
|
16
|
-
<!-- One action -->
|
|
17
|
-
<button type="button" class="app-icon-btn app-state app-target" aria-label="More actions"
|
|
16
|
+
<!-- One action; its AppTooltip says "More actions" -->
|
|
17
|
+
<button type="button" class="app-icon-btn app-state app-target" aria-label="More actions">
|
|
18
18
|
<span class="app-icon" aria-hidden="true">more_vert</span>
|
|
19
19
|
</button>
|
|
20
20
|
|
|
21
|
+
<!-- With a shortcut: the tooltip carries the keys, the button says them to assistive technology -->
|
|
22
|
+
<button type="button" class="app-icon-btn app-state app-target" aria-label="Resolve conversation" aria-keyshortcuts="R">
|
|
23
|
+
<span class="app-icon" aria-hidden="true">check_circle</span>
|
|
24
|
+
</button>
|
|
25
|
+
<div class="app-tooltip" id="tt-3" role="tooltip" hidden>Resolve conversation <kbd class="app-keys app-keys--single" aria-hidden="true"><kbd class="app-key">R</kbd></kbd></div>
|
|
26
|
+
|
|
21
27
|
<!-- Small (detail pane close, title bar) -->
|
|
22
28
|
<button type="button" class="app-icon-btn app-state app-target app-icon-btn--small" aria-label="Close details" title="Close details">
|
|
23
29
|
<span class="app-icon" aria-hidden="true">close</span>
|
|
@@ -36,7 +42,8 @@ A 20px glyph in a 40px box that performs one action.
|
|
|
36
42
|
|
|
37
43
|
## Behaviour you must supply
|
|
38
44
|
|
|
39
|
-
- `aria-label` and
|
|
45
|
+
- `aria-label` and the [AppTooltip](AppTooltip.md) carry the same label. Older markup in these guides shows it as `title`; render the tooltip instead.
|
|
46
|
+
- A shortcut: its keys in the tooltip and `aria-keyshortcuts` on the button ([shortcuts.md](../rules/shortcuts.md)).
|
|
40
47
|
- A toggle: on press flip `aria-pressed`, `is-selected` on the button and `app-icon--filled` on the glyph together. A plain action never has `aria-pressed`.
|
|
41
48
|
|
|
42
49
|
## Classes
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# AppKeys
|
|
2
|
+
|
|
3
|
+
A keyboard shortcut, one cap per key, written for the platform ([shortcuts.md](../rules/shortcuts.md)).
|
|
4
|
+
|
|
5
|
+
## Use / don't use
|
|
6
|
+
|
|
7
|
+
- **Where it goes**: after a label in an [AppTooltip](AppTooltip.md), in an [AppMenu](AppMenu.md) row's hint, at the end of the screen's search field, in the [AppShortcutSheet](AppShortcutSheet.md), and inline in prose that tells someone what to press.
|
|
8
|
+
- **Not a label.** Never inside a button, never in brackets, never on a line of its own under a composer or a picker.
|
|
9
|
+
- **One spelling.** ⌘ ⇧ ⌥ ⌃ on a Mac, Ctrl Shift Alt elsewhere; Enter, Esc, Tab, Space and Delete as words everywhere; arrows as arrows. Never a plus sign.
|
|
10
|
+
- **A capital takes Shift**: ⇧ U. A letter cap is always the capital.
|
|
11
|
+
- **A sequence** puts `then` between its keys: G then H.
|
|
12
|
+
|
|
13
|
+
## Anatomy
|
|
14
|
+
|
|
15
|
+
| Part | What it is |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **Cap** (`kbd.app-key`) | 20 tall, at least 20 wide, 4 either side of the text; `surface-container-highest` behind `on-surface-variant` at 12/16 600, tabular; `radius-xs`. No border, no shadow. On the search field it lifts to `surface`; on a tooltip it is the tooltip's ink at 16% |
|
|
18
|
+
| **Set** (`kbd.app-keys`) | The caps 4 apart, on the text's middle |
|
|
19
|
+
| **Then** | `.app-keys__then`, meta in `on-surface-variant`, between the keys of a sequence |
|
|
20
|
+
| **Said** | `.app-keys__said`: the keys in words for a screen reader, where the caps are content |
|
|
21
|
+
|
|
22
|
+
## Markup
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<!-- On a control (tooltip, menu row, search field): decoration; the control carries aria-keyshortcuts -->
|
|
26
|
+
<kbd class="app-keys" aria-hidden="true"><kbd class="app-key">⌘</kbd><kbd class="app-key">K</kbd></kbd>
|
|
27
|
+
|
|
28
|
+
<!-- The same shortcut on Windows and Linux -->
|
|
29
|
+
<kbd class="app-keys" aria-hidden="true"><kbd class="app-key">Ctrl</kbd><kbd class="app-key">K</kbd></kbd>
|
|
30
|
+
|
|
31
|
+
<!-- A single letter: --single, so it can leave when single-key shortcuts are off -->
|
|
32
|
+
<kbd class="app-keys app-keys--single" aria-hidden="true"><kbd class="app-key">R</kbd></kbd>
|
|
33
|
+
|
|
34
|
+
<!-- A capital, and a sequence -->
|
|
35
|
+
<kbd class="app-keys" aria-hidden="true"><kbd class="app-key">⇧</kbd><kbd class="app-key">U</kbd></kbd>
|
|
36
|
+
<kbd class="app-keys" aria-hidden="true"><kbd class="app-key">G</kbd><span class="app-keys__then">then</span><kbd class="app-key">H</kbd></kbd>
|
|
37
|
+
|
|
38
|
+
<!-- Content (the sheet, prose): the caps hidden, the keys said -->
|
|
39
|
+
<p class="text-body">Open PowerShell and press
|
|
40
|
+
<kbd class="app-keys" aria-hidden="true"><kbd class="app-key">Ctrl</kbd><kbd class="app-key">V</kbd></kbd><span class="app-keys__said">Control V</span>
|
|
41
|
+
to paste the command.</p>
|
|
42
|
+
```
|
|
43
|
+
|
|
44
|
+
## Behaviour you must supply
|
|
45
|
+
|
|
46
|
+
- **The platform**, detected once for the product (a Mac, or anything else), and every set written for it. A guide for another app writes that app's platform instead.
|
|
47
|
+
- **`app-keys--single`** on a set that is one letter with no modifier, so the product can hide it while single-key shortcuts are off (`data-single-keys="off"` on the root).
|
|
48
|
+
- **`aria-keyshortcuts`** on the control a set describes, in the platform's terms (`Meta+K` on a Mac, `Control+K` elsewhere; `R`; `Shift+U`).
|
|
49
|
+
|
|
50
|
+
## Classes
|
|
51
|
+
|
|
52
|
+
`.app-keys` (`--single`), `.app-key`, `.app-keys__then`, `.app-keys__said`.
|
package/components/AppMenu.md
CHANGED
|
@@ -21,7 +21,7 @@ A list of acts or places that opens from a control or from what you type, and cl
|
|
|
21
21
|
| **Surface** | White, `elevation-2`, `radius-lg` (16) with 8 inside, so a row's `radius-sm` (8) is concentric. 200 to 320 wide. The one list in the product that is white ([surfaces.md](../rules/surfaces.md)). A suggestion band has no surface of its own: it is the composer's, with a hairline under it, and its rows take the ask's `radius-md` |
|
|
22
22
|
| **Row** | 40 tall (48 under a coarse pointer), the whole row the target. A 20px icon in `on-surface-variant` if any row in the menu has one; the label at 14/20 500, set by the menu, no role |
|
|
23
23
|
| **Second line** | Meta, only when the label can't stand alone: who has access, what a command does, a person's role |
|
|
24
|
-
| **Hint** | Trailing
|
|
24
|
+
| **Hint** | Trailing: a shortcut as an [AppKeys](AppKeys.md), or a /name in meta. Or `open_in_new` when the item leaves the app. Never a chevron |
|
|
25
25
|
| **Heading** | `text-eyebrow`, only where groups need names (the Add menu's Commands; @'s People and Files). Otherwise a hairline divider alone separates groups |
|
|
26
26
|
| **Checked** | Where you are or what's on (a view, a sort, a switcher): the `secondary-container` fill and a trailing `check`, text at 700 ([selection.md](../rules/selection.md)). One at a time unless the menu says otherwise |
|
|
27
27
|
| **Danger** | An act that destroys: `error` ink, last, after a divider, once. It opens its confirmation dialog and never confirms inside the menu |
|
|
@@ -52,7 +52,7 @@ What you chose from `/` or `@` becomes **one token in the sentence** (`.app-toke
|
|
|
52
52
|
<div class="app-menu" id="m-7" role="menu" aria-label="Renewal calls, round 2" hidden>
|
|
53
53
|
<button type="button" class="app-menu__item app-state" role="menuitem"><span class="app-icon" aria-hidden="true">edit</span><span class="app-menu__text"><span>Rename</span></span></button>
|
|
54
54
|
<button type="button" class="app-menu__item app-state" role="menuitem"><span class="app-icon" aria-hidden="true">person_add</span><span class="app-menu__text"><span>Share</span><span class="app-menu__support">Priya and 2 others have access</span></span></button>
|
|
55
|
-
<button type="button" class="app-menu__item app-state" role="menuitem"><span class="app-icon" aria-hidden="true">link</span><span class="app-menu__text"><span>Copy link</span></span><span class="app-menu__hint"
|
|
55
|
+
<button type="button" class="app-menu__item app-state" role="menuitem" aria-keyshortcuts="Shift+Meta+,"><span class="app-icon" aria-hidden="true">link</span><span class="app-menu__text"><span>Copy link</span></span><span class="app-menu__hint"><kbd class="app-keys" aria-hidden="true"><kbd class="app-key">⇧</kbd><kbd class="app-key">⌘</kbd><kbd class="app-key">,</kbd></kbd></span></button>
|
|
56
56
|
<hr class="app-menu__divider">
|
|
57
57
|
<button type="button" class="app-menu__item app-menu__item--danger app-state" role="menuitem"><span class="app-icon" aria-hidden="true">delete</span><span class="app-menu__text"><span>Delete round</span></span></button>
|
|
58
58
|
</div>
|
|
@@ -93,6 +93,7 @@ What you chose from `/` or `@` becomes **one token in the sentence** (`.app-toke
|
|
|
93
93
|
- **Triggers**: `/` at the start of the message only, `@` at the start or after a space; filter as you type; close when a space follows no match.
|
|
94
94
|
- **Tokens**: insert them as non-editable atoms followed by a space; carry them through whatever the editor serializes to (a token must survive the round trip, never becoming plain text or a placeholder), and render them as links in the sent message.
|
|
95
95
|
- **Checked items**: set `aria-checked`, `is-selected` and the trailing `check` together.
|
|
96
|
+
- **A shortcut**: the same keys the sheet lists, written for the platform, and `aria-keyshortcuts` on the row ([shortcuts.md](../rules/shortcuts.md)). The account menu holds **Keyboard shortcuts**, `?` as its hint, which opens the [AppShortcutSheet](AppShortcutSheet.md) ([AppShell](AppShell.md) § The account menu). On a coarse pointer a row's keys leave by themselves.
|
|
96
97
|
|
|
97
98
|
## Classes
|
|
98
99
|
|
package/components/AppShell.md
CHANGED
|
@@ -10,13 +10,17 @@ See [surfaces.md](../rules/surfaces.md) and [page.md](../rules/page.md).
|
|
|
10
10
|
- **Navigation pane** (`nav-width`, 256px), three regions:
|
|
11
11
|
- **Top**, fixed: the brand (`.app-brand`), the AlisX wordmark linking Home. It is the way home from every rail.
|
|
12
12
|
- **Middle**: app-wide destinations first (Home, Skill Store), then one group per product under an `.app-nav-heading` naming it ("Ideate", "Build"), its destinations as 36px nav [AppListRow](AppListRow.md)s sitting flush (no gap between rows). A heading names a product in `on-surface-variant`, and sets its own type: 12/16 at 500, sentence case, no tracking. Never an eyebrow. Whatever a screen adds after the groups (the agent chat list, under its own heading) follows them.
|
|
13
|
-
- **Foot**, pinned: Support as one nav row, then the account card (`.app-account`): who is signed in and which account they are working in. The card opens the account menu
|
|
14
|
-
- **A row's "new"** is a small [AppIconButton](AppIconButton.md)
|
|
13
|
+
- **Foot**, pinned: Support as one nav row, then the account card (`.app-account`): who is signed in and which account they are working in. The card opens the account menu (§ The account menu).
|
|
14
|
+
- **A row's "new"** is a small [AppIconButton](AppIconButton.md) in that row's trailing slot, with a tooltip naming it ("New project"), on rows whose destination can create: `add`, or `edit_square` where the destination is a conversation ("New chat"), as on its title bar's lead ([buttons.md](../rules/buttons.md) § The form).
|
|
15
15
|
- **No action in the pane.** A screen's "new" is the outlined lead in its title bar ([AppTitleBar](AppTitleBar.md)); the navigation pane holds destinations, and a row's own "new" icon button.
|
|
16
16
|
- **A contextual rail** (inside a project, an admin account, Support) keeps the brand and the foot and replaces the middle with that object's destinations. Open objects (the interviews you have open) are nav rows with `app-nav-secondary` under a heading.
|
|
17
17
|
- The pane is permanent chrome, so selection there is `selection-chrome`. Which destinations each product lists is product content, not part of this system.
|
|
18
18
|
- **Content**: an [AppTitleBar](AppTitleBar.md), then `.app-shell__content`, which pads 24 on every side (32 below) and fills the pane, holding the filter row and the list, table or document.
|
|
19
|
-
- **Detail pane** (`detail-width`, 360px): what is selected in the content, led by a detail title bar. It sits on the ground behind a divider, never on a card, and scrolls on its own.
|
|
19
|
+
- **Detail pane** (`detail-width`, 360px): what is selected in the content, led by a detail title bar. It sits on the ground behind a divider, never on a card, and scrolls on its own. **It has a URL** (a query parameter, as search keeps `?q=`), so a refresh, a shared link and back all find it. The [AppShortcutSheet](AppShortcutSheet.md) opens in its place: the content narrows for it, or it covers an open detail pane until it closes. Below 840px it slides over the content at `elevation-3`, over a scrim.
|
|
20
|
+
- **On a phone** (below 600px) the shell is one column: the content, under a one-row title bar ([AppTitleBar](AppTitleBar.md) § On a phone).
|
|
21
|
+
- **The navigation pane becomes a drawer**: the same pane at the same width, brand, groups, agent chats and foot unchanged, hidden until the title bar's menu button opens it (`app-shell--nav-open`). It slides over the content at `elevation-3` over a scrim, like a detail pane. Never a column of icons: it hid the agent chats, the place you go back to most, and left the content too little room.
|
|
22
|
+
- **The detail pane covers the full width**, and its bar leads with back (`arrow_back`) instead of close: on a phone it reads as a step deeper, and the phone's own back gesture closes it.
|
|
23
|
+
- The CSS lays all of this out; you open and close the drawer.
|
|
20
24
|
- No pane is a white card. Panes are separated by an `outline-variant` divider, not by fill.
|
|
21
25
|
|
|
22
26
|
## Markup
|
|
@@ -26,7 +30,6 @@ See [surfaces.md](../rules/surfaces.md) and [page.md](../rules/page.md).
|
|
|
26
30
|
<nav class="app-shell__nav" aria-label="Main">
|
|
27
31
|
<a class="app-brand" href="/" aria-label="AlisX home">
|
|
28
32
|
<img class="app-brand__wordmark" src="assets/Brand/alis_exchange.svg" alt="" height="36">
|
|
29
|
-
<img class="app-brand__mark" src="assets/Brand/alis.svg" alt="" height="24">
|
|
30
33
|
</a>
|
|
31
34
|
|
|
32
35
|
<!-- App-wide destinations: nav AppListRows (Home, Skill Store) -->
|
|
@@ -79,14 +82,26 @@ See [surfaces.md](../rules/surfaces.md) and [page.md](../rules/page.md).
|
|
|
79
82
|
|
|
80
83
|
Group headings are the product's short name, "Ideate" and "Build"; the full names (*Alis Ideate*, *Alis Build*) are for copy.
|
|
81
84
|
|
|
85
|
+
## The account menu
|
|
86
|
+
|
|
87
|
+
An [AppMenu](AppMenu.md), opened from the account card, in three groups:
|
|
88
|
+
|
|
89
|
+
1. **The accounts**: one checked row per account you can work in (`menuitemradio`), the product names in its supporting line. Choosing one switches.
|
|
90
|
+
2. **About you here**: **Usage** where the product measures it (`data_usage`, the share used in its supporting line, "68% of this month's credits", in `error` at the limit), opening the product's usage panel; then **Keyboard shortcuts**, `?` as its hint, opening the [AppShortcutSheet](AppShortcutSheet.md), left out on a touch screen.
|
|
91
|
+
3. **Profile**, then **Sign out**.
|
|
92
|
+
|
|
93
|
+
Usage lives here, never in a title bar: it measures the account, not the screen ([AppTitleBar](AppTitleBar.md)).
|
|
94
|
+
|
|
82
95
|
## Behaviour you must supply
|
|
83
96
|
|
|
84
97
|
- Add `app-shell--detail` and the `<aside>` only while something is selected; remove both when the detail pane closes, and return focus to the row that opened it.
|
|
85
98
|
- When the rail runs long, scroll only the region after the product groups (the agent chat list); the brand, the groups and the foot stay put.
|
|
86
|
-
- The
|
|
99
|
+
- **The drawer** (below 600px): the title bar's menu button (`aria-expanded`, `aria-controls` on the nav) adds `app-shell--nav-open`. While it's open, make `.app-shell__main` `inert` and move focus to the first row. It closes on a route change, on Escape and on a press outside it, and focus returns to the menu button. Remove the class at 600px and up.
|
|
100
|
+
- **The detail pane's history**: opening it pushes a history entry with its parameter; choosing another row while it's open replaces that entry, so back doesn't step through every row you looked at; close goes back. At every width.
|
|
101
|
+
- The account card opens the account menu (toggle `aria-expanded`).
|
|
87
102
|
- No photo: the person's initial in `<span class="app-account__avatar text-label" aria-hidden="true">R</span>`.
|
|
88
|
-
-
|
|
103
|
+
- The brand link keeps its `aria-label`, since the wordmark is decorative.
|
|
89
104
|
|
|
90
105
|
## Classes
|
|
91
106
|
|
|
92
|
-
`.app-shell`, `.app-shell--detail`, `.app-shell__nav`, `.app-shell__nav-foot`, `.app-shell__main`, `.app-shell__content`, `.app-shell__detail`; `.app-
|
|
107
|
+
`.app-shell`, `.app-shell--detail`, `.app-shell__nav`, `.app-shell__nav-foot`, `.app-shell__main`, `.app-shell__content`, `.app-shell__detail`; `.app-shell--nav-open`; `.app-brand`, `.app-brand__wordmark`; `.app-nav-heading`, `.app-nav-secondary`; `.app-account`, `.app-account__avatar`, `.app-account__text`.
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
# AppShortcutSheet
|
|
2
|
+
|
|
3
|
+
Every key the screen answers to, in the detail pane's place ([shortcuts.md](../rules/shortcuts.md)).
|
|
4
|
+
|
|
5
|
+
## Use / don't use
|
|
6
|
+
|
|
7
|
+
- **One sheet for the product.** It opens from `?` on any screen and from a **Keyboard shortcuts** row in the account menu (with `?` as its hint), a row a touch screen leaves out. No screen builds its own list of keys or its own dialog for them.
|
|
8
|
+
- **Beside the work, never over it.** It takes the [AppShell](AppShell.md)'s detail pane: on a screen with no detail pane the content narrows for it; on a screen with one open, the sheet covers that pane until it closes and the pane returns. Below 840px it slides over the content like any detail pane. It has no scrim and takes no focus trap: every key it lists works while it is open.
|
|
9
|
+
- **This screen first.** A group named for what is open ("On this conversation", "On this list"), then **Everywhere**. A key that does nothing here is left out, not dimmed.
|
|
10
|
+
- **Not a settings page.** Its one control is the single-key switch.
|
|
11
|
+
|
|
12
|
+
## Anatomy
|
|
13
|
+
|
|
14
|
+
| Part | What it is |
|
|
15
|
+
|---|---|
|
|
16
|
+
| **Bar** | An [AppTitleBar](AppTitleBar.md) `--detail`: the close icon button leading (its tooltip says Close, Esc), "Keyboard shortcuts" in section-title, no verbs |
|
|
17
|
+
| **Group** | A `text-eyebrow` heading, then a `<dl>` of rows; groups 24 apart |
|
|
18
|
+
| **Row** | 36 tall: what the key does in `text-body`, sentence case and short ("Resolve", "Search this screen"), and its [AppKeys](AppKeys.md) at the end. The verb a tooltip would use |
|
|
19
|
+
| **Note** | While single-key shortcuts are off, one meta line under the first group's heading: *Single-key shortcuts are off.* The letter caps dim to 38% |
|
|
20
|
+
| **Foot** | Pinned to the bottom behind a hairline: an [AppSwitch](AppSwitch.md), **Single-key shortcuts**, with one supporting line |
|
|
21
|
+
|
|
22
|
+
## Markup
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<aside class="app-shell__detail" aria-labelledby="ks-title">
|
|
26
|
+
<header class="app-titlebar app-titlebar--detail">
|
|
27
|
+
<div class="app-titlebar__row">
|
|
28
|
+
<div class="app-titlebar__name">
|
|
29
|
+
<span class="app-titlebar__leading">
|
|
30
|
+
<button type="button" class="app-icon-btn app-state app-target app-icon-btn--small" aria-label="Close" aria-keyshortcuts="Escape"><span class="app-icon" aria-hidden="true">close</span></button>
|
|
31
|
+
</span>
|
|
32
|
+
<h2 class="app-titlebar__title text-section-title" id="ks-title">Keyboard shortcuts</h2>
|
|
33
|
+
</div>
|
|
34
|
+
</div>
|
|
35
|
+
</header>
|
|
36
|
+
|
|
37
|
+
<div class="app-shortcuts">
|
|
38
|
+
<section class="app-shortcuts__group" aria-labelledby="ks-here">
|
|
39
|
+
<h3 class="app-shortcuts__heading text-eyebrow" id="ks-here">On this conversation</h3>
|
|
40
|
+
<p class="app-shortcuts__note text-meta" hidden>Single-key shortcuts are off.</p>
|
|
41
|
+
<dl>
|
|
42
|
+
<div class="app-shortcuts__row">
|
|
43
|
+
<dt class="text-body">Resolve</dt>
|
|
44
|
+
<dd><kbd class="app-keys app-keys--single" aria-hidden="true"><kbd class="app-key">R</kbd></kbd><span class="app-keys__said">R</span></dd>
|
|
45
|
+
</div>
|
|
46
|
+
<div class="app-shortcuts__row">
|
|
47
|
+
<dt class="text-body">Hand over</dt>
|
|
48
|
+
<dd><kbd class="app-keys" aria-hidden="true"><kbd class="app-key">⇧</kbd><kbd class="app-key">U</kbd></kbd><span class="app-keys__said">Shift U</span></dd>
|
|
49
|
+
</div>
|
|
50
|
+
</dl>
|
|
51
|
+
</section>
|
|
52
|
+
|
|
53
|
+
<section class="app-shortcuts__group" aria-labelledby="ks-all">
|
|
54
|
+
<h3 class="app-shortcuts__heading text-eyebrow" id="ks-all">Everywhere</h3>
|
|
55
|
+
<dl>
|
|
56
|
+
<div class="app-shortcuts__row"><dt class="text-body">Search this screen</dt><dd><kbd class="app-keys" aria-hidden="true"><kbd class="app-key">/</kbd></kbd><span class="app-keys__said">Slash</span></dd></div>
|
|
57
|
+
<div class="app-shortcuts__row"><dt class="text-body">Show these keys</dt><dd><kbd class="app-keys" aria-hidden="true"><kbd class="app-key">?</kbd></kbd><span class="app-keys__said">Question mark</span></dd></div>
|
|
58
|
+
<div class="app-shortcuts__row"><dt class="text-body">Close or step back</dt><dd><kbd class="app-keys" aria-hidden="true"><kbd class="app-key">Esc</kbd></kbd><span class="app-keys__said">Escape</span></dd></div>
|
|
59
|
+
</dl>
|
|
60
|
+
</section>
|
|
61
|
+
|
|
62
|
+
<div class="app-shortcuts__foot">
|
|
63
|
+
<label for="ks-single" class="app-switch-row">
|
|
64
|
+
<span class="app-switch-row__text">
|
|
65
|
+
<span class="text-body">Single-key shortcuts</span>
|
|
66
|
+
<span id="ks-single-s" class="text-supporting">Letters like A and R act on their own. Turn off if you use speech input.</span>
|
|
67
|
+
</span>
|
|
68
|
+
<input id="ks-single" type="checkbox" role="switch" class="app-switch" aria-describedby="ks-single-s" checked>
|
|
69
|
+
</label>
|
|
70
|
+
</div>
|
|
71
|
+
</div>
|
|
72
|
+
</aside>
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Behaviour you must supply
|
|
76
|
+
|
|
77
|
+
- **One list of shortcuts** for the product, each with its keys, what it does, and where it works. The sheet, the tooltips and the menu hints all read it, so a key is never shown that doesn't work, and no key works that isn't shown.
|
|
78
|
+
- **`?` toggles the sheet** and Esc closes it, except while focus is in a field. Closing returns focus to whatever had it before.
|
|
79
|
+
- **The switch** is kept per person (not per device) and applied at once: set `data-single-keys="off"` on the root, stop handling single-letter keys, and show the note.
|
|
80
|
+
- **The groups follow the screen**: when what is open changes, rebuild the first group.
|
|
81
|
+
|
|
82
|
+
## Classes
|
|
83
|
+
|
|
84
|
+
`.app-shortcuts`, `__group`, `__heading`, `__note`, `__row`, `__foot`; with `.app-shell__detail`, `.app-titlebar--detail`, `.app-keys`, `.app-switch-row`.
|
|
@@ -7,7 +7,8 @@ The top of every product screen: the name and the verbs; route tabs under the na
|
|
|
7
7
|
See [page.md](../rules/page.md).
|
|
8
8
|
|
|
9
9
|
- **The name is the screen, alone**: never a breadcrumb. One page-title per screen, and the bar has it. A detail screen (its own route) leads with a back [AppIconButton](AppIconButton.md) and keeps the page-title.
|
|
10
|
-
- **The lead is outlined, never filled**: the action that brings a thing into the screen (`app-btn--outlined`, "New environment"), led by `add` when it is New or Add. Other verbs are default-size text buttons and small icon buttons, and no icon on a single verb. The screen's one filled button belongs in the content. Destructive takes `app-btn--error`.
|
|
10
|
+
- **The lead is outlined, never filled**: the action that brings a thing into the screen (`app-btn--outlined`, "New environment"), led by `add` when it is New or Add, and by `edit_square` when it starts a new conversation ("New chat"). Other verbs are default-size text buttons and small icon buttons, and no icon on a single verb. The screen's one filled button belongs in the content. Destructive takes `app-btn--error`.
|
|
11
|
+
- **Never status.** The bar names the screen and holds its verbs: no meter, no usage ring, no saving state, no count. A thing's state is a chip on the detail bar's row or in the content; an account's usage is a row in the account menu ([AppShell](AppShell.md) § The account menu).
|
|
11
12
|
- **The verbs follow the route**: each tab shows the verbs that act on what it shows, and none when there is nothing to act on.
|
|
12
13
|
- **A long name** truncates with an ellipsis and shows in full on hover; never wrap it.
|
|
13
14
|
- **Tabs are routes**, and scroll sideways when they don't fit: each opens another view of this screen (Overview, Interviews, Artifacts). A tab that narrows one list is a filter: put it in the filter row as an [AppSegmented](AppSegmented.md).
|
|
@@ -15,7 +16,16 @@ See [page.md](../rules/page.md).
|
|
|
15
16
|
- **The filter row** is the first thing in `.app-shell__content` (which pads it), one row that narrows the list: search first, then the filters, then the count at the far end ("12 interviews", "3 of 12" while something narrows). Below 600px, search takes the whole first line.
|
|
16
17
|
- **When the list is empty**, keep the name and the verb; hide search and the filter row.
|
|
17
18
|
|
|
18
|
-
**
|
|
19
|
+
**On a phone** (below 600px) the bar is one row, 56 tall, and holds four things and nothing else:
|
|
20
|
+
|
|
21
|
+
1. **Leading**: the menu button (`menu`), which opens the navigation drawer ([AppShell](AppShell.md)); back (`arrow_back`) on a detail route. Nothing on a screen with no navigation (joining an interview, signing in).
|
|
22
|
+
2. **The name**, page-title at its compact step (18/24 at 700, a step above the section-titles under it), truncating.
|
|
23
|
+
3. **The lead as its glyph alone**, its label the accessible name. A lead whose glyph wouldn't read on its own ("Generate key", "Install block") leaves the bar and leads ⋯ instead; a lead with no glyph above 600 can carry one for the phone (`edit` for "Edit session", `app-compact-only` on the glyph).
|
|
24
|
+
4. **⋯** (`more_vert`), an [AppMenu](AppMenu.md) holding every other verb in the order they had, anything destructive last behind a divider. Left out when there are none. Rename lives here: never a double tap on the name.
|
|
25
|
+
|
|
26
|
+
The tabs scroll under it; the filter row is unchanged. The bar has no hairline at rest; add one (an `outline-variant` inset shadow) while content scrolls under it. Mark the parts that exist on only one side `app-compact-only` or `app-wide-only`, so one markup serves both.
|
|
27
|
+
|
|
28
|
+
**Detail bar** (`app-titlebar--detail`), the bar of a detail pane beside a list: a close icon button leading, the selected thing's name in section-title (the screen already has its page-title), and one row under the name: the thing's state first when it has one (a small chip), then its verbs as text buttons, wrapping in a narrow pane, so a 360px pane never truncates the name and the bar stays two rows. Where the pane's content is a centred column (a conversation at the prose measure), the bar aligns to that column. No search, no tabs. On a phone the pane covers the window and its close becomes back (`arrow_back`). The pane pads it; add nothing.
|
|
19
29
|
|
|
20
30
|
## Markup
|
|
21
31
|
|
|
@@ -28,7 +38,7 @@ See [page.md](../rules/page.md).
|
|
|
28
38
|
<h1 class="app-titlebar__title text-page-title" title="Environments">Environments</h1>
|
|
29
39
|
</div>
|
|
30
40
|
<div class="app-titlebar__actions">
|
|
31
|
-
<button type="button" class="app-btn app-state app-target app-btn--outlined"><span class="app-icon" aria-hidden="true">add</span>New environment</button>
|
|
41
|
+
<button type="button" class="app-btn app-state app-target app-btn--outlined app-titlebar__lead"><span class="app-icon" aria-hidden="true">add</span><span class="app-titlebar__label">New environment</span></button>
|
|
32
42
|
</div>
|
|
33
43
|
</div>
|
|
34
44
|
<!-- Optional route tabs -->
|
|
@@ -38,14 +48,35 @@ See [page.md](../rules/page.md).
|
|
|
38
48
|
</nav>
|
|
39
49
|
</header>
|
|
40
50
|
|
|
51
|
+
<!-- On a phone: the menu button leads; the lead keeps its markup and shows its glyph alone; ⋯ holds the other verbs -->
|
|
52
|
+
<header class="app-titlebar">
|
|
53
|
+
<div class="app-titlebar__row">
|
|
54
|
+
<div class="app-titlebar__name">
|
|
55
|
+
<span class="app-titlebar__leading app-compact-only">
|
|
56
|
+
<button type="button" class="app-icon-btn app-state app-target" aria-label="Menu" aria-expanded="false" aria-controls="nav"><span class="app-icon" aria-hidden="true">menu</span></button>
|
|
57
|
+
</span>
|
|
58
|
+
<h1 class="app-titlebar__title text-page-title" title="Customer onboarding research">Customer onboarding research</h1>
|
|
59
|
+
</div>
|
|
60
|
+
<div class="app-titlebar__actions">
|
|
61
|
+
<button type="button" class="app-btn app-state app-target app-wide-only">Set project goal</button>
|
|
62
|
+
<button type="button" class="app-btn app-state app-target app-btn--outlined app-titlebar__lead"><span class="app-icon" aria-hidden="true">add</span><span class="app-titlebar__label">Add contribution</span></button>
|
|
63
|
+
<button type="button" class="app-icon-btn app-state app-target app-compact-only" aria-label="More actions" aria-haspopup="menu" aria-expanded="false" aria-controls="m-bar"><span class="app-icon" aria-hidden="true">more_vert</span></button>
|
|
64
|
+
</div>
|
|
65
|
+
</div>
|
|
66
|
+
</header>
|
|
67
|
+
<!-- m-bar: Set project goal, Rename, Share, a divider, Delete project -->
|
|
68
|
+
|
|
41
69
|
<!-- Detail bar: h2 in section-title, no search, no tabs -->
|
|
42
70
|
<header class="app-titlebar app-titlebar--detail">
|
|
43
71
|
<div class="app-titlebar__row">
|
|
44
72
|
<div class="app-titlebar__name">
|
|
45
73
|
<span class="app-titlebar__leading">
|
|
46
|
-
<button type="button" class="app-icon-btn app-state app-target app-icon-btn--small" aria-label="Close details" title="Close details">
|
|
74
|
+
<button type="button" class="app-icon-btn app-state app-target app-icon-btn--small app-wide-only" aria-label="Close details" title="Close details">
|
|
47
75
|
<span class="app-icon" aria-hidden="true">close</span>
|
|
48
76
|
</button>
|
|
77
|
+
<button type="button" class="app-icon-btn app-state app-target app-icon-btn--small app-compact-only" aria-label="Back to environments">
|
|
78
|
+
<span class="app-icon" aria-hidden="true">arrow_back</span>
|
|
79
|
+
</button>
|
|
49
80
|
</span>
|
|
50
81
|
<h2 class="app-titlebar__title text-section-title" title="staging">staging</h2>
|
|
51
82
|
</div>
|
|
@@ -60,7 +91,9 @@ See [page.md](../rules/page.md).
|
|
|
60
91
|
<div class="app-filterrow">
|
|
61
92
|
<label class="app-search app-filterrow__search" role="search">
|
|
62
93
|
<span class="app-icon" aria-hidden="true">search</span>
|
|
63
|
-
<input class="app-search__input" type="search" placeholder="Search environments" aria-label="Search environments">
|
|
94
|
+
<input class="app-search__input" type="search" placeholder="Search environments" aria-label="Search environments" aria-keyshortcuts="/">
|
|
95
|
+
<!-- The screen's key: the CSS shows it only while the field is empty and unfocused -->
|
|
96
|
+
<kbd class="app-keys" aria-hidden="true"><kbd class="app-key">/</kbd></kbd>
|
|
64
97
|
<!-- Only while the input has a value: -->
|
|
65
98
|
<button type="button" class="app-search__clear app-state app-target" aria-label="Clear search">
|
|
66
99
|
<span class="app-icon" aria-hidden="true">close</span>
|
|
@@ -77,11 +110,13 @@ See [page.md](../rules/page.md).
|
|
|
77
110
|
## Behaviour you must supply
|
|
78
111
|
|
|
79
112
|
- Set `title` on the heading to the full name (the hover text for a truncated name).
|
|
113
|
+
- **On a phone**: build ⋯ from the verbs the wide bar shows (the `app-wide-only` ones), in the same order, leading with the lead when it leaves the bar. Give the menu button `aria-expanded` and `aria-controls` pointing at the navigation pane. A tooltip never shows on touch: the lead's label is its accessible name.
|
|
80
114
|
- **Search**: filter as the user types a list you already hold; where the search goes to a server, run it on Enter and say so in the placeholder. Show the clear button only while the input has a value; clear empties the input, re-filters and returns focus to the input. Keep the query in the URL (`?q=`), so back, refresh and a shared link keep it.
|
|
115
|
+
- **`/`** puts focus in the screen's search field from anywhere on the screen, except while focus is in another field ([shortcuts.md](../rules/shortcuts.md)). A section's or a pane's own search has no `/` and no cap: one field per screen answers to it.
|
|
81
116
|
- **The count** answers the row: the total at rest, "2 of 5" while a query or a filter narrows.
|
|
82
117
|
- **Tabs**: they are routes. Move `is-selected` and `aria-current="page"` to the current tab when the route changes. If your router renders links, `<a class="app-tab app-state" href="…">` takes the same classes.
|
|
83
118
|
- Hide search and the filter row when the list is empty.
|
|
84
119
|
|
|
85
120
|
## Classes
|
|
86
121
|
|
|
87
|
-
`.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`; `.app-tabs`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
|
|
122
|
+
`.app-titlebar`, `.app-titlebar--detail`, `.app-titlebar__row`, `.app-titlebar__name`, `.app-titlebar__leading`, `.app-titlebar__title`, `.app-titlebar__actions`, `.app-titlebar__lead`, `.app-titlebar__label`; `.app-compact-only`, `.app-wide-only`; `.app-tabs`, `.app-tab`, `.is-selected`; `.app-filterrow`, `.app-filterrow__search`, `.app-filterrow__controls`, `.app-filterrow__summary`; `.app-search`, `.app-search__input`, `.app-search__clear`.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# AppTooltip
|
|
2
|
+
|
|
3
|
+
Names a control that shows no words, and carries its keys ([shortcuts.md](../rules/shortcuts.md)).
|
|
4
|
+
|
|
5
|
+
## Use / don't use
|
|
6
|
+
|
|
7
|
+
- **Every [AppIconButton](AppIconButton.md)** has one, with the button's label. It replaces the browser's `title`: where a guide shows `title` on an icon button, render a tooltip with the same words instead, never both.
|
|
8
|
+
- **A text button** has one only when it has a shortcut, and then it says the label and the keys ("Approve", A).
|
|
9
|
+
- **A truncated name** (a title bar, a row) may show its full text in one.
|
|
10
|
+
- **Never anything you can press or select.** A link, a button, a second paragraph: that is a menu or a dialog. Never on a disabled control to explain why: say why next to it.
|
|
11
|
+
- **Never on touch.** On a coarse pointer there is no hover; the label is the accessible name.
|
|
12
|
+
|
|
13
|
+
## Anatomy
|
|
14
|
+
|
|
15
|
+
| Part | What it is |
|
|
16
|
+
|---|---|
|
|
17
|
+
| **Surface** | `inverse-surface`, `radius-sm`, no shadow; 28 tall for one line, at most 240 wide, wrapping after that |
|
|
18
|
+
| **Label** | `on-inverse-surface` at 12/16 500, sentence case, no full stop: the action ("Resolve conversation") |
|
|
19
|
+
| **Keys** | An [AppKeys](AppKeys.md) after the label, 8 from it, the tooltip's end padding drawn in to 4 |
|
|
20
|
+
| **Place** | 4 below the control, centred on it; flipped above when there isn't room below, and kept 8 inside the window |
|
|
21
|
+
|
|
22
|
+
## Markup
|
|
23
|
+
|
|
24
|
+
```html
|
|
25
|
+
<!-- The label is the control's accessible name and aria-keyshortcuts its keys; the tooltip shows both -->
|
|
26
|
+
<button type="button" class="app-icon-btn app-state app-target" aria-label="Resolve conversation" aria-keyshortcuts="R">
|
|
27
|
+
<span class="app-icon" aria-hidden="true">check_circle</span>
|
|
28
|
+
</button>
|
|
29
|
+
<div class="app-tooltip" id="tt-3" role="tooltip" hidden>
|
|
30
|
+
Resolve conversation
|
|
31
|
+
<kbd class="app-keys app-keys--single" aria-hidden="true"><kbd class="app-key">R</kbd></kbd>
|
|
32
|
+
</div>
|
|
33
|
+
|
|
34
|
+
<!-- No shortcut: the label alone -->
|
|
35
|
+
<div class="app-tooltip" id="tt-4" role="tooltip" hidden>More actions</div>
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
## Behaviour you must supply
|
|
39
|
+
|
|
40
|
+
- **Open** 200ms after the pointer rests on the control, or at once when it takes keyboard focus. Once one tooltip is open, the next opens at once while the pointer moves along a row of controls.
|
|
41
|
+
- **Close** when the pointer leaves or focus moves, when the control is pressed, when the page scrolls, and on Escape.
|
|
42
|
+
- **Place it** with `position: fixed` against the control's box; flip above near the window's bottom.
|
|
43
|
+
- **Render it once**, near the end of the document or in a portal, so a scrolling pane or an `overflow: hidden` parent can't clip it. Toggle `hidden`.
|
|
44
|
+
- **Assistive technology** already has the label (`aria-label`) and the keys (`aria-keyshortcuts`), so don't point `aria-describedby` at the tooltip unless it says more than the label, as a truncated name's full text does.
|
|
45
|
+
|
|
46
|
+
## Classes
|
|
47
|
+
|
|
48
|
+
`.app-tooltip`.
|
package/components/README.md
CHANGED
|
@@ -23,6 +23,9 @@ Shared conventions: `app-state` gives anything pressable its hover, focus and pr
|
|
|
23
23
|
| AppTextField | A labelled input; the field set and the form | [AppTextField.md](AppTextField.md) |
|
|
24
24
|
| AppSelect | One choice from a list, native select | [AppSelect.md](AppSelect.md) |
|
|
25
25
|
| AppSwitch | An on/off setting | [AppSwitch.md](AppSwitch.md) |
|
|
26
|
+
| AppTooltip | Names a control that shows no words, and carries its keys | [AppTooltip.md](AppTooltip.md) |
|
|
27
|
+
| AppKeys | A keyboard shortcut, one cap per key, written for the platform | [AppKeys.md](AppKeys.md) |
|
|
28
|
+
| AppShortcutSheet | Every key the screen answers to, opened by `?`, in the detail pane's place | [AppShortcutSheet.md](AppShortcutSheet.md) |
|
|
26
29
|
| AppChip | A small fact: status, label, category, filter, input | [AppChip.md](AppChip.md) |
|
|
27
30
|
| AppAlert | A statement carrying one status; the snackbar | [AppAlert.md](AppAlert.md) |
|
|
28
31
|
| AppDialog | A confirmation or short form over a scrim | [AppDialog.md](AppDialog.md) |
|
|
@@ -53,7 +56,6 @@ The screen most product work becomes. Build it, then fill in the behaviour from
|
|
|
53
56
|
<nav class="app-shell__nav" aria-label="Main">
|
|
54
57
|
<a class="app-brand" href="/" aria-label="AlisX home">
|
|
55
58
|
<img class="app-brand__wordmark" src="assets/Brand/alis_exchange.svg" alt="" height="36">
|
|
56
|
-
<img class="app-brand__mark" src="assets/Brand/alis.svg" alt="" height="24">
|
|
57
59
|
</a>
|
|
58
60
|
<!-- Home, Skill Store, then Ideate's group -->
|
|
59
61
|
<p class="app-nav-heading">Build</p>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alis-build/design-system",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.13.0",
|
|
4
4
|
"description": "The AlisX design system for coding agents: tokens, product CSS, component markup, capability marks and rules.",
|
|
5
5
|
"keywords": ["alisx", "design-system", "design-tokens", "css"],
|
|
6
6
|
"homepage": "https://alisx.com",
|
package/rules/README.md
CHANGED
|
@@ -25,6 +25,7 @@ Read only what the job needs.
|
|
|
25
25
|
| [loading.md](loading.md) | Skeleton, loader, progress |
|
|
26
26
|
| [page.md](page.md) | Page anatomy, forms, empty states |
|
|
27
27
|
| [icons.md](icons.md) | Material Symbols and the capability marks |
|
|
28
|
+
| [shortcuts.md](shortcuts.md) | How a key is written, where it shows, the sheet, the keys that mean the same everywhere |
|
|
28
29
|
| [styling.md](styling.md) | What your own CSS may set |
|
|
29
30
|
| [anti-patterns.md](anti-patterns.md) | A1–D6, and the smell test to run before handing back |
|
|
30
31
|
|
package/rules/buttons.md
CHANGED
|
@@ -91,6 +91,12 @@ similar controls people scan repeatedly, and the glyph is conventional.
|
|
|
91
91
|
its glyph is `add`. "Add a follow-up round" works inside a thing and keeps none,
|
|
92
92
|
and so does a field's own action ("Add" beside an input, taking what you
|
|
93
93
|
typed): it is that field's affirmative.
|
|
94
|
+
- **`edit_square` on a new conversation.** `add` brings something into what you
|
|
95
|
+
are looking at: a project into the list, a file into the message. A new chat
|
|
96
|
+
brings nothing in; it leaves this conversation for a blank one, so "New chat"
|
|
97
|
+
and "New conversation" lead with `edit_square`, as does a rail row's "new" for
|
|
98
|
+
them ([AppShell](../components/AppShell.md)). On a conversation, that keeps the
|
|
99
|
+
composer's `add` the only + on screen.
|
|
94
100
|
- **No other icon on a lead**, filled or outlined, and none on a dialog action:
|
|
95
101
|
"Create project" finishes what New started.
|
|
96
102
|
- One icon, leading. The only trailing icon is a chevron meaning "opens a menu".
|
package/rules/icons.md
CHANGED
|
@@ -15,7 +15,7 @@ library, and nothing else hand-drawn. Self-host the subset you use.
|
|
|
15
15
|
- An icon never appears without a label or an accessible name.
|
|
16
16
|
- Icons inherit `currentColor`. **Never set a fill on the glyph.**
|
|
17
17
|
- **No emoji, ever**, and no unicode substitutes except the three the brand owns:
|
|
18
|
-
`❯` the prompt caret, `◼` the agent's reply mark, `→` a trailing link arrow.
|
|
18
|
+
`❯` the prompt caret, `◼` the agent's reply mark, `→` a trailing link arrow. Key caps write the keys' own symbols (⌘ ⇧ ⌥ ⌃ ↑ ↓ ← →) ([shortcuts.md](shortcuts.md)).
|
|
19
19
|
- Prefer an icon's current name over a legacy one that still resolves (`mail`,
|
|
20
20
|
not `email`).
|
|
21
21
|
- **Send is `arrow_upward`**, in the composer's filled circle: it points into the
|
package/rules/known-gaps.md
CHANGED
|
@@ -6,14 +6,13 @@ What the system doesn't decide yet, in one place. When you hit one, take the qui
|
|
|
6
6
|
|
|
7
7
|
- **Comboboxes** (a searchable or multi-value select) and **date and time pickers**. Use `AppSelect` or a text field with a format hint.
|
|
8
8
|
- **Checkboxes and radios** as standalone controls. A labelled set of choices is `AppSelectTile`s in an `AppFieldset`; an on/off setting is `AppSwitch`.
|
|
9
|
-
- **Tooltips** beyond the native `title` that `AppIconButton` sets (the product's opens below after 200ms, at most 240px wide).
|
|
10
9
|
- **The marketing components** (`.ax-*`, alisx.com) are not in this package: it covers the product register. A layout class for a grid of lattices is missing too.
|
|
11
10
|
- **What the Skill store and the Specialists offer**, beyond their one-line descriptions in [README.md](README.md). Marketing copy about them needs a product brief.
|
|
12
11
|
- **Tabs outside the title bar**, **avatars** as a component ([chips-alerts.md](chips-alerts.md) has the rule), **file upload**, and a **dismissible alert**.
|
|
13
12
|
|
|
14
13
|
## Open patterns
|
|
15
14
|
|
|
16
|
-
- **Finding anything across the product** (a project, an interview, a skill, an environment) from any screen. A screen's search narrows the list in front of you ([page.md](page.md) § Search); this is a different job. The likely shape is a Search row at the top of the rail with ⌘K, opening a dialog grouped like the `@` menu, once a search across products exists.
|
|
15
|
+
- **Finding anything across the product** (a project, an interview, a skill, an environment) from any screen. A screen's search narrows the list in front of you ([page.md](page.md) § Search); this is a different job. The likely shape is a Search row at the top of the rail with ⌘ K (reserved for it: [shortcuts.md](shortcuts.md)), opening a dialog grouped like the `@` menu, once a search across products exists.
|
|
17
16
|
- **Navigation inside a project.** Open objects can sit in the navigation pane as secondary rows under a heading ([AppShell](../components/AppShell.md)), and an object's own views are route tabs in its title bar. A project's own destinations beside the app's have no pattern yet.
|
|
18
17
|
- **Versions of generated content.** Regenerating replaces a synthesis; keeping or comparing earlier versions has no pattern.
|
|
19
18
|
- **Withdrawing a request, and approval chains.** A person can't withdraw a request they made, and a request that needs several approvers in turn has no pattern ([AppAsk](../components/AppAsk.md) § Who asks). An approval chain would be its own component: its parts and interaction differ.
|
package/rules/page.md
CHANGED
|
@@ -39,9 +39,11 @@ filter**, and a filter belongs in the filter row as a segmented control
|
|
|
39
39
|
- **Its controls are small icon buttons and default-size buttons.** The row
|
|
40
40
|
is `control-height` tall, so a larger control pushes the tabs down; every
|
|
41
41
|
control keeps its hit area ([buttons.md](buttons.md)). Icon buttons stay
|
|
42
|
-
`on-surface-variant
|
|
43
|
-
|
|
44
|
-
|
|
42
|
+
`on-surface-variant` beside labelled verbs; on a phone, where the glyphs are the
|
|
43
|
+
verbs, they take `on-surface`. A detail bar's state chip is small.
|
|
44
|
+
- **Never status**: no meter, usage ring, saving state or count in the bar. An
|
|
45
|
+
account's usage is a row in the account menu
|
|
46
|
+
([AppShell](../components/AppShell.md)).
|
|
45
47
|
- **The bar's lead is outlined, never filled**: the action that brings a thing
|
|
46
48
|
into the screen ("New environment"). Its other verbs are text buttons or icon
|
|
47
49
|
buttons. The bar is chrome; the screen's one filled button belongs in the
|
|
@@ -69,6 +71,16 @@ truncates and the bar stays two rows. Where the pane's content is a centred colu
|
|
|
69
71
|
persistent chrome does ([spacing.md](spacing.md) § Measure). A notice about that thing sits at
|
|
70
72
|
the top of the pane.
|
|
71
73
|
|
|
74
|
+
**A detail pane has a URL**: a query parameter, as search keeps `?q=`. Opening it
|
|
75
|
+
pushes a history entry, choosing another row replaces that entry, and closing goes
|
|
76
|
+
back, at every width; on a phone, where the pane covers the window, its close
|
|
77
|
+
becomes back (`arrow_back`) and the phone's back gesture closes it
|
|
78
|
+
([AppShell](../components/AppShell.md)).
|
|
79
|
+
|
|
80
|
+
**On a phone** the title bar is one row: menu or back, the name, the lead as its
|
|
81
|
+
glyph, ⋯ for every other verb ([AppTitleBar](../components/AppTitleBar.md) § On a
|
|
82
|
+
phone). Nothing else earns a place in it.
|
|
83
|
+
|
|
72
84
|
## The filter row
|
|
73
85
|
|
|
74
86
|
`.app-filterrow`. The first thing in the content, directly above what it scopes,
|
package/rules/quick-start.md
CHANGED
|
@@ -29,7 +29,7 @@ AppShell
|
|
|
29
29
|
| You need | Use |
|
|
30
30
|
|---|---|
|
|
31
31
|
| The frame and the navigation rail | `AppShell` |
|
|
32
|
-
| The screen's name, verbs | `AppTitleBar`. Its lead ("New environment") is `AppButton variant="outlined"`, led by `add` when it is New or Add; other verbs are text or icon buttons; no icon on a single verb |
|
|
32
|
+
| The screen's name, verbs | `AppTitleBar`. Its lead ("New environment") is `AppButton variant="outlined"`, led by `add` when it is New or Add (`edit_square` for a new conversation); other verbs are text or icon buttons; no icon on a single verb; never status. On a phone, one row: menu, name, the lead's glyph, ⋯ |
|
|
33
33
|
| To search or narrow one list | `AppFilterRow`: `search` first, then `AppSegmented` or filter `AppChip`s, the count last ("2 of 5" while narrowed) |
|
|
34
34
|
| The bar of a detail pane | `AppTitleBar variant="detail"`: close, the name in section-title, its verbs on a row below |
|
|
35
35
|
| To narrow one list | `AppFilterRow` + `AppSegmented` (2–5 options) or filter `AppChip`s |
|
|
@@ -47,6 +47,8 @@ AppShell
|
|
|
47
47
|
| The one action that moves the user forward | `AppButton variant="filled"`, once per screen, labelled with the outcome; never in the title bar |
|
|
48
48
|
| The lead of a surface that starts something (the title bar, a pane, an empty state) | `AppButton variant="outlined"`, once per surface; never in a card or a repeated item |
|
|
49
49
|
| Everything else you press | `AppButton` (text, in ink), `AppIconButton` |
|
|
50
|
+
| A control's name on hover, and its shortcut | `AppTooltip`: every icon button has one; a text button only to carry its keys. Keys are `AppKeys`, never in a label |
|
|
51
|
+
| The keys a screen answers to | `AppShortcutSheet`, opened by `?` and from the account menu, in the detail pane's place |
|
|
50
52
|
| A form | `.app-form` of fields, one filled action last (see § Forms) |
|
|
51
53
|
| Text | `AppTextField` (with `action` for one that collects several values, shown as input `AppChip`s below) |
|
|
52
54
|
| One choice from a list | `AppSelect` |
|
|
@@ -119,7 +121,7 @@ AppShell detail={…}
|
|
|
119
121
|
|
|
120
122
|
## 7. Copy
|
|
121
123
|
|
|
122
|
-
Sentence case, British spelling, plain and calm, no dashes, no emoji. Buttons are a verb then the object: **New project**, **Add member**. A filled button names its outcome: "Send the invites", not "Continue". An empty state's headline says why you would act, never the screen's name. An error says what to do next, in a sentence with a full stop. Times are relative and short: "Just now", "5 min ago", "3h ago", "Yesterday", then a date ("3 Oct", three-letter months, with the year only when it isn't this one).
|
|
124
|
+
Sentence case, British spelling, plain and calm, no dashes, no emoji. Buttons are a verb then the object: **New project**, **Add member**. A filled button names its outcome: "Send the invites", not "Continue". An empty state's headline says why you would act, never the screen's name. An error says what to do next, in a sentence with a full stop. Times are relative and short: "Just now", "5 min ago", "3h ago", "Yesterday", then a date ("3 Oct", three-letter months, with the year only when it isn't this one). A key is an `AppKeys` cap written for the platform (⌘ K on a Mac, Ctrl K elsewhere), never "Ctrl+K" or "Press Enter to send" in text.
|
|
123
125
|
|
|
124
126
|
## 8. Before you hand it back
|
|
125
127
|
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# Keyboard shortcuts
|
|
2
|
+
|
|
3
|
+
**One way to write a key, three places to show it, one sheet that lists them all.**
|
|
4
|
+
This file decides how a shortcut is shown and which keys mean the same thing on
|
|
5
|
+
every screen. Which other keys a screen binds is that screen's own choice.
|
|
6
|
+
|
|
7
|
+
## Writing a key
|
|
8
|
+
|
|
9
|
+
A shortcut is an [AppKeys](../components/AppKeys.md): one cap per key, side by
|
|
10
|
+
side, never a plus sign and never brackets.
|
|
11
|
+
|
|
12
|
+
| Key | On a Mac | On Windows and Linux |
|
|
13
|
+
| --- | --- | --- |
|
|
14
|
+
| The command modifier (`mod`) | ⌘ | Ctrl |
|
|
15
|
+
| Shift | ⇧ | Shift |
|
|
16
|
+
| Option / Alt | ⌥ | Alt |
|
|
17
|
+
| Control, where it differs from `mod` | ⌃ | Ctrl |
|
|
18
|
+
|
|
19
|
+
- **Detect the platform once**, for the whole product, and write every shortcut
|
|
20
|
+
for it. Never two spellings side by side ("⌘K / Ctrl K").
|
|
21
|
+
- **Modifiers first**, in the platform's order: ⌃ ⌥ ⇧ ⌘ on a Mac, Ctrl Alt Shift
|
|
22
|
+
elsewhere.
|
|
23
|
+
- **Named keys are words** on every platform: Enter, Esc, Tab, Space, Delete,
|
|
24
|
+
Backspace. **Arrows are arrows**: ↑ ↓ ← →.
|
|
25
|
+
- **A capital is written with Shift**: ⇧ U, never "U" beside "u". A letter cap
|
|
26
|
+
is always the capital.
|
|
27
|
+
- **A sequence says "then"**: G then H. Two caps with nothing between them are
|
|
28
|
+
pressed together.
|
|
29
|
+
- **Keys for another app** (a setup guide: "In PowerShell, press Ctrl V") use that
|
|
30
|
+
guide's platform, not the one detected.
|
|
31
|
+
|
|
32
|
+
## Where a key shows
|
|
33
|
+
|
|
34
|
+
Only where someone is already looking at the control it works. Nowhere else.
|
|
35
|
+
|
|
36
|
+
1. **The tooltip** ([AppTooltip](../components/AppTooltip.md)): the label, then the
|
|
37
|
+
keys. A text button that has a shortcut takes a tooltip only to carry its keys.
|
|
38
|
+
2. **The menu row** ([AppMenu](../components/AppMenu.md)): the keys in the row's
|
|
39
|
+
trailing hint.
|
|
40
|
+
3. **The screen's search field** ([AppTitleBar](../components/AppTitleBar.md)): a
|
|
41
|
+
`/` cap at its end, while it is empty and unfocused. A field has no tooltip.
|
|
42
|
+
|
|
43
|
+
**On a touch screen, none of them.** Tooltips don't open, the search field's cap
|
|
44
|
+
and a menu row's keys leave (the CSS does it on a coarse pointer), and the account
|
|
45
|
+
menu leaves out **Keyboard shortcuts**. Keys in prose stay: a setup guide still
|
|
46
|
+
says what to press on the computer it is about.
|
|
47
|
+
|
|
48
|
+
Never inside a button's label, never in brackets after it ("Submit (Ctrl+Enter)"),
|
|
49
|
+
and no hint lines: not under a composer ("Press Enter to send"), not under a
|
|
50
|
+
picker ("↑↓ to navigate"). Enter sends and Shift Enter breaks the line in every
|
|
51
|
+
composer; Send's tooltip says so, and the sheet lists both.
|
|
52
|
+
|
|
53
|
+
## The sheet
|
|
54
|
+
|
|
55
|
+
Every key the screen answers to, in one place: an
|
|
56
|
+
[AppShortcutSheet](../components/AppShortcutSheet.md). It opens from `?` and from
|
|
57
|
+
a **Keyboard shortcuts** row in the account menu, and takes the detail pane's
|
|
58
|
+
place, so it never covers the controls it describes and every key in it works
|
|
59
|
+
while it is open. **This screen's keys first, then Everywhere.** A key that does
|
|
60
|
+
nothing here is left out, not dimmed.
|
|
61
|
+
|
|
62
|
+
## The same everywhere
|
|
63
|
+
|
|
64
|
+
| Keys | Does |
|
|
65
|
+
| --- | --- |
|
|
66
|
+
| ? | Opens or closes the sheet |
|
|
67
|
+
| Esc | Closes what is open (a menu, a dialog, the sheet), or leaves the field you are in |
|
|
68
|
+
| / | Puts you in the screen's search field |
|
|
69
|
+
| ⌘ K | Reserved for finding anything across the product ([known-gaps.md](known-gaps.md)); bind nothing to it |
|
|
70
|
+
|
|
71
|
+
A screen never rebinds these, and never takes a key the browser or the operating
|
|
72
|
+
system owns (⌘ W, ⌘ T, ⌘ L, ⌘ R, ⌘ F, ⌘ P, ⌘ Q, Ctrl Tab).
|
|
73
|
+
|
|
74
|
+
## Single keys
|
|
75
|
+
|
|
76
|
+
A screen may bind single letters for the verbs a person repeats (A approves, R
|
|
77
|
+
resolves). Three conditions:
|
|
78
|
+
|
|
79
|
+
- **Never while typing.** A single key does nothing while focus is in a field, an
|
|
80
|
+
editor or anything that takes text.
|
|
81
|
+
- **They can be turned off.** The sheet's foot holds an
|
|
82
|
+
[AppSwitch](../components/AppSwitch.md), **Single-key shortcuts**, kept per
|
|
83
|
+
person. Off, every single-letter shortcut stops working and its caps leave
|
|
84
|
+
tooltips and menus; the sheet keeps them, dimmed, under a note saying they are
|
|
85
|
+
off. Speech input types letters, and a stray one must not approve anything.
|
|
86
|
+
- **The same letter, the same act.** R resolves wherever there is something to
|
|
87
|
+
resolve; it never means Reply on another screen.
|
|
88
|
+
|
|
89
|
+
## Accessible names
|
|
90
|
+
|
|
91
|
+
- **On a control**, the caps are decoration: hide them from assistive technology
|
|
92
|
+
and give the control `aria-keyshortcuts` (`R`, `Meta+L`, `Control+L`,
|
|
93
|
+
`Shift+U`).
|
|
94
|
+
- **In the sheet and in prose**, the keys are the content: say them in words
|
|
95
|
+
(`.app-keys__said`, "Command K"), since a screen reader can't read ⌘ or ⇧.
|
package/rules/type.md
CHANGED
|
@@ -31,6 +31,10 @@ Default when unsure: **body**.
|
|
|
31
31
|
|
|
32
32
|
Three more styles, each with one place:
|
|
33
33
|
|
|
34
|
+
- **`text-page-title` on a phone** is 18/24 at 700 (below 600px): the size of a
|
|
35
|
+
section-title, a weight above it, so a long name has room in a one-row bar
|
|
36
|
+
([AppTitleBar](../components/AppTitleBar.md) § On a phone) and still reads as the
|
|
37
|
+
screen's name over the sections under it. The CSS steps it; there is no second class.
|
|
34
38
|
- **`text-welcome-title`**, 40/48 at 800 (32/40 below 600px): the heading of an
|
|
35
39
|
entry screen that addresses the user ([page.md](page.md)). Never a table, form,
|
|
36
40
|
dialog or card.
|
package/tokens.json
CHANGED
|
@@ -576,7 +576,7 @@
|
|
|
576
576
|
"lineHeight": "36px",
|
|
577
577
|
"fontWeight": 700,
|
|
578
578
|
"letterSpacing": "-0.03em",
|
|
579
|
-
"usage": "Names the whole screen. One per screen, in the title bar."
|
|
579
|
+
"usage": "Names the whole screen. One per screen, in the title bar. 18/24 below 600px, still at 700."
|
|
580
580
|
},
|
|
581
581
|
{
|
|
582
582
|
"name": "text-section-title",
|