@filipgutica/design-system 1.0.44 → 1.0.46
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/README.md +3 -1
- package/language/DESIGN.md +3 -1
- package/language/components.html +128 -126
- package/language/components.md +28 -17
- package/language/conversation.css +135 -0
- package/language/decisions.md +1 -1
- package/language/feedback.css +36 -0
- package/language/guide.html +13 -2
- package/language/reference.html +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -10,7 +10,7 @@ Filip's design language for any framework: the spec, the tokens, the component c
|
|
|
10
10
|
|
|
11
11
|
| Path | What it holds |
|
|
12
12
|
| --- | --- |
|
|
13
|
-
| `language/` | The payload: `DESIGN.md`, `components.md`, `decisions.md`, `visualizations.md`, `tokens.css`, the experimental `ui-sdk.css` component styles for ui-sdk, the catalogue (`components.html`), example pages, visualization helpers, and the Graphite Indigo editor theme |
|
|
13
|
+
| `language/` | The payload: `DESIGN.md`, `components.md`, `decisions.md`, `visualizations.md`, `tokens.css`, the experimental `ui-sdk.css` component styles for ui-sdk, the badge's and alert's styles (`feedback.css`), the conversation components' styles (`conversation.css`), the catalogue (`components.html`), example pages, visualization helpers, and the Graphite Indigo editor theme |
|
|
14
14
|
| `skills/design-system/`, `.claude-plugin/`, `.codex-plugin/`, `.agents/plugins/` | The agent plugin: the skill that points agents at `language/`, and the Claude and Codex plugin and marketplace manifests. The repository root is the plugin root |
|
|
15
15
|
| `tokens/core.json`, `tokens/themes/*.tokens.json` | The token values, the only place a value lives, and each token's role. Core holds every token; each theme file is a W3C Design Tokens file (2025.10) that holds only its name, a note, its hue pair, and optional fonts, base radius, neutrals, and text on the hue; see [Theme files](#theme-files) |
|
|
16
16
|
| `scripts/build-tokens.mjs` | The token generator: writes `language/tokens.css`, `dist/`, and the theme mapper's `core.js`; generates and checks declarations from JSDoc for `theme-mapper/` and `open-vsx/` |
|
|
@@ -35,6 +35,8 @@ npm install @filipgutica/design-system
|
|
|
35
35
|
| --- | --- |
|
|
36
36
|
| `@filipgutica/design-system/tokens.css` | The tokens. Dark mode follows `prefers-color-scheme`; set `data-theme="light"` or `"dark"` on `<html>` to override it. `data-theme="light"` or `"dark"` on any element below `<html>`, or a `.dark` class on `<html>` or below it, themes that subtree: every token that changes with the mode resolves again inside it. The subtree takes its mode's text colour; on an element with both, `data-theme="light"` wins over `.dark`. A theme written by hand sets its hue pair once, on `:root`: `tokens.css` switches `--color-accent` between `--color-project` and `--color-project-dark` by mode, so the rule works after `tokens.css`, in its cascade layer or a later one. A theme that also sets neutrals or text on the hue repeats those light values on `:root [data-theme="light"]` and the dark ones on the selectors of the dark subtree block at the end of `tokens.css`, beside its `:root` and root dark rules, so they hold in a subtree too; a theme file from the token build does this already. |
|
|
37
37
|
| `@filipgutica/design-system/ui-sdk.css` | Experimental: draws [ui-sdk](https://ui-sdk.dev)'s headless Button, Field, Input, Textarea, Checkbox, and Radio as the component specs do, checked against `@ui-sdk/*` 0.1.0-beta.5. Load it after `tokens.css`, without ui-sdk's `web.css`; [DESIGN.md](language/DESIGN.md#ui-sdk-experimental) gives the layer order and the supported components. |
|
|
38
|
+
| `@filipgutica/design-system/language/conversation.css` | The conversation components (message row and group, hover toolbar, thread panel, composer, tool-call disclosure, and mention) as [components.md](language/components.md#message-row) specifies them, for any framework; the catalogue links the same file. Load it after `tokens.css`. Its rules are unlayered, as the catalogue's are; the badge and alert they hold come from `feedback.css`, and the button, quiet action, overflow menu, and field error from their own components. |
|
|
39
|
+
| `@filipgutica/design-system/language/feedback.css` | The [badge](language/components.md#badge) (neutral and the success, warning, danger, and info tones) and the [alert](language/components.md#alert), for any framework; ui-sdk has no badge or alert part, and the catalogue links the same file. Load it after `tokens.css`. Its rules are unlayered, as the catalogue's are. |
|
|
38
40
|
| `@filipgutica/design-system/themes/*.css` | A theme's inputs (hue pair, and any fonts, base radius, or neutrals): `graphite-indigo` (the default, already in `tokens.css`); the family sites' hues `lagoon` (annoterm), `copper` (devps), `iris` (filip-stack), `lapis` (Workbench), and `fern` (wtree); or the open palettes `catppuccin` and `github`. Load one after `tokens.css`, in its cascade layer or a later one, on `:root`. |
|
|
39
41
|
| `@filipgutica/design-system/themes/*.tokens.json` | Each theme's source as a W3C Design Tokens file (2025.10), for design-token tools such as Style Dictionary and Tokens Studio. |
|
|
40
42
|
| `@filipgutica/design-system/fonts.css` | Inter and JetBrains Mono, the default theme's fonts. |
|
package/language/DESIGN.md
CHANGED
|
@@ -45,6 +45,8 @@ Center the **container**, not every sentence. Align header, content, images, and
|
|
|
45
45
|
- `ui-sdk.css`: experimental. Draws ui-sdk's headless parts as the component specs do; see [ui-sdk](#ui-sdk-experimental).
|
|
46
46
|
- `components.md`: one spec for each component, with anatomy, states, Do and Don't lines, keyboard and screen-reader behavior, motion, and forced colors. Read it for any component work.
|
|
47
47
|
- `components.html`: every component in each of its states, in plain HTML and CSS on `tokens.css`. Copy component markup and styles from there.
|
|
48
|
+
- `conversation.css`: the conversation components' styles (message row and group, hover toolbar, thread panel, composer, tool-call disclosure, and mention). `components.html` links it, so it is their one source. Load it after `tokens.css`, unlayered, as the catalogue does; the parts these components hold, such as the badge and the button, come from their own components.
|
|
49
|
+
- `feedback.css`: the badge's and the alert's styles, with their status tones. It and `conversation.css` size and stroke the icons they hold (the alert's icon and the resolution note's check), so a page supplies only the SVG sprite, not an icon class. `components.html` links it, so it is their one source; ui-sdk has no badge or alert part. Load it after `tokens.css`, unlayered.
|
|
48
50
|
- `decisions.md`: the choices behind the components, and the options they replaced.
|
|
49
51
|
- `reference.html`: an application example, and a Foundations catalogue (`#foundations`) of every token: type, color with contrast, spacing, shape, borders, elevation, focus, and motion.
|
|
50
52
|
- `docs.html`: a balanced documentation shell and compact setup command, with a one-page site's "On this page" rail.
|
|
@@ -56,7 +58,7 @@ Token names depend on where the page runs. This file uses the `tokens.css` names
|
|
|
56
58
|
|
|
57
59
|
| Context | Variable names to write |
|
|
58
60
|
| --- | --- |
|
|
59
|
-
| Standalone HTML | The `tokens.css` names. Import or inline `tokens.css`, and copy component styles from `components.html
|
|
61
|
+
| Standalone HTML | The `tokens.css` names. Import or inline `tokens.css`, and copy component styles from `components.html`; link `feedback.css` for the badge and alert and `conversation.css` for the conversation components. |
|
|
60
62
|
| Site on a component library built on this design language | The `tokens.css` names that the library declares. The library's own documentation lists any it lacks and any helper behaviour. |
|
|
61
63
|
| Other repository | That repository's own tokens and components, matched to these roles by meaning. |
|
|
62
64
|
| Inline visual | The host's supplied CSS variables and font, with no separate page shell. |
|
package/language/components.html
CHANGED
|
@@ -7,7 +7,9 @@
|
|
|
7
7
|
<style>
|
|
8
8
|
/*
|
|
9
9
|
* Component catalogue. Plain HTML and CSS on tokens.css; no framework or build step.
|
|
10
|
-
* components.md specifies each component; copy markup and styles from here.
|
|
10
|
+
* components.md specifies each component; copy markup and styles from here. The conversation
|
|
11
|
+
* components' rules live in conversation.css, and the badge's and alert's in feedback.css; this page
|
|
12
|
+
* links both after this stylesheet.
|
|
11
13
|
*
|
|
12
14
|
* Pinned states: the first specimen in each row is live. The others pin one state so it
|
|
13
15
|
* renders without a pointer or keyboard: .is-hover, .is-active (pressed), and .is-focus
|
|
@@ -360,22 +362,7 @@
|
|
|
360
362
|
.tabpanel { padding-top: var(--space-3); font-size: var(--text-sm); color: var(--color-muted); }
|
|
361
363
|
.tabs-heading { margin-bottom: var(--space-1); color: var(--color-text); font-size: var(--text-md); font-weight: var(--weight-medium); letter-spacing: 0; }
|
|
362
364
|
|
|
363
|
-
/* Badge */
|
|
364
|
-
.badge { display: inline-flex; align-items: center; gap: var(--space-1); width: fit-content; padding: 0.125rem 0.375rem; border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--color-surface-muted); color: var(--color-muted); font: var(--weight-medium) var(--text-xs) / 1.25 var(--font-ui); white-space: nowrap; }
|
|
365
|
-
.badge:is(.success, .warning, .danger, .info) { background: color-mix(in srgb, var(--tone) 22%, var(--color-surface-raised)); color: light-dark(color-mix(in srgb, var(--tone) 75%, var(--color-status-ink)), color-mix(in srgb, var(--tone) 85%, var(--color-status-ink))); }
|
|
366
|
-
.badge:is(.success, .warning, .danger, .info)::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
|
367
|
-
.badge.success { --tone: var(--color-success); }
|
|
368
|
-
.badge.warning { --tone: var(--color-warning); }
|
|
369
|
-
.badge.danger { --tone: var(--color-error); }
|
|
370
|
-
.badge.info { --tone: var(--color-info); }
|
|
371
|
-
|
|
372
|
-
/* Alert */
|
|
373
|
-
.alert { display: flex; align-items: flex-start; gap: var(--space-3); max-width: var(--measure); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); }
|
|
374
|
-
.alert .icon { margin-top: 0.125rem; color: var(--color-muted); }
|
|
375
|
-
.alert.success { background: var(--color-success-surface); } .alert.success .icon { color: var(--color-success); }
|
|
376
|
-
.alert.warning { background: var(--color-warning-surface); } .alert.warning .icon { color: var(--color-warning); }
|
|
377
|
-
.alert.danger { background: var(--color-error-surface); } .alert.danger .icon { color: var(--color-error); }
|
|
378
|
-
.alert.info { background: var(--color-info-surface); } .alert.info .icon { color: var(--color-info); }
|
|
365
|
+
/* Badge and alert: feedback.css draws them, and this page links it after this stylesheet. */
|
|
379
366
|
|
|
380
367
|
/* Surface and card */
|
|
381
368
|
.surface, .card { min-width: 0; border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--shadow-surface); }
|
|
@@ -617,71 +604,20 @@
|
|
|
617
604
|
@media (forced-colors: active) { .rows [role="option"][aria-selected="true"] { border-inline-start: 2px solid Highlight; } }
|
|
618
605
|
|
|
619
606
|
/* ---------- Conversation ---------- */
|
|
620
|
-
/*
|
|
621
|
-
|
|
622
|
-
|
|
623
|
-
.day { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-3) 0 var(--space-1); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); }
|
|
624
|
-
.day::before, .day::after { content: ""; flex: 1; border-top: 1px solid var(--color-border-subtle); }
|
|
625
|
-
.msg { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: var(--space-3); padding: 0.375rem var(--space-2); border-radius: var(--radius-inline); transition: background-color var(--duration-fast) var(--ease-out); }
|
|
626
|
-
.msg.cont { padding-top: 0.125rem; }
|
|
627
|
-
.msg + .msg:not(.cont) { margin-top: var(--space-2); }
|
|
607
|
+
/* conversation.css draws the conversation components, and this page links it after this stylesheet. The rules
|
|
608
|
+
here pin the specimens' states and frame them. Each pin outranks the rule it pins by specificity, and the
|
|
609
|
+
hover pin on a message row ties with the selected fill, which conversation.css sets later, so the fill stays. */
|
|
628
610
|
.msg.is-hover { background: color-mix(in srgb, var(--color-row-hover) 55%, transparent); }
|
|
629
|
-
|
|
630
|
-
|
|
631
|
-
.msg[aria-current="true"] { background: var(--color-nav-current); }
|
|
632
|
-
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-inline); background: var(--color-surface-muted); color: var(--color-muted); font: var(--weight-semibold) var(--text-xs) / 1 var(--font-mono); }
|
|
633
|
-
.gutter { align-self: start; padding-top: 0.25rem; color: var(--color-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; text-align: end; opacity: 0; }
|
|
634
|
-
.msg.cont:is(:focus-within, .is-hover, .is-focus) .gutter { opacity: 1; }
|
|
635
|
-
@media (hover: hover) { .msg.cont:hover .gutter { opacity: 1; } }
|
|
636
|
-
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); line-height: 1.3; }
|
|
637
|
-
.author { font-weight: var(--weight-semibold); }
|
|
638
|
-
.author.agent { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
639
|
-
.msg-head time { color: var(--color-muted); font-size: var(--text-xs); }
|
|
640
|
-
.tag { color: var(--color-nav-current-text); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
|
|
641
|
-
.msg-body { max-width: var(--measure); }
|
|
642
|
-
.msg-body > * + * { margin-top: var(--space-1); }
|
|
643
|
-
/* Mention: an inline tint around @name. It is static text, not a link. */
|
|
644
|
-
.mention { padding: 0 0.1875rem; border-radius: var(--radius-mark); background: var(--color-nav-current); color: var(--color-nav-current-text); font-weight: var(--weight-medium); }
|
|
645
|
-
|
|
646
|
-
/* Hover toolbar: a floating strip at the row's top right. Its buttons sit 4px inside its outer edge, so their
|
|
647
|
-
corners are the strip's 12px minus 4px. It shows on hover or focus within, and never on a touch screen. */
|
|
648
|
-
.msg-tools { position: absolute; top: -0.875rem; right: var(--space-2); z-index: 2; display: flex; gap: 0.125rem; padding: calc(var(--space-1) - 1px); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); opacity: 0; pointer-events: none; }
|
|
649
|
-
.msg:is(:focus-within, .is-hover, .is-focus) > .msg-tools { opacity: 1; pointer-events: auto; }
|
|
611
|
+
.msg.cont:is(.is-hover, .is-focus) .gutter { opacity: 1; }
|
|
612
|
+
.msg:is(.is-hover, .is-focus) > .msg-tools { opacity: 1; pointer-events: auto; }
|
|
650
613
|
.msg-tools.is-static { position: static; width: max-content; opacity: 1; }
|
|
651
|
-
|
|
652
|
-
/* Comes after .overflow > .quiet-action at the same specificity, so the More trigger takes the strip's size too. */
|
|
653
|
-
.msg-tools .quiet-action { width: 1.5rem; height: 1.5rem; padding: 0; border-radius: var(--radius-inline); }
|
|
654
|
-
/* :where keeps the muted rest below the quiet action's hover colour. */
|
|
655
|
-
:where(.msg-tools) .quiet-action { color: var(--color-muted); }
|
|
656
|
-
/* Inset: the strip is tight, so an outer ring would cross its edge. */
|
|
657
|
-
.msg-tools .quiet-action:is(:focus-visible, .is-focus) { outline-offset: calc(var(--focus-width) * -1); }
|
|
658
|
-
|
|
659
|
-
/* Tool-call disclosure: one quiet summary line; the detail opens in a box on the surface colour. */
|
|
660
|
-
.tool > summary { display: inline-flex; align-items: baseline; gap: var(--space-2); margin-inline-start: calc(var(--space-1) * -1); padding: 0.125rem var(--space-1); border-radius: var(--radius-inline); color: var(--color-muted); font-size: var(--text-sm); list-style: none; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
|
|
661
|
-
.tool > summary::-webkit-details-marker { display: none; }
|
|
662
|
-
.tool > summary::before { content: ""; flex: none; align-self: flex-start; width: 0.3125rem; height: 0.3125rem; margin-top: 0.5em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--duration-fast) var(--ease-out); }
|
|
663
|
-
.tool[open] > summary::before { transform: rotate(45deg); }
|
|
614
|
+
.msg-tools .quiet-action.is-focus { outline-offset: calc(var(--focus-width) * -1); }
|
|
664
615
|
.tool > summary.is-hover { background: var(--color-row-hover); color: var(--color-text); }
|
|
665
|
-
|
|
666
|
-
.
|
|
667
|
-
.
|
|
668
|
-
.
|
|
669
|
-
|
|
670
|
-
/* Composer: one field with an inline round send button 6px inside its outer edge, clear of the box's 12px
|
|
671
|
-
corner. The box takes the field look and focus; the textarea inside it draws nothing. */
|
|
672
|
-
.composer { display: grid; gap: var(--space-1); width: 100%; }
|
|
673
|
-
.composer-box { display: flex; align-items: flex-end; gap: var(--space-2); padding: 0.3125rem; padding-inline-start: var(--space-3); border: 1px solid var(--color-field-edge); border-radius: var(--radius-panel); background: var(--color-field-bg); box-shadow: var(--shadow-field); }
|
|
674
|
-
/* The padding centres one line in --control-sm; each further line adds a line, up to 10rem. */
|
|
675
|
-
.composer-box textarea { flex: 1 1 0; min-width: 0; min-height: var(--control-sm); max-height: 10rem; padding: calc((var(--control-sm) - 1lh) / 2) 0; border: 0; outline: 0; resize: none; field-sizing: content; background: transparent; color: var(--color-text); font: var(--text-md) / 1.45 var(--font-ui); overflow-wrap: anywhere; }
|
|
676
|
-
.composer-box textarea::placeholder { color: var(--color-muted); opacity: 1; }
|
|
677
|
-
.composer-box:is(:has(textarea:focus-visible), .is-focus) { border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
|
|
678
|
-
.composer-box:has(textarea[aria-invalid="true"]) { border-color: var(--color-error); }
|
|
679
|
-
.composer-box:has(textarea[aria-invalid="true"]):is(:has(textarea:focus-visible), .is-focus) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
|
|
680
|
-
.composer-box:has(textarea:disabled) { background: var(--color-well); box-shadow: none; }
|
|
681
|
-
.composer-box textarea:disabled { opacity: 0.58; cursor: not-allowed; }
|
|
682
|
-
.composer-hint { color: var(--color-muted); font-size: var(--text-xs); }
|
|
683
|
-
|
|
684
|
-
/* Thread panel: a side pane whose start edge is a resize handle. The catalogue frames it beside a channel column. */
|
|
616
|
+
.composer-box.is-focus { border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
|
|
617
|
+
.composer-box.is-focus:has(textarea[aria-invalid="true"]) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
|
|
618
|
+
.pane-resize.is-hover { background: color-mix(in srgb, var(--color-accent) 40%, transparent); }
|
|
619
|
+
.pane-resize.is-focus { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
|
|
620
|
+
/* The thread panel's frame: a channel column beside the pane, as an application lays them out. */
|
|
685
621
|
.thread-demo { --pane: 26rem; display: grid; grid-template-columns: minmax(16rem, 1fr) minmax(0, var(--pane)); width: 100%; overflow: hidden; border: 1px solid var(--color-border-subtle); border-radius: var(--radius-panel); background: var(--color-bg); }
|
|
686
622
|
/* A frame too narrow for a 16rem channel beside a 20rem pane stacks them, as the tablet layout does. */
|
|
687
623
|
.state:has(> .thread-demo) { container-type: inline-size; }
|
|
@@ -691,25 +627,10 @@
|
|
|
691
627
|
.thread-demo .pane-resize { display: none; }
|
|
692
628
|
}
|
|
693
629
|
.thread-demo > .stream { align-content: start; padding: var(--space-5) var(--space-3); }
|
|
694
|
-
.thread-pane { position: relative; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--color-border-subtle); }
|
|
695
|
-
/* A touch screen never shows the hover toolbar, at any width: a tap opens the thread, whose header holds More. */
|
|
696
|
-
@media (hover: none) { .msg-tools { display: none; } }
|
|
697
|
-
.pane-resize { position: absolute; inset: 0 auto 0 -0.1875rem; z-index: 3; width: 0.375rem; cursor: col-resize; }
|
|
698
|
-
.pane-resize.is-hover, .pane-resize:focus-visible { background: color-mix(in srgb, var(--color-accent) 40%, transparent); }
|
|
699
|
-
@media (hover: hover) { .pane-resize:hover { background: color-mix(in srgb, var(--color-accent) 40%, transparent); } }
|
|
700
|
-
/* Inset: the frame clips the handle's ends. */
|
|
701
|
-
.pane-resize:is(:focus-visible, .is-focus) { outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
|
|
702
|
-
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); min-height: var(--control-touch); padding: 0 var(--space-2) 0 var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
|
|
703
|
-
.pane-head h4 { display: flex; align-items: baseline; gap: var(--space-2); font-size: var(--text-md); letter-spacing: 0; }
|
|
704
|
-
.pane-head h4 span { color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-regular); }
|
|
705
|
-
.pane-body { flex: 1; padding: var(--space-5) var(--space-2) var(--space-3); }
|
|
706
|
-
.reply-count { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-3) 0 var(--space-2); color: var(--color-muted); font-size: var(--text-xs); }
|
|
707
|
-
.reply-count::after { content: ""; flex: 1; border-top: 1px solid var(--color-border-subtle); }
|
|
708
|
-
.thread-pane > .composer { padding: 0 var(--space-3) var(--space-3); }
|
|
709
|
-
.msg-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
|
|
710
630
|
/* Catalogue specimens: a stream leaves room above its first row for the toolbar, and a handle sits on a pane edge. */
|
|
711
631
|
.state > .stream { width: min(100%, 36rem); padding-top: var(--space-4); }
|
|
712
632
|
.state > .composer { width: 22rem; max-width: 100%; }
|
|
633
|
+
.state > .pane-head { width: 24rem; max-width: 100%; }
|
|
713
634
|
.state > .tool { max-width: 30rem; }
|
|
714
635
|
.chip-stage { display: grid; justify-items: center; gap: var(--space-3); width: min(100%, 36rem); }
|
|
715
636
|
.handle-specimen { position: relative; width: 6rem; height: 4rem; border-left: 1px solid var(--color-border-subtle); }
|
|
@@ -907,7 +828,7 @@
|
|
|
907
828
|
|
|
908
829
|
@media (forced-colors: active) {
|
|
909
830
|
/* The inset accent line drops, so a focused field draws the system ring just inside its edge. */
|
|
910
|
-
:is(.input, .select, .textarea):is(:focus-visible, .is-focus), .search:is(:has(input:focus-visible), .is-focus), .number-field:is(:has(input:focus-visible), .is-focus), .composer-box
|
|
831
|
+
:is(.input, .select, .textarea):is(:focus-visible, .is-focus), .search:is(:has(input:focus-visible), .is-focus), .number-field:is(:has(input:focus-visible), .is-focus), .composer-box.is-focus { outline: var(--focus-width) solid Highlight; outline-offset: -1px; }
|
|
911
832
|
/* The lifted fill drops, so the selected tab takes a system border; the padding absorbs it. */
|
|
912
833
|
.tab[aria-selected="true"] { border: 2px solid Highlight; padding-inline: calc(var(--tab-pad) - 2px); }
|
|
913
834
|
.tab[aria-selected="true"]::before { content: none; }
|
|
@@ -936,12 +857,6 @@
|
|
|
936
857
|
/* A rail's current section has no pip, so it takes the current page's system border. */
|
|
937
858
|
:is(.rail, .rail-specimen) a[aria-current="location"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-3) - 2px); }
|
|
938
859
|
.key { border-color: CanvasText; }
|
|
939
|
-
/* The open thread's message loses its fill, so it takes the list selection's system border; the padding absorbs it. */
|
|
940
|
-
.msg[aria-current="true"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-2) - 2px); }
|
|
941
|
-
/* The tone dot is a fill, so it opts out of adjustment and takes the label's system colour. */
|
|
942
|
-
.badge:is(.success, .warning, .danger, .info)::before { forced-color-adjust: none; background: CanvasText; }
|
|
943
|
-
/* An SVG keeps the colour it sets, so the status icon takes the system text colour. */
|
|
944
|
-
.alert .icon, .alert:is(.success, .warning, .danger, .info) .icon { color: CanvasText; }
|
|
945
860
|
.coverage td { color: CanvasText; }
|
|
946
861
|
/* Value marks: only the mark opts out of adjustment and redraws in the system highlight. */
|
|
947
862
|
.progress > span, .score .pips i.on { forced-color-adjust: none; border-color: Highlight; background: Highlight; }
|
|
@@ -999,7 +914,8 @@
|
|
|
999
914
|
.note { max-width: var(--measure); color: var(--color-muted); font-size: var(--text-sm); }
|
|
1000
915
|
.row { display: grid; grid-template-columns: 140px minmax(0, 1fr); gap: var(--space-2) var(--space-6); padding: var(--space-3) 0; border-bottom: 1px solid var(--color-border-subtle); }
|
|
1001
916
|
.row:last-child { border-bottom: 0; }
|
|
1002
|
-
|
|
917
|
+
/* A row's label. :where keeps the rule's specificity, so it stays out of the thread panel's header, which conversation.css draws. */
|
|
918
|
+
.row h4:not(:where(.pane-head h4)) { padding-top: var(--space-2); font-size: var(--text-sm); font-weight: var(--weight-medium); letter-spacing: 0; }
|
|
1003
919
|
.states { display: flex; flex-wrap: wrap; align-items: start; gap: var(--space-4) var(--space-6); min-width: 0; }
|
|
1004
920
|
/* The column may shrink below a specimen's content, so a scrolling tab list scrolls instead of widening the page. */
|
|
1005
921
|
.state { display: grid; grid-template-columns: minmax(0, 1fr); gap: var(--space-2); align-content: start; justify-items: start; min-width: 0; max-width: 100%; }
|
|
@@ -1105,13 +1021,8 @@
|
|
|
1105
1021
|
.wrap-toggle { width: var(--control-touch); }
|
|
1106
1022
|
.close, .copy, .full, .projects > summary, .page-head .strip a, .wrap-toggle { min-height: var(--control-touch); }
|
|
1107
1023
|
.chip { min-height: var(--control-touch); }
|
|
1108
|
-
/*
|
|
1109
|
-
.msg-tools { display: none; }
|
|
1110
|
-
.composer-box textarea { min-height: var(--control-touch); padding-block: calc((var(--control-touch) - 1lh) / 2); }
|
|
1111
|
-
/* The thread pane takes the full width below the message list, and the handle hides. */
|
|
1024
|
+
/* The thread frame stacks the pane below the channel; conversation.css hides the toolbar and the handle. */
|
|
1112
1025
|
.thread-demo { grid-template-columns: minmax(0, 1fr); }
|
|
1113
|
-
.thread-pane { border-left: 0; border-top: 1px solid var(--color-border-subtle); }
|
|
1114
|
-
.pane-resize { display: none; }
|
|
1115
1026
|
.crumbs a, .group-toggle { min-height: var(--control-touch); }
|
|
1116
1027
|
.intro > .crumbs > ol { margin-block: calc((1lh - var(--control-touch)) / 2) calc((var(--control-touch) - 1lh) / 2); }
|
|
1117
1028
|
.display-title { font-size: var(--text-display-sm); }
|
|
@@ -1146,6 +1057,8 @@
|
|
|
1146
1057
|
.cmdlist td:last-child { grid-column: 2; grid-row: 1 / span 2; }
|
|
1147
1058
|
}
|
|
1148
1059
|
</style>
|
|
1060
|
+
<link rel="stylesheet" href="feedback.css">
|
|
1061
|
+
<link rel="stylesheet" href="conversation.css">
|
|
1149
1062
|
|
|
1150
1063
|
<svg width="0" height="0" style="position:absolute" aria-hidden="true">
|
|
1151
1064
|
<symbol id="i-search" viewBox="0 0 16 16"><circle cx="7" cy="7" r="4.5"/><path d="M10.5 10.5 14 14"/></symbol>
|
|
@@ -1645,7 +1558,7 @@
|
|
|
1645
1558
|
<section class="component" id="badge" data-layer="Core" aria-labelledby="badge-title">
|
|
1646
1559
|
<header><h3 id="badge-title">Badge</h3><span class="badge">Core</span><a href="components.md#badge">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="badge" aria-label="Copy link to Badge" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1647
1560
|
<p class="purpose">A short status label.</p>
|
|
1648
|
-
<dl class="guidance"><dt>Do</dt><dd>A one- or two-word status or category on an item, such as “Healthy” or “Beta”, with a status tone only when it is a status.</dd><dt>Don’t</dt><dd>A badge that repeats the title, or
|
|
1561
|
+
<dl class="guidance"><dt>Do</dt><dd>A one- or two-word status or category on an item, such as “Healthy” or “Beta”, with a status tone only when it is a status.</dd><dt>Don’t</dt><dd>A badge that repeats the title, or a status or category badge on every row with the same value. Badge the exceptions; an identity mark, such as the Agent badge on each agent’s message group, is the one badge that repeats. An icon beside a badge that says the same.</dd></dl>
|
|
1649
1562
|
<div class="row"><h4>Tones</h4><div class="states">
|
|
1650
1563
|
<div class="state"><span class="badge">No data</span><span class="caption">Neutral</span></div>
|
|
1651
1564
|
<div class="state"><span class="badge success">Healthy</span><span class="caption">Success</span></div>
|
|
@@ -1875,27 +1788,34 @@
|
|
|
1875
1788
|
<section class="component" id="message-row" data-layer="Core" data-states="hover selected focus" aria-labelledby="msg-row-title">
|
|
1876
1789
|
<header><h3 id="msg-row-title">Message row</h3><span class="badge">Core</span><a href="components.md#message-row">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="message-row" aria-label="Copy link to Message row" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1877
1790
|
<p class="purpose">One message: avatar, author, time, and body, with no bubble.</p>
|
|
1878
|
-
<dl class="guidance"><dt>Do</dt><dd>Put the author and the time on every message that starts a group,
|
|
1791
|
+
<dl class="guidance"><dt>Do</dt><dd>Put the author and the time on every message that starts a group, mark the first message of each agent’s group with the Agent badge, and show a Needs you tag only while the message still waits for the reader.</dd><dt>Don’t</dt><dd>A bubble, a card, or a per-message row of buttons; or a status badge on a message. The row stays flat, its actions live in the hover toolbar, and the thread’s state badge lives in the thread panel’s header.</dd></dl>
|
|
1879
1792
|
<div class="row"><h4>Live</h4><div class="states">
|
|
1880
|
-
<div class="state wide"><ol class="stream" aria-label="Messages, live"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="tag">Asks you</span><time>Today 09:40</time></div><div class="msg-body"><p>Wide tables in narrow terminals: scroll sideways, or wrap cells? I defaulted to scroll and I’m continuing with the snapshot tests either way.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false" aria-controls="msg-menu-1"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="msg-menu-1" role="menu" aria-label="Message actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button></div></span></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>Today 09:52</time></div><div class="msg-body"><p>Thanks, <span class="mention">@desktop-claude</span>. Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false" aria-controls="msg-menu-2"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="msg-menu-2" role="menu" aria-label="Message actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button></div></span></div></li></ol><span class="caption">Rest, live: hover a row, or Tab into it, to show its toolbar</span></div>
|
|
1793
|
+
<div class="state wide"><ol class="stream" aria-label="Messages, live"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><span class="tag">Asks you</span><time>Today 09:40</time></div><div class="msg-body"><p>Wide tables in narrow terminals: scroll sideways, or wrap cells? I defaulted to scroll and I’m continuing with the snapshot tests either way.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false" aria-controls="msg-menu-1"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="msg-menu-1" role="menu" aria-label="Message actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button></div></span></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>Today 09:52</time></div><div class="msg-body"><p>Thanks, <span class="mention">@desktop-claude</span>. Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false" aria-controls="msg-menu-2"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="msg-menu-2" role="menu" aria-label="Message actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button></div></span></div></li></ol><span class="caption">Rest, live: hover a row, or Tab into it, to show its toolbar</span></div>
|
|
1881
1794
|
</div></div>
|
|
1882
1795
|
<div class="row"><h4>States</h4><div class="states">
|
|
1883
|
-
<div class="state wide" inert><ol class="stream" aria-label="Messages, hover"><li class="msg is-hover"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Hover: the row tint and the toolbar</span></div>
|
|
1884
|
-
<div class="state wide" inert><ol class="stream" aria-label="Messages, focus within"><li class="msg is-focus"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action is-focus" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Focus within: the toolbar shows, with the ring on Reply in thread</span></div>
|
|
1885
|
-
<div class="state wide" inert><ol class="stream" aria-label="Messages, selected"><li class="msg" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Selected: its thread is open</span></div>
|
|
1886
|
-
<div class="state wide" inert><ol class="stream" aria-label="Messages, selected with hover"><li class="msg is-hover" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Selected with hover: the selected fill stays</span></div>
|
|
1796
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, hover"><li class="msg is-hover"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Hover: the row tint and the toolbar</span></div>
|
|
1797
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, focus within"><li class="msg is-focus"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action is-focus" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Focus within: the toolbar shows, with the ring on Reply in thread</span></div>
|
|
1798
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, selected"><li class="msg" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Selected: its thread is open</span></div>
|
|
1799
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, selected with hover"><li class="msg is-hover" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div></li></ol><span class="caption">Selected with hover: the selected fill stays</span></div>
|
|
1800
|
+
</div></div>
|
|
1801
|
+
<div class="row"><h4>Status</h4><div class="states">
|
|
1802
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, asks you"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><span class="tag">Asks you</span><time>Today 09:40</time></div><div class="msg-body"><p>Wide tables in narrow terminals: scroll sideways, or wrap cells?</p></div></div></li></ol><span class="caption">Needs you: a question that waits for the reader</span></div>
|
|
1803
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, blocked on you"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><span class="tag warning">Blocked on you</span><time>Today 09:44</time></div><div class="msg-body"><p>The release needs a new publish token. Work stops here until one is set.</p></div></div></li></ol><span class="caption">Needs you: a question that stops the work</span></div>
|
|
1804
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, resolved"><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><span class="tag resolved"><svg class="icon" aria-hidden="true"><use href="#i-check"/></svg>Resolved the thread</span><time>Today 10:02</time></div></div></li></ol><span class="caption">Resolution: the author resolved the thread with the Resolve button, so the row has no body</span></div>
|
|
1805
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, dropped"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><span class="tag resolved">Dropped the thread</span><time>Today 10:05</time></div><div class="msg-body"><p>Superseded by the table work in PR #34.</p></div></div></li></ol><span class="caption">Resolution: an agent dropped the thread, with its reason as the body</span></div>
|
|
1806
|
+
<div class="state wide" inert><ol class="stream" aria-label="Resolved threads"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><span class="tag resolved"><svg class="icon" aria-hidden="true"><use href="#i-check"/></svg>Resolved by Filip</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links">3 replies</p></div></div></li></ol><span class="caption">Resolution on a root shown alone, as in a list of resolved threads: the note names who resolved it</span></div>
|
|
1887
1807
|
</div></div>
|
|
1888
1808
|
</section>
|
|
1889
1809
|
|
|
1890
1810
|
<section class="component" id="message-group" data-layer="Core" aria-labelledby="msg-group-title">
|
|
1891
1811
|
<header><h3 id="msg-group-title">Message group</h3><span class="badge">Core</span><a href="components.md#message-group">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="message-group" aria-label="Copy link to Message group" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1892
1812
|
<p class="purpose">Consecutive messages by one author under one avatar.</p>
|
|
1893
|
-
<dl class="guidance"><dt>Do</dt><dd>Group by author and time only, and start a new group after a day divider, even for the same author.</dd><dt>Don’t</dt><dd>A group that spans two authors, or a continuation row that hides its time from a screen reader.</dd></dl>
|
|
1813
|
+
<dl class="guidance"><dt>Do</dt><dd>Group by author and time only, and start a new group after a day divider or at a message with a status, even for the same author.</dd><dt>Don’t</dt><dd>A group that spans two authors, or a continuation row that hides its time from a screen reader.</dd></dl>
|
|
1894
1814
|
<div class="row"><h4>Group</h4><div class="states">
|
|
1895
|
-
<div class="state wide"><ol class="stream" aria-label="Messages, grouped"><li class="day">Yesterday</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Yesterday 11:30</time></div><div class="msg-body"><p>The renderer handles tables that fit the terminal.</p></div></div></li><li class="msg cont"><span class="gutter" aria-hidden="true">11:31</span><div><span class="sr-only">desktop-claude, Yesterday 11:31</span><div class="msg-body"><p>Wide tables still clip at 80 columns.</p></div></div></li><li class="msg cont"><span class="gutter" aria-hidden="true">11:33</span><div><span class="sr-only">desktop-claude, Yesterday 11:33</span><div class="msg-body"><p>Snapshot tests cover both cases.</p></div></div></li><li class="day">Today</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Today 09:40</time></div><div class="msg-body"><p>PR #31 is open and its checks pass.</p></div></div></li></ol><span class="caption">Rest, live: hover a continuation row to see its time. A day divider starts a new group, even for the same author</span></div>
|
|
1815
|
+
<div class="state wide"><ol class="stream" aria-label="Messages, grouped"><li class="day">Yesterday</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Yesterday 11:30</time></div><div class="msg-body"><p>The renderer handles tables that fit the terminal.</p></div></div></li><li class="msg cont"><span class="gutter" aria-hidden="true">11:31</span><div><span class="sr-only">desktop-claude, Yesterday 11:31</span><div class="msg-body"><p>Wide tables still clip at 80 columns.</p></div></div></li><li class="msg cont"><span class="gutter" aria-hidden="true">11:33</span><div><span class="sr-only">desktop-claude, Yesterday 11:33</span><div class="msg-body"><p>Snapshot tests cover both cases.</p></div></div></li><li class="day">Today</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>PR #31 is open and its checks pass.</p></div></div></li></ol><span class="caption">Rest, live: hover a continuation row to see its time. A day divider starts a new group, even for the same author</span></div>
|
|
1896
1816
|
</div></div>
|
|
1897
1817
|
<div class="row"><h4>Hover</h4><div class="states">
|
|
1898
|
-
<div class="state wide" inert><ol class="stream" aria-label="Messages, grouped, hover"><li class="day">Yesterday</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Yesterday 11:30</time></div><div class="msg-body"><p>The renderer handles tables that fit the terminal.</p></div></div></li><li class="msg cont is-hover"><span class="gutter" aria-hidden="true">11:31</span><div><span class="sr-only">desktop-claude, Yesterday 11:31</span><div class="msg-body"><p>Wide tables still clip at 80 columns.</p></div></div></li><li class="msg cont"><span class="gutter" aria-hidden="true">11:33</span><div><span class="sr-only">desktop-claude, Yesterday 11:33</span><div class="msg-body"><p>Snapshot tests cover both cases.</p></div></div></li><li class="day">Today</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Today 09:40</time></div><div class="msg-body"><p>PR #31 is open and its checks pass.</p></div></div></li></ol><span class="caption">Hover on the first continuation row: its time shows in the avatar column</span></div>
|
|
1818
|
+
<div class="state wide" inert><ol class="stream" aria-label="Messages, grouped, hover"><li class="day">Yesterday</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Yesterday 11:30</time></div><div class="msg-body"><p>The renderer handles tables that fit the terminal.</p></div></div></li><li class="msg cont is-hover"><span class="gutter" aria-hidden="true">11:31</span><div><span class="sr-only">desktop-claude, Yesterday 11:31</span><div class="msg-body"><p>Wide tables still clip at 80 columns.</p></div></div></li><li class="msg cont"><span class="gutter" aria-hidden="true">11:33</span><div><span class="sr-only">desktop-claude, Yesterday 11:33</span><div class="msg-body"><p>Snapshot tests cover both cases.</p></div></div></li><li class="day">Today</li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>PR #31 is open and its checks pass.</p></div></div></li></ol><span class="caption">Hover on the first continuation row: its time shows in the avatar column</span></div>
|
|
1899
1819
|
</div></div>
|
|
1900
1820
|
</section>
|
|
1901
1821
|
|
|
@@ -1905,7 +1825,7 @@
|
|
|
1905
1825
|
<dl class="guidance"><dt>Do</dt><dd>Keep two or three frequent actions in the strip, Reply in thread first, and put the rest behind More.</dd><dt>Don’t</dt><dd>A strip as the only way to reach an action. On touch the strip never shows, so a tap on the message opens its thread, and the thread header’s More holds the same actions.</dd></dl>
|
|
1906
1826
|
<p class="note">One Tab stop: Left and Right Arrow move between the buttons, and More opens its menu. The strip never shows on a touch screen.</p>
|
|
1907
1827
|
<div class="row"><h4>Live</h4><div class="states">
|
|
1908
|
-
<div class="state wide"><ol class="stream" aria-label="Messages, toolbar live"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false" aria-controls="msg-menu-3"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="msg-menu-3" role="menu" aria-label="Message actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button></div></span></div></li></ol><span class="caption">Rest, live: hover the row, or Tab to its toolbar</span></div>
|
|
1828
|
+
<div class="state wide"><ol class="stream" aria-label="Messages, toolbar live"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div><div class="msg-tools" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false" aria-controls="msg-menu-3"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="msg-menu-3" role="menu" aria-label="Message actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button></div></span></div></li></ol><span class="caption">Rest, live: hover the row, or Tab to its toolbar</span></div>
|
|
1909
1829
|
</div></div>
|
|
1910
1830
|
<div class="row"><h4>Strip</h4><div class="states">
|
|
1911
1831
|
<div class="state" inert><div class="msg-tools is-static" role="toolbar" aria-label="Message actions"><button class="quiet-action" type="button" aria-label="Reply in thread"><svg class="icon" aria-hidden="true"><use href="#i-reply"/></svg></button><button class="quiet-action" type="button" aria-label="Copy link to message"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button><span class="overflow"><button class="quiet-action" type="button" aria-label="More message actions" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></span></div><span class="caption">Shown</span></div>
|
|
@@ -1918,10 +1838,20 @@
|
|
|
1918
1838
|
<section class="component" id="thread-panel" data-layer="Core" data-states="hover focus" aria-labelledby="thread-panel-title">
|
|
1919
1839
|
<header><h3 id="thread-panel-title">Thread panel</h3><span class="badge">Core</span><a href="components.md#thread-panel">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="thread-panel" aria-label="Copy link to Thread panel" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1920
1840
|
<p class="purpose">A resizable side pane with a message and its replies.</p>
|
|
1921
|
-
<dl class="guidance"><dt>Do</dt><dd>Open a thread beside its channel, so the reader keeps the channel in view, and mark its root message as selected in the list.</dd><dt>Don’t</dt><dd>A thread in a dialog, or a second pane beside the first. One thread is open at a time.</dd></dl>
|
|
1922
|
-
<p class="note">In an application the pane is an <code><aside></code>; the catalogue uses a section, because a complementary landmark belongs at the top level, outside <code>main</code>. Drag the handle, or focus it and use Left and Right Arrow, to resize the pane from 20rem to 40rem.</p>
|
|
1841
|
+
<dl class="guidance"><dt>Do</dt><dd>Open a thread beside its channel, so the reader keeps the channel in view, and mark its root message as selected in the list. Keep Resolve beside the state it changes, in the header.</dd><dt>Don’t</dt><dd>A thread in a dialog, or a second pane beside the first. One thread is open at a time. A Reopen button: a reply reopens a resolved thread.</dd></dl>
|
|
1842
|
+
<p class="note">In an application the pane is an <code><aside></code>; the catalogue uses a section, because a complementary landmark belongs at the top level, outside <code>main</code>. Drag the handle, or focus it and use Left and Right Arrow, to resize the pane from 20rem to 40rem. Resolve the live thread to see its done state; reload the page to open it again.</p>
|
|
1923
1843
|
<div class="row"><h4>Live</h4><div class="states">
|
|
1924
|
-
<div class="state wide"><div class="thread-demo"><ol class="stream" aria-label="Messages in #annoterm"><li class="msg" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links">2 replies</p></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>20 Nov 16:20</time></div><div class="msg-body"><p>Docs preview deploys are back.</p></div></div></li></ol><section class="thread-pane" id="thread-live" aria-labelledby="thread-live-title"><div class="pane-resize" role="separator" aria-orientation="vertical" aria-label="Resize thread panel" aria-controls="thread-live" aria-valuemin="20" aria-valuemax="40" aria-valuenow="26" tabindex="0"></div><div class="pane-head"><h4 id="thread-live-title">Thread <span>#annoterm</span></h4><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false" aria-controls="thread-menu"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="thread-menu" role="menu" aria-label="Thread actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button><button type="button" role="menuitem" tabindex="-1">Open #annoterm</button><button type="button" role="menuitem" tabindex="-1">Copy link</button></div></div></div><div class="pane-body"><ol class="stream" aria-label="Thread root"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links"><a href="#thread-panel">PR #31</a><span>checks passed</span><a href="#thread-panel">T3 thread</a></p></div></div></li></ol><p class="reply-count">2 replies</p><ol class="stream" aria-label="Replies"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><time>Yesterday 11:30</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>renderer handles tables that fit the terminal</b></span></summary><div class="tool-body"><ul><li>Tables up to 80 columns render.</li><li>Wider tables clip at the edge.</li></ul></div></details></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="tag">Asks you</span><time>Today 09:40</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>PR #31 open, checks pass</b></span></summary><div class="tool-body"><p>PR #31 adds table rendering and its snapshot tests.</p></div></details><p>Wide tables in narrow terminals: scroll sideways, or wrap cells? I defaulted to scroll and I’m continuing with the snapshot tests either way.</p></div></div></li></ol></div><div class="composer"><label class="sr-only" for="thread-composer">Reply to desktop-claude</label><div class="composer-box"><textarea id="thread-composer" rows="1" placeholder="Reply to desktop-claude" aria-describedby="thread-composer-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="thread-composer-hint">Saved to the board. desktop-claude sees it the next time it checks.</p></div></section></div><span class="caption">Open beside its channel, live; the root message is selected in the list</span></div>
|
|
1844
|
+
<div class="state wide"><div class="thread-demo"><ol class="stream" aria-label="Messages in #annoterm"><li class="msg" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links">2 replies</p></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>20 Nov 16:20</time></div><div class="msg-body"><p>Docs preview deploys are back.</p></div></div></li></ol><section class="thread-pane" id="thread-live" aria-labelledby="thread-live-title"><div class="pane-resize" role="separator" aria-orientation="vertical" aria-label="Resize thread panel" aria-controls="thread-live" aria-valuemin="20" aria-valuemax="40" aria-valuenow="26" tabindex="0"></div><div class="pane-head"><h4 id="thread-live-title">Thread <span>#annoterm</span></h4><span class="badge info">Needs you</span><button class="btn secondary" type="button" data-size="sm" data-resolve>Resolve</button><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false" aria-controls="thread-menu"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button><div class="menu-list" id="thread-menu" role="menu" aria-label="Thread actions" hidden><button type="button" role="menuitem" tabindex="-1">Mark unread</button><button type="button" role="menuitem" tabindex="-1">Make it a todo</button><button type="button" role="menuitem" tabindex="-1">Open #annoterm</button><button type="button" role="menuitem" tabindex="-1">Copy link</button></div></div></div><div class="pane-body"><ol class="stream" aria-label="Thread root"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links"><a href="#thread-panel">PR #31</a><span>checks passed</span><a href="#thread-panel">T3 thread</a></p></div></div></li></ol><p class="reply-count">2 replies</p><ol class="stream" aria-label="Replies"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Yesterday 11:30</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>renderer handles tables that fit the terminal</b></span></summary><div class="tool-body"><ul><li>Tables up to 80 columns render.</li><li>Wider tables clip at the edge.</li></ul></div></details></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><span class="tag">Asks you</span><time>Today 09:40</time></div><div class="msg-body"><details class="tool"><summary><span>Handoff note · <b>PR #31 open, checks pass</b></span></summary><div class="tool-body"><p>PR #31 adds table rendering and its snapshot tests.</p></div></details><p>Wide tables in narrow terminals: scroll sideways, or wrap cells? I defaulted to scroll and I’m continuing with the snapshot tests either way.</p></div></div></li></ol></div><div class="composer"><label class="sr-only" for="thread-composer">Reply to desktop-claude</label><div class="composer-box"><textarea id="thread-composer" rows="1" placeholder="Reply to desktop-claude" aria-describedby="thread-composer-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="thread-composer-hint">Saved to the board. desktop-claude sees it the next time it checks.</p></div><p class="sr-only" role="status"></p><template data-resolution><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><span class="tag resolved"><svg class="icon" aria-hidden="true"><use href="#i-check"/></svg>Resolved the thread</span><time>Today 10:02</time></div></div></li></template><template data-reply><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>Today 10:06</time></div><div class="msg-body"><p></p></div></div></li></template></section></div><span class="caption">Open beside its channel, live; the root message is selected in the list</span></div>
|
|
1845
|
+
</div></div>
|
|
1846
|
+
<div class="row"><h4>Thread state</h4><div class="states">
|
|
1847
|
+
<div class="state" inert><div class="pane-head"><h4>Thread <span>#annoterm</span></h4><button class="btn secondary" type="button" data-size="sm">Resolve</button><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></div></div><span class="caption">Open: no badge, and Resolve</span></div>
|
|
1848
|
+
<div class="state" inert><div class="pane-head"><h4>Thread <span>#annoterm</span></h4><span class="badge info">Needs you</span><button class="btn secondary" type="button" data-size="sm">Resolve</button><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></div></div><span class="caption">Needs you: a question waits for the reader</span></div>
|
|
1849
|
+
<div class="state" inert><div class="pane-head"><h4>Thread <span>#annoterm</span></h4><span class="badge warning">Blocked</span><button class="btn secondary" type="button" data-size="sm">Resolve</button><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></div></div><span class="caption">Blocked: the work stops until the reader answers</span></div>
|
|
1850
|
+
<div class="state" inert><div class="pane-head"><h4>Thread <span>#annoterm</span></h4><span class="badge success">Done</span><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></div></div><span class="caption">Done: resolved, so Resolve is gone</span></div>
|
|
1851
|
+
<div class="state" inert><div class="pane-head"><h4>Thread <span>#annoterm</span></h4><span class="badge">Dropped</span><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></div></div><span class="caption">Dropped: resolved without finishing</span></div>
|
|
1852
|
+
</div></div>
|
|
1853
|
+
<div class="row"><h4>Resolved</h4><div class="states">
|
|
1854
|
+
<div class="state wide" inert><div class="thread-demo"><ol class="stream" aria-label="Messages in #annoterm, resolved"><li class="msg" aria-current="true"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links">3 replies</p></div></div></li></ol><section class="thread-pane" aria-labelledby="thread-done-title"><div class="pane-head"><h4 id="thread-done-title">Thread <span>#annoterm</span></h4><span class="badge success">Done</span><div class="overflow"><button class="quiet-action" type="button" aria-label="More actions for this thread" aria-haspopup="menu" aria-expanded="false"><svg class="icon" aria-hidden="true"><use href="#i-more"/></svg></button></div></div><div class="pane-body"><ol class="stream" aria-label="Thread root, resolved"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>20 Nov 16:05</time></div><div class="msg-body"><p>annoterm: render Markdown tables</p><p class="msg-links"><a href="#thread-panel">PR #31</a><span>checks passed</span></p></div></div></li></ol><p class="reply-count">3 replies</p><ol class="stream" aria-label="Replies, resolved"><li class="msg"><span class="avatar" aria-hidden="true">DC</span><div><div class="msg-head"><span class="author agent">desktop-claude</span><span class="badge">Agent</span><time>Today 09:40</time></div><div class="msg-body"><p>Wide tables in narrow terminals: scroll sideways, or wrap cells?</p></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><time>Today 09:52</time></div><div class="msg-body"><p>Scroll for now. Wrap needs a design pass first.</p></div></div></li><li class="msg"><span class="avatar" aria-hidden="true">F</span><div><div class="msg-head"><span class="author">Filip</span><span class="tag resolved"><svg class="icon" aria-hidden="true"><use href="#i-check"/></svg>Resolved the thread</span><time>Today 10:02</time></div></div></li></ol></div><div class="composer"><label class="sr-only" for="thread-done-composer">Reply to desktop-claude, resolved thread</label><div class="composer-box"><textarea id="thread-done-composer" rows="1" placeholder="Reply to desktop-claude" aria-describedby="thread-done-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="thread-done-hint">Saved to the board. A reply reopens the thread.</p></div></section></div><span class="caption">Done: the badge says so, the last reply names who resolved it, and the hint says a reply reopens it</span></div>
|
|
1925
1855
|
</div></div>
|
|
1926
1856
|
<div class="row"><h4>Handle</h4><div class="states">
|
|
1927
1857
|
<div class="state" inert><div class="handle-specimen"><div class="pane-resize" role="separator" aria-orientation="vertical" aria-label="Resize thread panel" aria-valuemin="20" aria-valuemax="40" aria-valuenow="26" tabindex="0"></div></div><span class="caption">Rest</span></div>
|
|
@@ -1930,16 +1860,17 @@
|
|
|
1930
1860
|
</div></div>
|
|
1931
1861
|
</section>
|
|
1932
1862
|
|
|
1933
|
-
<section class="component" id="composer" data-layer="Core" data-states="focus disabled invalid" aria-labelledby="composer-title">
|
|
1863
|
+
<section class="component" id="composer" data-layer="Core" data-states="focus disabled busy invalid" aria-labelledby="composer-title">
|
|
1934
1864
|
<header><h3 id="composer-title">Composer</h3><span class="badge">Core</span><a href="components.md#composer">Spec</a><button class="quiet-action copy-link" type="button" data-copy-link="composer" aria-label="Copy link to Composer" title="Copy link"><svg class="icon" aria-hidden="true"><use href="#i-link"/></svg></button></header>
|
|
1935
1865
|
<p class="purpose">One growing field with an inline send button.</p>
|
|
1936
1866
|
<dl class="guidance"><dt>Do</dt><dd>Name the field for where the message goes, such as “Reply to desktop-claude”, and say in the hint what happens after sending.</dd><dt>Don’t</dt><dd>A Send label beside the field, or a second field for a title. The composer is one field and one icon.</dd></dl>
|
|
1937
1867
|
<div class="row"><h4>States</h4><div class="states">
|
|
1938
|
-
<div class="state"><div class="composer"><label class="sr-only" for="cmp-live">Reply to desktop-claude</label><div class="composer-box"><textarea id="cmp-live" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-live-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-live-hint">Saved to the board.</p></div><span class="caption">Rest, live</span></div>
|
|
1868
|
+
<div class="state"><div class="composer"><label class="sr-only" for="cmp-live">Reply to desktop-claude</label><div class="composer-box"><textarea id="cmp-live" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-live-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-live-hint">Saved to the board.</p></div><span class="caption">Rest, live: Enter sends and clears the field, and Shift+Enter starts a new line</span></div>
|
|
1939
1869
|
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-typing">Reply, typing</label><div class="composer-box"><textarea id="cmp-typing" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-typing-hint">Scroll for now.
|
|
1940
1870
|
Wrap needs a design pass first.
|
|
1941
1871
|
I’ll open a ticket for it.</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-typing-hint">Saved to the board.</p></div><span class="caption">Typing: the field grows, up to 10rem</span></div>
|
|
1942
1872
|
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-focus">Reply, focused</label><div class="composer-box is-focus"><textarea id="cmp-focus" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-focus-hint"></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-focus-hint">Saved to the board.</p></div><span class="caption">Focus visible</span></div>
|
|
1873
|
+
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-busy">Reply, sending</label><div class="composer-box"><textarea id="cmp-busy" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-busy-hint" readonly>Scroll for now.</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send" aria-busy="true" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-busy-hint">Saved to the board.</p></div><span class="caption">Busy: sending; the text stays, read-only, until the board accepts it</span></div>
|
|
1943
1874
|
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid">Reply, refused</label><div class="composer-box"><textarea id="cmp-invalid" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-hint" aria-invalid="true" aria-errormessage="cmp-invalid-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-hint">Saved to the board.</p></div><span class="caption">Invalid: refused, nothing saved</span></div>
|
|
1944
1875
|
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-invalid-focus">Reply, refused and focused</label><div class="composer-box is-focus"><textarea id="cmp-invalid-focus" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-invalid-focus-hint" aria-invalid="true" aria-errormessage="cmp-invalid-focus-error">Push the fix to acme/private-repo</textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send"><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="field-error" id="cmp-invalid-focus-error">Not saved: the message names a private repository. Remove the name and send again.</p><p class="composer-hint" id="cmp-invalid-focus-hint">Saved to the board.</p></div><span class="caption">Invalid while focused</span></div>
|
|
1945
1876
|
<div class="state" inert><div class="composer"><label class="sr-only" for="cmp-offline">Reply, offline</label><div class="composer-box"><textarea id="cmp-offline" rows="1" placeholder="Reply to desktop-claude" aria-describedby="cmp-offline-hint" disabled></textarea><button class="btn" type="button" data-size="sm" data-icon-only aria-label="Send" disabled><svg class="icon" aria-hidden="true"><use href="#i-send"/></svg></button></div><p class="composer-hint" id="cmp-offline-hint">Offline: the board server can’t be reached. Sending comes back when it can.</p></div><span class="caption">Disabled: offline, with the reason in the hint</span></div>
|
|
@@ -2093,7 +2024,7 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
|
|
|
2093
2024
|
<tr data-for="message-row"><th scope="row"><a href="#message-row">Message row</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
|
|
2094
2025
|
<tr data-for="hover-toolbar"><th scope="row"><a href="#hover-toolbar">Hover toolbar</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
|
|
2095
2026
|
<tr data-for="thread-panel"><th scope="row"><a href="#thread-panel">Thread panel</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
|
|
2096
|
-
<tr data-for="composer"><th scope="row"><a href="#composer">Composer</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span
|
|
2027
|
+
<tr data-for="composer"><th scope="row"><a href="#composer">Composer</a></th><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td></tr>
|
|
2097
2028
|
<tr data-for="tool-call-disclosure"><th scope="row"><a href="#tool-call-disclosure">Tool-call disclosure</a></th><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span aria-hidden="true">●</span><span class="sr-only">Yes</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td><td><span class="none" aria-hidden="true">–</span><span class="sr-only">No</span></td></tr>
|
|
2098
2029
|
</tbody>
|
|
2099
2030
|
</table>
|
|
@@ -2644,6 +2575,77 @@ I’ll open a ticket for it.</textarea><button class="btn" type="button" data-si
|
|
|
2644
2575
|
});
|
|
2645
2576
|
});
|
|
2646
2577
|
|
|
2578
|
+
// Composer: Enter sends and Shift+Enter starts a new line. Enter while an input method composes text belongs to the
|
|
2579
|
+
// input method. Text that is empty or only spaces does not send. The catalogue has no server, so a send is accepted
|
|
2580
|
+
// at once: the composer hands the text on in a "send" event, then the field clears and keeps focus.
|
|
2581
|
+
document.querySelectorAll('.composer:not([inert] *)').forEach((composer) => {
|
|
2582
|
+
const field = composer.querySelector('textarea');
|
|
2583
|
+
const send = composer.querySelector('.btn[aria-label="Send"]');
|
|
2584
|
+
const submit = () => {
|
|
2585
|
+
if (field.disabled || send.disabled || !field.value.trim()) return;
|
|
2586
|
+
composer.dispatchEvent(new CustomEvent('send', { detail: field.value }));
|
|
2587
|
+
field.value = '';
|
|
2588
|
+
field.focus();
|
|
2589
|
+
};
|
|
2590
|
+
field.addEventListener('keydown', (e) => {
|
|
2591
|
+
if (e.key !== 'Enter' || e.shiftKey || e.isComposing || e.keyCode === 229) return;
|
|
2592
|
+
e.preventDefault();
|
|
2593
|
+
submit();
|
|
2594
|
+
});
|
|
2595
|
+
send.addEventListener('click', submit);
|
|
2596
|
+
});
|
|
2597
|
+
|
|
2598
|
+
// The live thread: its reply list is the one source of both reply counts, the pane's and the channel root's.
|
|
2599
|
+
// Resolve marks the thread done: the resolving post ends the replies, the question no longer waits, and the hint
|
|
2600
|
+
// says a reply reopens the thread. Resolve then hides, so focus moves to the pane's heading and a polite live region
|
|
2601
|
+
// says the thread is resolved. A reply answers the question, so Needs you leaves with its tag, and on a resolved
|
|
2602
|
+
// thread it reopens it: the Done badge leaves, Resolve comes back, and the hint returns.
|
|
2603
|
+
document.querySelectorAll('.thread-pane:not([inert] *)').forEach((pane) => {
|
|
2604
|
+
const button = pane.querySelector('[data-resolve]');
|
|
2605
|
+
if (!button) return;
|
|
2606
|
+
const badge = pane.querySelector('.pane-head .badge');
|
|
2607
|
+
const replies = pane.querySelector('.pane-body .reply-count + .stream');
|
|
2608
|
+
const hint = pane.querySelector('.composer-hint');
|
|
2609
|
+
const openHint = hint.textContent;
|
|
2610
|
+
const status = pane.querySelector(':scope > [role="status"]');
|
|
2611
|
+
const rootCount = pane.closest('.thread-demo').querySelector(':scope > .stream .msg[aria-current="true"] .msg-links');
|
|
2612
|
+
const count = () => {
|
|
2613
|
+
const n = replies.children.length;
|
|
2614
|
+
const text = `${n} ${n === 1 ? 'reply' : 'replies'}`;
|
|
2615
|
+
pane.querySelector('.reply-count').textContent = text;
|
|
2616
|
+
rootCount.textContent = text;
|
|
2617
|
+
};
|
|
2618
|
+
const add = (name) => replies.append(pane.querySelector(`template[data-${name}]`).content.cloneNode(true));
|
|
2619
|
+
const answer = () => pane.querySelectorAll('.pane-body .tag:not(.resolved)').forEach((tag) => tag.remove());
|
|
2620
|
+
button.addEventListener('click', () => {
|
|
2621
|
+
badge.className = 'badge success';
|
|
2622
|
+
badge.textContent = 'Done';
|
|
2623
|
+
badge.hidden = false;
|
|
2624
|
+
answer();
|
|
2625
|
+
add('resolution');
|
|
2626
|
+
count();
|
|
2627
|
+
hint.textContent = 'Saved to the board. A reply reopens the thread.';
|
|
2628
|
+
const heading = pane.querySelector('.pane-head h4');
|
|
2629
|
+
heading.tabIndex = -1;
|
|
2630
|
+
heading.focus();
|
|
2631
|
+
button.hidden = true;
|
|
2632
|
+
status.textContent = 'Thread resolved';
|
|
2633
|
+
});
|
|
2634
|
+
pane.querySelector('.composer').addEventListener('send', (e) => {
|
|
2635
|
+
add('reply');
|
|
2636
|
+
// Plain text: each line break in the reply becomes a <br>, so a multiline reply keeps its lines.
|
|
2637
|
+
const body = replies.lastElementChild.querySelector('.msg-body p');
|
|
2638
|
+
body.replaceChildren(...e.detail.split('\n').flatMap((line, i) => (i ? [document.createElement('br'), line] : [line])));
|
|
2639
|
+
answer();
|
|
2640
|
+
count();
|
|
2641
|
+
badge.hidden = true;
|
|
2642
|
+
if (!button.hidden) return;
|
|
2643
|
+
button.hidden = false;
|
|
2644
|
+
hint.textContent = openHint;
|
|
2645
|
+
status.textContent = 'Thread reopened';
|
|
2646
|
+
});
|
|
2647
|
+
});
|
|
2648
|
+
|
|
2647
2649
|
// Thread panel: drag the handle, or focus it and use Left and Right Arrow, to set the pane from 20rem to 40rem,
|
|
2648
2650
|
// and never so wide that the channel beside it drops below 16rem. The separator reports the width the pane takes.
|
|
2649
2651
|
document.querySelectorAll('.pane-resize[role="separator"]:not([inert] *)').forEach((handle) => {
|
package/language/components.md
CHANGED
|
@@ -282,7 +282,7 @@ Layer: Core.
|
|
|
282
282
|
- **Tokens.** Neutral: `--color-surface-muted` fill, `--color-muted`, no dot. Status tones (success, warning, danger, info): the tone at 22% over `--color-surface-raised`, text of the tone mixed 75% with `--color-status-ink` in light and 85% in dark, and a leading 6px dot in `currentColor`.
|
|
283
283
|
- **States.** None: a badge is static text. Its tone is a variant, not a state.
|
|
284
284
|
- **Do.** A one- or two-word status or category on an item, such as "Healthy" or "Beta", with a status tone only when it is a status.
|
|
285
|
-
- **Don't.** A badge that repeats the title, or
|
|
285
|
+
- **Don't.** A badge that repeats the title, or a status or category badge on every row with the same value. Badge the exceptions; an identity mark, such as the Agent badge on each agent's message group, is the one badge that repeats. An icon beside a badge that says the same.
|
|
286
286
|
- **Keyboard and screen reader.** Static text; the label carries the meaning, never the colour alone.
|
|
287
287
|
- **Motion.** None: a badge is static.
|
|
288
288
|
- **Forced colors.** Fills drop and the transparent border draws as the system edge, so each badge reads as an outlined label. The tone dot opts out of adjustment (`forced-color-adjust: none`) and draws in `CanvasText`, the label's colour; the label still carries the status.
|
|
@@ -520,21 +520,23 @@ Layer: Core.
|
|
|
520
520
|
|
|
521
521
|
Layer: Core.
|
|
522
522
|
|
|
523
|
-
- **Anatomy.** One message in a list (`<ol>`) of messages, as a flat row with no bubble or card. A grid of a 32px avatar column (`2rem`) and the body, with a `--space-3` gap, `0.375rem` `--space-2` padding, and `--radius-inline` corners. The avatar is 32px square with `--radius-inline` corners, a `--color-surface-muted` fill, and the author's initials in `--font-mono` `--text-xs` semibold `--color-muted`; it is `aria-hidden`, because the name follows it. The header line holds the author in semibold (an agent's name in `--font-mono` `--text-sm`),
|
|
523
|
+
- **Anatomy.** One message in a list (`<ol>`) of messages, as a flat row with no bubble or card. A grid of a 32px avatar column (`2rem`) and the body, with a `--space-3` gap, `0.375rem` `--space-2` padding, and `--radius-inline` corners. The avatar is 32px square with `--radius-inline` corners, a `--color-surface-muted` fill, and the author's initials in `--font-mono` `--text-xs` semibold `--color-muted`; it is `aria-hidden`, because the name follows it. The header line holds the author in semibold (an agent's name in `--font-mono` `--text-sm`), the Agent mark on an agent's message, an optional status, then the time in a `<time>` element, `--text-xs` `--color-muted`. The Agent mark is a neutral [badge](#badge) that reads "Agent"; the person's own messages carry no mark, so the mark sets agents apart. It goes in the header line of a group's first message; continuation rows carry no header, so the group's one mark covers them. On the selected row it takes the `--color-surface-raised` fill, because in light the selected tint nearly matches the neutral badge's. The status slot holds one status at most, in one of two tones:
|
|
524
|
+
- **Needs you:** a `--text-xs` semibold tag in `--color-text`, led by a 6px dot `--space-1` before it in the tone of the thread's state badge, on the message that waits for the reader: "Asks you" on a question, with an `--color-info` dot, or "Blocked on you" on a question that stops the work, with an `--color-warning` dot. The status colour goes on the dot, not the words, as for every status outside a badge.
|
|
525
|
+
- **Resolution:** a `--text-xs` note in `--color-muted`, on the post that resolves a thread: "Resolved the thread", led by a 14px check icon in `--color-success` 4px (`--space-1`) before it, or "Dropped the thread", with no icon. The row's author is who resolved it. A resolution posted from a button has no body. Where a resolved thread shows only its root, as in a list of resolved threads, the root's note names the resolver instead: "Resolved by desktop-claude" or "Dropped by desktop-claude", because the root's author is who started the thread. The body follows, at most `--measure` wide, with `--space-1` between its blocks. A new group starts `--space-2` below the row before it. The row holds a [hover toolbar](#hover-toolbar) at its top right.
|
|
524
526
|
- **States.** Rest; hover, which tints the row `--color-row-hover` at 55% over transparent and shows its [hover toolbar](#hover-toolbar); focus within, which shows the toolbar as hover does; and selected, the message whose thread is open (`aria-current="true"`), with the `--color-nav-current` fill, kept under hover.
|
|
525
|
-
- **Do.** Put the author and the time on every message that starts a group,
|
|
526
|
-
- **Don't.** A bubble, a card, or a per-message row of buttons. The row stays flat,
|
|
527
|
-
- **Keyboard and screen reader.** The list is named for its channel or thread. Each row reads as its author,
|
|
527
|
+
- **Do.** Put the author and the time on every message that starts a group, mark the first message of each agent's group with the Agent badge, and show a Needs you tag only while the message still waits for the reader.
|
|
528
|
+
- **Don't.** A bubble, a card, or a per-message row of buttons; or a status badge on a message. The row stays flat, its actions live in the hover toolbar, and the thread's state badge lives in the thread panel's header.
|
|
529
|
+
- **Keyboard and screen reader.** The list is named for its channel or thread. A long name or URL in a row breaks anywhere (`overflow-wrap: anywhere` on the author and the body), so the page never scrolls sideways. Each row reads as its author, the Agent mark, the status, the time, and the body, in that order. The check icon is `aria-hidden`; the note's words carry it. The row itself takes no Tab stop: its links and its toolbar do.
|
|
528
530
|
- **Motion.** The fill changes over `--duration-fast` with `--ease-out`.
|
|
529
|
-
- **Forced colors.** The fills drop. The selected row takes a 2px `Highlight` border on its leading edge, as list selection does, and its leading padding gives up 2px for it.
|
|
531
|
+
- **Forced colors.** The fills drop. The selected row takes a 2px `Highlight` border on its leading edge, as list selection does, and its leading padding gives up 2px for it. The Agent badge draws as an outlined label, as every badge does, and the tag and note take the text colour. The tag's dot opts out of adjustment and draws in `CanvasText`, and the note's check icon takes `CanvasText` too; their words carry them.
|
|
530
532
|
|
|
531
533
|
## Message group
|
|
532
534
|
|
|
533
535
|
Layer: Core.
|
|
534
536
|
|
|
535
|
-
- **Anatomy.** A run of [message rows](#message-row). Consecutive messages by one author within about 5 minutes form a group: the first row shows the avatar, the author, and the time, and each later row is a continuation row with no avatar or
|
|
537
|
+
- **Anatomy.** A run of [message rows](#message-row). Consecutive messages by one author within about 5 minutes form a group: the first row shows the avatar, the author, the Agent mark for an agent, and the time, and each later row is a continuation row with no avatar, name, or mark and `0.125rem` top padding; the first row's mark covers the group. A different author, a longer gap, a day divider, or a message with a status starts a new group: a status sits in the header line, which a continuation row lacks, and a resolution names who resolved the thread. A continuation row shows its time in the avatar column while it is hovered or has focus within: `--text-xs`, `--color-muted`, tabular numbers, end-aligned. That time is `aria-hidden`; a visually hidden "author, time" before the body gives a screen reader both on every row. A day divider is a list item between groups: a `--text-xs` medium `--color-muted` label, such as "Today", between two 1px `--color-border-subtle` rules, with `--space-3` above it and `--space-1` below.
|
|
536
538
|
- **States.** None: a group lays out message rows, which keep their own states.
|
|
537
|
-
- **Do.** Group by author and time only, and start a new group after a day divider, even for the same author.
|
|
539
|
+
- **Do.** Group by author and time only, and start a new group after a day divider or at a message with a status, even for the same author.
|
|
538
540
|
- **Don't.** A group that spans two authors, or a continuation row that hides its time from a screen reader.
|
|
539
541
|
- **Keyboard and screen reader.** Each continuation row reads as "author, time", then its body, from its visually hidden text. A day divider reads as a list item with its label.
|
|
540
542
|
- **Motion.** None: the gutter time appears at once with the row's toolbar.
|
|
@@ -557,24 +559,33 @@ Layer: Core.
|
|
|
557
559
|
|
|
558
560
|
Layer: Core.
|
|
559
561
|
|
|
560
|
-
- **Anatomy.** A side pane beside the message list, with a 1px `--color-border-subtle` edge at its start. A header at least 44px tall (`--control-touch`), with a `--color-border-subtle` rule below it, holds the title ("Thread") in semibold, the channel in `--text-sm` `--color-muted`,
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
562
|
+
- **Anatomy.** A side pane beside the message list, with a 1px `--color-border-subtle` edge at its start. A header at least 44px tall (`--control-touch`), with a `--color-border-subtle` rule below it, holds the title ("Thread") in semibold, the channel in `--text-sm` `--color-muted`, cut short with an ellipsis when the pane is narrow, the thread's state badge, a secondary `sm` [button](#button), Resolve, while the thread is open, and an [overflow menu](#overflow-menu) trigger, More, at the end, `--space-2` apart. The state badge marks the exceptions; an open thread that waits for no one has none:
|
|
563
|
+
|
|
564
|
+
| Thread | Badge |
|
|
565
|
+
| --- | --- |
|
|
566
|
+
| Open, with a question that waits for the reader | Info: "Needs you" |
|
|
567
|
+
| Blocked: an agent's question stops the work until the reader answers | Warning: "Blocked" |
|
|
568
|
+
| Resolved as done | Success: "Done" |
|
|
569
|
+
| Resolved as dropped | Neutral: "Dropped" |
|
|
570
|
+
|
|
571
|
+
Blocked is the stronger form of Needs you, so a thread shows one of the two, never both. The message that waits takes the same tone in its tag's dot: info on "Asks you", warning on "Blocked on you". A resolved thread has no Resolve button. Its last reply is the resolving post, a [message row](#message-row) whose author is who resolved it and whose status says how, and its composer's hint says that a reply reopens it. The body scrolls: the root message with its facts and actions, a reply-count rule (a `--text-xs` `--color-muted` label such as "3 replies", then a `--color-border-subtle` rule to the end), and the replies as [message rows](#message-row). A [composer](#composer) sits at the bottom. The pane's start edge is a resize handle: a 6px hit area (`0.375rem`) centred on the edge, with `cursor: col-resize`. The pane is 26rem wide by default, and from 20rem to 40rem as the reader resizes it, and never so wide that the channel beside it drops below 16rem; the separator reports that limit as its maximum.
|
|
572
|
+
- **States.** Open or closed. The thread's own state (open, needs you, blocked, done, or dropped) is content, shown by the badge, not an interactive state. Resolve takes the button's own states while the post is written. The resize handle takes an `--color-accent` tint at 40% while hovered, and the tint with an inset focus ring at focus-visible.
|
|
573
|
+
- **Do.** Open a thread beside its channel, so the reader keeps the channel in view, and mark its root message as selected in the list. Keep Resolve beside the state it changes, in the header.
|
|
574
|
+
- **Don't.** A thread in a dialog, or a second pane beside the first. One thread is open at a time. A Reopen button: a reply reopens a resolved thread.
|
|
575
|
+
- **Keyboard and screen reader.** The pane is a complementary landmark (`<aside>`) named by its title. The handle is a focusable separator (`role="separator"`, `aria-orientation="vertical"`, `tabindex="0"`) named "Resize thread panel", with `aria-controls` naming the pane and `aria-valuenow`, `aria-valuemin`, and `aria-valuemax` in rem. Left Arrow widens the pane by 1rem and Right Arrow narrows it; a drag sets the width directly. Opening a thread moves focus to the pane's heading, and closing it returns focus to the action that opened it. Resolve removes itself, so once the thread is resolved focus moves to the pane's heading, and a polite live region says "Thread resolved". A refused resolve keeps the thread's state, returns focus to Resolve, and says why in an [alert](#alert) at the top of the body.
|
|
565
576
|
- **Motion.** None: the pane opens at once, and a resize follows the pointer or the arrow keys at once.
|
|
566
|
-
- **Forced colors.** The pane's edge and the header rule draw in the system colour. The handle's tint drops, so its focus ring shows the focus.
|
|
567
|
-
- **Tablet and phone.** At `max-width: 800px` the pane takes the full width below the message list, with its edge on top, and the handle is hidden.
|
|
577
|
+
- **Forced colors.** The pane's edge and the header rule draw in the system colour. The handle's tint drops, so its focus ring shows the focus. The state badge draws as an outlined label; its words carry the state.
|
|
578
|
+
- **Tablet and phone.** At `max-width: 800px` the pane takes the full width below the message list, with its edge on top, and the handle is hidden. The header wraps into two rows with `--space-1` between them and `--space-2` above and below: the title takes the first row whole, so the channel name keeps its room, and the state badge, Resolve, and More take the second, the badge at the start and the actions at the end. The padding keeps each 44px control's focus ring clear of the header's rule.
|
|
568
579
|
|
|
569
580
|
## Composer
|
|
570
581
|
|
|
571
582
|
Layer: Core.
|
|
572
583
|
|
|
573
584
|
- **Anatomy.** A box that holds one auto-growing `<textarea>` and an inline send button, with a one-line hint below it. The box is a field: `--color-field-bg`, a 1px `--color-field-edge` border, `--radius-panel`, and `--shadow-field`, with 5px (`0.3125rem`) padding inside its 1px border, 6px from its outer edge, and `--space-3` at the start. The textarea has no edge, fill, or ring of its own: `field-sizing: content`, at least `--control-sm` tall and at most 10rem before it scrolls, with no resize handle, in `--text-md` with line height 1.45. The send button is an icon-only primary [button](#button) at `sm`: a 28px circle with the SVG send icon. The 6px around it keeps the circle clear of the box's 12px corner; a circle is not a nested rectangle, so the concentric rule does not apply. It stays at the bottom of the box as the text grows. The hint is `--text-xs` `--color-muted`, `--space-1` below the box, and says where the message goes, such as "Saved to the board". An error, in the [field wrapper](#field-wrapper)'s error type, sits between the box and the hint.
|
|
574
|
-
- **States.** Rest (empty or typing), focus (the [field focus](#rules-for-every-control) on the box: `--color-accent` edge and `--shadow-field-focus`, no ring), invalid (refused: `--color-error` edge, `--shadow-field-focus-invalid` while focused, the reason as inline error text, and nothing saved), and disabled (offline: the box takes the disabled field look, the send button its own, and the hint says why). The send button keeps the primary button's own look.
|
|
585
|
+
- **States.** Rest (empty or typing), focus (the [field focus](#rules-for-every-control) on the box: `--color-accent` edge and `--shadow-field-focus`, no ring), busy (sending: the send button takes the button's busy state, and the textarea is `readonly`, keeping its text and focus without dimming, until the server accepts it, so nothing typed meanwhile is lost when the field clears), invalid (refused: `--color-error` edge, `--shadow-field-focus-invalid` while focused, the reason as inline error text, and nothing saved), and disabled (offline: the box takes the disabled field look, the send button its own, and the hint says why). The send button keeps the primary button's own look.
|
|
575
586
|
- **Do.** Name the field for where the message goes, such as "Reply to desktop-claude", and say in the hint what happens after sending.
|
|
576
587
|
- **Don't.** A Send label beside the field, or a second field for a title. The composer is one field and one icon.
|
|
577
|
-
- **Keyboard and screen reader.** The textarea has a visible or visually hidden `<label>`, and `aria-describedby` names the hint. Enter sends, and Shift+Enter starts a new line. The send button has `aria-label="Send"
|
|
588
|
+
- **Keyboard and screen reader.** The textarea has a visible or visually hidden `<label>`, and `aria-describedby` names the hint. Enter sends, and Shift+Enter starts a new line. Enter while an input method is composing text belongs to the input method, so it does not send. Text that is empty or only spaces does not send. Once the server accepts a message, the field clears and keeps focus. The send button has `aria-label="Send"`; while it is busy, a second Enter or click does nothing. A refused message keeps the text in the field, sets `aria-invalid="true"`, and names the error with `aria-errormessage`. Offline, the textarea and the button are `disabled`, and the hint gives the reason.
|
|
578
589
|
- **Motion.** None: as for the input, the focus and invalid edges change at once.
|
|
579
590
|
- **Forced colors.** As for the search field: the box's edge draws as the system field edge, and a focused composer draws a `Highlight` outline 1px inside its edge, because the inset line drops. The invalid edge relies on its error text.
|
|
580
591
|
- **Touch.** At tablet width (`max-width: 800px`) the textarea is at least `--control-touch` tall and the send button grows to a `--control-touch` circle, as every icon-only button does.
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The conversation components as components.md specifies them: message row, message group, hover toolbar,
|
|
3
|
+
* thread panel, composer, tool-call disclosure, and mention. components.html links this file, so it is the
|
|
4
|
+
* one source of these rules; copy markup from the catalogue's Conversation sections.
|
|
5
|
+
*
|
|
6
|
+
* Load it after tokens.css. The rules are unlayered, as the catalogue's own rules are, so they outrank a
|
|
7
|
+
* page's @layer base element rules and any layered component stylesheet, such as ui-sdk.css.
|
|
8
|
+
*
|
|
9
|
+
* The parts these components hold come from their own components, which this file does not draw: the
|
|
10
|
+
* badge (the Agent mark and the thread's state) and the alert from feedback.css, the button (Resolve and
|
|
11
|
+
* the send button) and the field error from ui-sdk.css or the catalogue, and the quiet action and the
|
|
12
|
+
* overflow menu (the hover toolbar and More) from the catalogue or ui-sdk's Menu.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
/* ---------- Message row and message group ---------- */
|
|
16
|
+
/* Message rows: flat, with no bubble. A group is one author's consecutive messages: the first row shows the
|
|
17
|
+
avatar, name, and time; continuation rows show their time in the avatar column on hover or focus within. */
|
|
18
|
+
.stream { display: grid; margin: 0; padding: 0; list-style: none; }
|
|
19
|
+
.day { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-3) 0 var(--space-1); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-medium); }
|
|
20
|
+
.day::before, .day::after { content: ""; flex: 1; border-top: 1px solid var(--color-border-subtle); }
|
|
21
|
+
.msg { position: relative; display: grid; grid-template-columns: 2rem minmax(0, 1fr); column-gap: var(--space-3); padding: 0.375rem var(--space-2); border-radius: var(--radius-inline); transition: background-color var(--duration-fast) var(--ease-out); }
|
|
22
|
+
.msg.cont { padding-top: 0.125rem; }
|
|
23
|
+
.msg + .msg:not(.cont) { margin-top: var(--space-2); }
|
|
24
|
+
@media (hover: hover) { .msg:hover { background: color-mix(in srgb, var(--color-row-hover) 55%, transparent); } }
|
|
25
|
+
/* The open thread's message: the selected fill, kept under hover. */
|
|
26
|
+
.msg[aria-current="true"] { background: var(--color-nav-current); }
|
|
27
|
+
.avatar { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: var(--radius-inline); background: var(--color-surface-muted); color: var(--color-muted); font: var(--weight-semibold) var(--text-xs) / 1 var(--font-mono); }
|
|
28
|
+
.gutter { align-self: start; padding-top: 0.25rem; color: var(--color-muted); font-size: var(--text-xs); font-variant-numeric: tabular-nums; text-align: end; opacity: 0; }
|
|
29
|
+
.msg.cont:focus-within .gutter { opacity: 1; }
|
|
30
|
+
@media (hover: hover) { .msg.cont:hover .gutter { opacity: 1; } }
|
|
31
|
+
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0 var(--space-2); line-height: 1.3; }
|
|
32
|
+
/* A long name or URL breaks anywhere rather than widen the page. */
|
|
33
|
+
.author { font-weight: var(--weight-semibold); overflow-wrap: anywhere; }
|
|
34
|
+
.author.agent { font-family: var(--font-mono); font-size: var(--text-sm); }
|
|
35
|
+
.msg-head time { color: var(--color-muted); font-size: var(--text-xs); }
|
|
36
|
+
/* The Needs you tag: a dot in the tone of the thread's state badge (info; warning when it blocks), and the label in the
|
|
37
|
+
text colour, because a status colour goes on the mark, not the words. */
|
|
38
|
+
.tag { --tone: var(--color-info); display: inline-flex; align-items: baseline; gap: var(--space-1); color: var(--color-text); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
|
|
39
|
+
.tag.warning { --tone: var(--color-warning); }
|
|
40
|
+
.tag:not(.resolved)::before { content: ""; flex: none; align-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--tone); }
|
|
41
|
+
/* The resolution note: the post that resolves a thread, by its author. A check leads "Resolved"; "Dropped" has none. */
|
|
42
|
+
.tag.resolved { color: var(--color-muted); font-weight: var(--weight-regular); }
|
|
43
|
+
/* The check is a line icon from the page's SVG sprite. Its size and stroke are set here, so the note needs no page icon class. */
|
|
44
|
+
.tag.resolved .icon { flex: none; align-self: center; width: 14px; height: 14px; color: var(--color-success); stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
45
|
+
/* The Agent badge keeps its own fill on the selected row, whose tint nearly matches the neutral badge in light. */
|
|
46
|
+
.msg[aria-current="true"] .msg-head .badge { background: var(--color-surface-raised); }
|
|
47
|
+
.msg-body { max-width: var(--measure); overflow-wrap: anywhere; }
|
|
48
|
+
.msg-body > * + * { margin-top: var(--space-1); }
|
|
49
|
+
/* Mention: an inline tint around @name. It is static text, not a link. */
|
|
50
|
+
.mention { padding: 0 0.1875rem; border-radius: var(--radius-mark); background: var(--color-nav-current); color: var(--color-nav-current-text); font-weight: var(--weight-medium); }
|
|
51
|
+
|
|
52
|
+
/* ---------- Hover toolbar ---------- */
|
|
53
|
+
/* A floating strip at the row's top right. Its buttons sit 4px inside its outer edge, so their corners are the
|
|
54
|
+
strip's 12px minus 4px. It shows on hover or focus within, and never on a touch screen. */
|
|
55
|
+
.msg-tools { position: absolute; top: -0.875rem; right: var(--space-2); z-index: 2; display: flex; gap: 0.125rem; padding: calc(var(--space-1) - 1px); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface-raised); box-shadow: var(--shadow-dialog); opacity: 0; pointer-events: none; }
|
|
56
|
+
.msg:focus-within > .msg-tools { opacity: 1; pointer-events: auto; }
|
|
57
|
+
@media (hover: hover) { .msg:hover > .msg-tools { opacity: 1; pointer-events: auto; } }
|
|
58
|
+
@media (hover: none) { .msg-tools { display: none; } }
|
|
59
|
+
/* Loads after the quiet action's and the overflow menu's rules, so at the same specificity as
|
|
60
|
+
.overflow > .quiet-action the More trigger takes the strip's size too. */
|
|
61
|
+
.msg-tools .quiet-action { width: 1.5rem; height: 1.5rem; padding: 0; border-radius: var(--radius-inline); }
|
|
62
|
+
/* :where keeps the muted rest below the quiet action's hover colour. */
|
|
63
|
+
:where(.msg-tools) .quiet-action { color: var(--color-muted); }
|
|
64
|
+
/* Inset: the strip is tight, so an outer ring would cross its edge. */
|
|
65
|
+
.msg-tools .quiet-action:focus-visible { outline-offset: calc(var(--focus-width) * -1); }
|
|
66
|
+
|
|
67
|
+
/* ---------- Tool-call disclosure ---------- */
|
|
68
|
+
/* One quiet summary line; the detail opens in a box on the surface colour. */
|
|
69
|
+
.tool > summary { display: inline-flex; align-items: baseline; gap: var(--space-2); margin-inline-start: calc(var(--space-1) * -1); padding: 0.125rem var(--space-1); border-radius: var(--radius-inline); color: var(--color-muted); font-size: var(--text-sm); list-style: none; cursor: pointer; transition: background-color var(--duration-fast) var(--ease-out), color var(--duration-fast) var(--ease-out); }
|
|
70
|
+
.tool > summary::-webkit-details-marker { display: none; }
|
|
71
|
+
.tool > summary::before { content: ""; flex: none; align-self: flex-start; width: 0.3125rem; height: 0.3125rem; margin-top: 0.5em; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform var(--duration-fast) var(--ease-out); }
|
|
72
|
+
.tool[open] > summary::before { transform: rotate(45deg); }
|
|
73
|
+
@media (hover: hover) { .tool > summary:hover { background: var(--color-row-hover); color: var(--color-text); } }
|
|
74
|
+
.tool > summary b { color: var(--color-text); font-weight: var(--weight-medium); }
|
|
75
|
+
.tool-body { margin-top: var(--space-1); padding: var(--space-2) var(--space-3); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface); font-size: var(--text-sm); }
|
|
76
|
+
.tool-body ul { display: grid; gap: 0.125rem; margin: 0; padding-inline-start: var(--space-4); }
|
|
77
|
+
|
|
78
|
+
/* ---------- Composer ---------- */
|
|
79
|
+
/* One field with an inline round send button 6px inside its outer edge, clear of the box's 12px corner. The box
|
|
80
|
+
takes the field look and focus; the textarea inside it draws nothing. */
|
|
81
|
+
.composer { display: grid; gap: var(--space-1); width: 100%; }
|
|
82
|
+
.composer-box { display: flex; align-items: flex-end; gap: var(--space-2); padding: 0.3125rem; padding-inline-start: var(--space-3); border: 1px solid var(--color-field-edge); border-radius: var(--radius-panel); background: var(--color-field-bg); box-shadow: var(--shadow-field); }
|
|
83
|
+
/* The padding centres one line in --control-sm; each further line adds a line, up to 10rem. */
|
|
84
|
+
.composer-box textarea { flex: 1 1 0; min-width: 0; min-height: var(--control-sm); max-height: 10rem; padding: calc((var(--control-sm) - 1lh) / 2) 0; border: 0; outline: 0; resize: none; field-sizing: content; background: transparent; color: var(--color-text); font: var(--text-md) / 1.45 var(--font-ui); overflow-wrap: anywhere; }
|
|
85
|
+
.composer-box textarea::placeholder { color: var(--color-muted); opacity: 1; }
|
|
86
|
+
.composer-box:has(textarea:focus-visible) { border-color: var(--color-accent); box-shadow: var(--shadow-field-focus); }
|
|
87
|
+
.composer-box:has(textarea[aria-invalid="true"]) { border-color: var(--color-error); }
|
|
88
|
+
.composer-box:has(textarea[aria-invalid="true"]):has(textarea:focus-visible) { border-color: var(--color-error); box-shadow: var(--shadow-field-focus-invalid); }
|
|
89
|
+
.composer-box:has(textarea:disabled) { background: var(--color-well); box-shadow: none; }
|
|
90
|
+
.composer-box textarea:disabled { opacity: 0.58; cursor: not-allowed; }
|
|
91
|
+
.composer-hint { color: var(--color-muted); font-size: var(--text-xs); }
|
|
92
|
+
|
|
93
|
+
/* ---------- Thread panel ---------- */
|
|
94
|
+
/* A side pane whose start edge is a resize handle. The page lays it out beside the message list. */
|
|
95
|
+
.thread-pane { position: relative; display: flex; flex-direction: column; min-width: 0; border-left: 1px solid var(--color-border-subtle); }
|
|
96
|
+
.pane-resize { position: absolute; inset: 0 auto 0 -0.1875rem; z-index: 3; width: 0.375rem; cursor: col-resize; }
|
|
97
|
+
@media (hover: hover) { .pane-resize:hover { background: color-mix(in srgb, var(--color-accent) 40%, transparent); } }
|
|
98
|
+
/* Focus: the tint and a ring, inset because the pane's frame clips the handle's ends. */
|
|
99
|
+
.pane-resize:focus-visible { background: color-mix(in srgb, var(--color-accent) 40%, transparent); outline: var(--focus-width) solid var(--color-focus); outline-offset: calc(var(--focus-width) * -1); }
|
|
100
|
+
.pane-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-2); min-height: var(--control-touch); padding: 0 var(--space-2) 0 var(--space-4); border-bottom: 1px solid var(--color-border-subtle); }
|
|
101
|
+
/* The title takes the room the state badge, Resolve, and More leave, and a long channel name ends in an ellipsis. */
|
|
102
|
+
.pane-head h4 { display: flex; flex: 1; align-items: baseline; gap: var(--space-2); min-width: 0; font-size: var(--text-md); letter-spacing: 0; }
|
|
103
|
+
.pane-head h4 span { min-width: 0; overflow: hidden; color: var(--color-muted); font-size: var(--text-sm); font-weight: var(--weight-regular); text-overflow: ellipsis; white-space: nowrap; }
|
|
104
|
+
/* The body scrolls inside the pane's column, so long replies never push the composer out of a pane of fixed height. */
|
|
105
|
+
.pane-body { flex: 1; min-height: 0; overflow: auto; padding: var(--space-5) var(--space-2) var(--space-3); }
|
|
106
|
+
.reply-count { display: flex; align-items: center; gap: var(--space-3); margin: var(--space-3) 0 var(--space-2); color: var(--color-muted); font-size: var(--text-xs); }
|
|
107
|
+
.reply-count::after { content: ""; flex: 1; border-top: 1px solid var(--color-border-subtle); }
|
|
108
|
+
.thread-pane > .composer { padding: 0 var(--space-3) var(--space-3); }
|
|
109
|
+
.msg-links { display: flex; flex-wrap: wrap; gap: 0 var(--space-3); color: var(--color-muted); font-size: var(--text-sm); }
|
|
110
|
+
|
|
111
|
+
/* ---------- Forced colors ---------- */
|
|
112
|
+
@media (forced-colors: active) {
|
|
113
|
+
/* The inset accent line drops, so a focused composer draws the system ring just inside its edge. */
|
|
114
|
+
.composer-box:has(textarea:focus-visible) { outline: var(--focus-width) solid Highlight; outline-offset: -1px; }
|
|
115
|
+
/* The open thread's message loses its fill, so it takes the list selection's system border; the padding absorbs it. */
|
|
116
|
+
.msg[aria-current="true"] { border-inline-start: 2px solid Highlight; padding-inline-start: calc(var(--space-2) - 2px); }
|
|
117
|
+
/* An SVG keeps the colour it sets, and the tag's dot is a fill, so both take the system text colour; the words carry them. */
|
|
118
|
+
.tag.resolved .icon { color: CanvasText; }
|
|
119
|
+
.tag:not(.resolved)::before { forced-color-adjust: none; background: CanvasText; }
|
|
120
|
+
}
|
|
121
|
+
|
|
122
|
+
/* ---------- Tablet and phone ---------- */
|
|
123
|
+
@media (max-width: 800px) {
|
|
124
|
+
/* Touch: the hover toolbar never shows; a tap opens the thread, whose header holds More. */
|
|
125
|
+
.msg-tools { display: none; }
|
|
126
|
+
.composer-box textarea { min-height: var(--control-touch); padding-block: calc((var(--control-touch) - 1lh) / 2); }
|
|
127
|
+
/* The thread pane takes the full width below the message list, and the handle hides. */
|
|
128
|
+
.thread-pane { border-left: 0; border-top: 1px solid var(--color-border-subtle); }
|
|
129
|
+
.pane-resize { display: none; }
|
|
130
|
+
/* The header wraps: the title takes the first row, whole, and the state badge, Resolve, and More the second, with the
|
|
131
|
+
badge at the start and the actions at the end. The padding keeps each 44px control's focus ring clear of the rule. */
|
|
132
|
+
.pane-head { flex-wrap: wrap; justify-content: flex-end; row-gap: var(--space-1); padding-block: var(--space-2); }
|
|
133
|
+
.pane-head h4 { flex-basis: 100%; }
|
|
134
|
+
.pane-head > .badge { margin-inline-end: auto; }
|
|
135
|
+
}
|
package/language/decisions.md
CHANGED
|
@@ -50,7 +50,7 @@ Each entry records a choice this language made, the options it rejected, and why
|
|
|
50
50
|
| Tab density | Core | A tab has the button's box: at least `--control-md` (32px) tall, 10px inline padding, no block padding, and line height 1; `data-size="sm"` tabs, for app screens, are 28px with 8px padding. Tabs grow to `--control-touch` at tablet width. The list keeps its 4px padding, which keeps the selected tab's shadow whole where the list clips. The owner asked for narrower tabs with less dead space on 2026-11-24. | The tab before: `--space-2` `--space-3` padding with line height 1.6 made a 38px tab, taller than every control beside it, and 84px wide for "Overview". 2px list padding: it clips the selected tab's `--shadow-nav-current`, which reaches 4px below the tab. | heights: `tests/catalogue/catalogue.spec.ts` "renders control sizes" (tabs at their exact control height) |
|
|
51
51
|
| Code wrap toggle | Core | Every multi-line code block (one with a header, or a live example's source) has a Wrap lines toggle before Copy: an icon-only quiet action with a fixed name and `aria-pressed`. It is off by default, per block, and not saved. Astryx offers wrapping only as a caller prop (`CodeBlock` spec: "optional wrapping"); this departs from it with a reader control, as T3 Code's code blocks have. The owner asked for it on 2026-11-24. | Wrapping by default: it would reflow every code block on the five sites, and the spec has the panel scroll. A name that flips between Enable and Disable line wrap, as T3 Code's tooltip does: with `aria-pressed` it would announce the state twice. Saving the choice: one more stored setting for a per-block reading aid. A toggle on compact blocks: they hold one line. | toggle, wrapping, and copy: `tests/catalogue/catalogue.spec.ts` "Wrap lines wraps a code block, and Copy still copies its lines" |
|
|
52
52
|
| Astryx as the reference system | Core | When a value or behaviour is not decided here, start from Astryx's (`meta/astryx`, MIT, read at `7032abf`), and record any departure in this file. Take the idea and the values, never the code. The identity stays this system's: its type pair, the theme hues, quiet depth, and the forced-colors rules. The owner chose this on 2026-11-22 so the system stops re-deciding settled questions; the quiet action fill, the focus ring, field focus, the radius scale, and the compact controls already follow Astryx. React apps keep ui-sdk for behaviour: `ui-sdk.css` draws it. | Astryx's React components in React apps, themed with these tokens: it reverses the board's ui-sdk choice, and the Vue library could not use them. Making the design system a wrapper of ui-sdk: `@filipgutica/ui` (Vue) and the static sites use the design system, ui-sdk is React-only here and in beta, and `ui-sdk.css` already draws ui-sdk's parts. Deciding each value from scratch: it re-decided questions Astryx has answered, and the results drifted toward it anyway. | No test: a working rule for authors |
|
|
53
|
-
| Conversation components | Core | Message row, message group, hover toolbar, thread panel, composer, tool-call disclosure, mention, and chip are specified here before any app builds them, so the board's React code and any later Vue component draw from one spec. They follow the board mockups (2026-11-22) and Slack, T3 Code, and ChatGPT patterns: flat rows with no bubble; one author's messages within about 5 minutes grouped under one avatar; actions in a hover toolbar that is one Tab stop (`role="toolbar"`, arrow keys between its actions) and never shown on touch; tool output collapsed to one line in a native `<details>`; a composer that is one field with an inline send button; a thread in a side pane, resizable from 20rem to 40rem by drag or arrow keys and full width at tablet width. Conversation sits after Navigation, because its parts reuse the selected row and the overflow menu. A message takes one
|
|
53
|
+
| Conversation components | Core | Message row, message group, hover toolbar, thread panel, composer, tool-call disclosure, mention, and chip are specified here before any app builds them, so the board's React code and any later Vue component draw from one spec. They follow the board mockups (2026-11-22) and Slack, T3 Code, and ChatGPT patterns: flat rows with no bubble; one author's messages within about 5 minutes grouped under one avatar; actions in a hover toolbar that is one Tab stop (`role="toolbar"`, arrow keys between its actions) and never shown on touch; tool output collapsed to one line in a native `<details>`; a composer that is one field with an inline send button; a thread in a side pane, resizable from 20rem to 40rem by drag or arrow keys and full width at tablet width. Conversation sits after Navigation, because its parts reuse the selected row and the overflow menu. A message takes one status at most, in two tones: the Needs you tag, `--color-text` semibold led by a dot in the tone of the thread's state badge (info for "Asks you", warning for "Blocked on you"), only while a message waits for the reader, and a muted resolution note on the post that resolves a thread, whose author is the resolver, or on a resolved thread's root shown alone, which names the resolver ("Resolved by …"). An agent's message carries a neutral Agent badge, and the person's own carry none, so agents are the marked exception (added 2026-11-27 for devchat). It is an identity mark, the one badge that repeats down a list against "badge the exceptions": it goes in the header line of a group's first message, and continuation rows carry no header, so the group's one mark covers them, and the owner kept it after the visual review (2026-11-27). A thread's state (Needs you, Blocked, Done, Dropped; none while open) is one badge in the thread panel's header, beside a secondary Resolve button; a reply reopens a resolved thread, so there is no Reopen. A message with a status starts a new group, so its author shows. The thread's badge and a message's tag may both be in view, such as Needs you in the header and Asks you on the reply: the badge says the thread's state, and the tag says which message it is about, so neither repeats the other. `conversation.css` holds these components' rules, and the catalogue links it after its own stylesheet, so devchat and the catalogue draw from one file; it is unlayered like the catalogue's rules, and the catalogue's pinned states outrank its rules by specificity. The badge and the alert they hold ship the same way, in `feedback.css`, because ui-sdk 0.1.0-beta.5 has no badge or alert part for `ui-sdk.css` to draw. A mention is static text, not a link. | Bubbles or cards around messages: the board read as busy, and Slack, T3 Code, and ChatGPT use flat rows. A row of buttons on every message: it repeats the same actions down the stream. A toolbar as a `role="group"`: three Tab stops for each message in a long stream. A thread in a dialog: it hides the channel the reader is replying about. Building the components in the board app first: the app's code would become the only definition. Status badges on messages: beside the Agent badge they made two pills in a header line, and the thread's badge already carries its state. A resolution as a separate event line with no author: it hid who resolved the thread, which a message row shows already. An all-caps "AGENT" label: the language keeps the source text's case. A "You" badge on the person's messages: it marks the default, not the exception. The tag in `--color-nav-current-text`: it drew the thread's state in a second hue beside the header's badge. The tag's words in the status colour: outside badges a status colour goes on the mark, not the label. Only one of the thread badge and the message tag: the badge alone hides which message needs the reader, and the tag alone hides a blocked or done thread whose question has scrolled away. The rules in the catalogue's inline style only, copied into the app: two copies drift. A split inline style with the file linked between its halves: the site build swaps the one `</style>` and checks the one shared style. `@layer components`, as `ui-sdk.css` uses: the catalogue's unlayered rules would then outrank every conversation rule. Resolve as the primary button: the composer's send is the pane's one filled action. | rendered corners by role and the conversation keyboard paths: `tests/catalogue/catalogue.spec.ts`, with "the composer sends on Enter and keeps the field, starts a new line on Shift+Enter, and sends no blank text" and "Resolve marks the thread done, ends its replies with the resolution, and moves focus to the pane heading"; parts, groups, and states agreement: `tests/component-parts.test.mjs` and `tests/design-foundations.test.mjs` |
|
|
54
54
|
| Phone header | Core | The family shell, option A, which the owner chose on 2026-11-11: the site's header matches the other family sites. At tablet width the static header has two rows, the project switcher and the appearance control, then the Pages strip. Where both do not fit, as at 320px, the appearance control wraps to its own row at the start, as UiSiteHeader does on PluginBench and Filip Stack, and the project name never truncates. The rule below the header is the family's solid `--color-text` line. Just below it, at the start, the labelled trigger ("Components: By purpose") opens the drawer from the left, the side it sits on. The drawer is titled with the rail's name and holds Find and the rail's groups. `/` opens it with Find focused. Without JavaScript nothing moves. | The Gate M single sticky row with the site name, then icon-only Find and Menu buttons, with the pages and appearance in the Menu drawer: the site had no way to the other family sites, and the Menu button sat at the right while the drawer slid in from the left. Option B, keeping that row and sliding the drawer in from the right: it kept the site apart from the other seven family sites. Truncating the project name at 320px so both controls shared row 1: the family wraps the picker instead, and the name should never truncate. | `tests/site/site.spec.ts` "the switcher and appearance share the first row, then the pages, then the trigger", "the switcher and appearance take a row each, then the pages, then the trigger", "every clipped strip link shows at least 16px", "the trigger opens the drawer from the left edge, titled with the rail and holding Find and the rail only", "the trigger label follows the current section as the page scrolls"; `tests/catalogue/catalogue.spec.ts` "the trigger opens the drawer on the current row, and a link closes it and focuses the target" |
|
|
55
55
|
| Drawer instead of a long strip | Core | A horizontal strip holds 6 links or fewer; a longer list moves into the drawer at tablet width. | The catalogue's 26-link strip on phones: most links sat off screen, and the page broke its own drawer spec. | rail moves into the drawer: `tests/catalogue/catalogue.spec.ts` "resizing moves the rail between the page and the drawer, and the pages and appearance stay in the header"; six-link strip limit: no test yet |
|
|
56
56
|
| Drawer and slideout | Core | Owner decision, 2026-11-25: two components for two jobs. A drawer holds navigation and opens from the leading edge; a slideout holds filters or secondary detail, opens from the trailing edge by default (the top or bottom when the page names it), is `min(75%, 384px)` wide, and may have a footer whose actions stack on phones. Both share the floating layer, backdrop, page-scroll lock, and slide, and every slideout close returns focus to its trigger. | One drawer for navigation and detail: the owner reads "drawer" as a navigation menu, so a filter panel called a drawer read as the wrong component, and the one spec could not say which edge or width a panel takes. | spec parts: `tests/component-parts.test.mjs` "every component section has every part, or says None with a reason"; edge, width, close, scroll lock, and footer: `tests/catalogue/catalogue.spec.ts` "slideout" |
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* The badge and the alert as components.md specifies them. components.html links this file, so it is the one
|
|
3
|
+
* source of these rules; copy markup from the catalogue's Badge and Alert sections. ui-sdk 0.1.0-beta.5 has no
|
|
4
|
+
* badge or alert part, so an app on ui-sdk renders them as plain elements with these classes.
|
|
5
|
+
*
|
|
6
|
+
* Load it after tokens.css. The rules are unlayered, as the catalogue's own rules are, so they outrank a page's
|
|
7
|
+
* @layer base element rules and any layered component stylesheet, such as ui-sdk.css.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/* ---------- Badge ---------- */
|
|
11
|
+
/* An inline pill. Neutral is the default; .success, .warning, .danger, and .info are status tones with a dot. */
|
|
12
|
+
.badge { display: inline-flex; align-items: center; gap: var(--space-1); width: fit-content; padding: 0.125rem 0.375rem; border: 1px solid transparent; border-radius: var(--radius-pill); background: var(--color-surface-muted); color: var(--color-muted); font: var(--weight-medium) var(--text-xs) / 1.25 var(--font-ui); white-space: nowrap; }
|
|
13
|
+
.badge:is(.success, .warning, .danger, .info) { background: color-mix(in srgb, var(--tone) 22%, var(--color-surface-raised)); color: light-dark(color-mix(in srgb, var(--tone) 75%, var(--color-status-ink)), color-mix(in srgb, var(--tone) 85%, var(--color-status-ink))); }
|
|
14
|
+
.badge:is(.success, .warning, .danger, .info)::before { content: ""; flex: none; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
|
15
|
+
.badge.success { --tone: var(--color-success); }
|
|
16
|
+
.badge.warning { --tone: var(--color-warning); }
|
|
17
|
+
.badge.danger { --tone: var(--color-error); }
|
|
18
|
+
.badge.info { --tone: var(--color-info); }
|
|
19
|
+
|
|
20
|
+
/* ---------- Alert ---------- */
|
|
21
|
+
/* A caveat or status the reader needs before acting: a soft tint of its tone, with the icon in the tone. */
|
|
22
|
+
.alert { display: flex; align-items: flex-start; gap: var(--space-3); max-width: var(--measure); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); }
|
|
23
|
+
/* The icon is a 16px line icon from the page's SVG sprite. Its size and stroke are set here, so the alert needs no page icon class. */
|
|
24
|
+
.alert .icon { flex: none; width: 16px; height: 16px; margin-top: 0.125rem; color: var(--color-muted); stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
25
|
+
.alert.success { background: var(--color-success-surface); } .alert.success .icon { color: var(--color-success); }
|
|
26
|
+
.alert.warning { background: var(--color-warning-surface); } .alert.warning .icon { color: var(--color-warning); }
|
|
27
|
+
.alert.danger { background: var(--color-error-surface); } .alert.danger .icon { color: var(--color-error); }
|
|
28
|
+
.alert.info { background: var(--color-info-surface); } .alert.info .icon { color: var(--color-info); }
|
|
29
|
+
|
|
30
|
+
/* ---------- Forced colors ---------- */
|
|
31
|
+
@media (forced-colors: active) {
|
|
32
|
+
/* The tone dot is a fill, so it opts out of adjustment and takes the label's system colour. */
|
|
33
|
+
.badge:is(.success, .warning, .danger, .info)::before { forced-color-adjust: none; background: CanvasText; }
|
|
34
|
+
/* An SVG keeps the colour it sets, so the status icon takes the system text colour. */
|
|
35
|
+
.alert .icon, .alert:is(.success, .warning, .danger, .info) .icon { color: CanvasText; }
|
|
36
|
+
}
|
package/language/guide.html
CHANGED
|
@@ -45,7 +45,6 @@ html { scroll-padding-top: var(--space-4); }
|
|
|
45
45
|
.rail-summary { list-style: none; width: max-content; max-width: 100%; border-radius: var(--radius-field); }
|
|
46
46
|
.rail-summary::-webkit-details-marker { display: none; }
|
|
47
47
|
.rail-summary::after { content: ""; width: 6px; height: 6px; margin-left: var(--space-1); border-right: 1px solid currentColor; border-bottom: 1px solid currentColor; transform: rotate(45deg); }
|
|
48
|
-
details.rail-details[open] > .navlist { margin-top: var(--space-2); }
|
|
49
48
|
/* Drawer: components.html#drawer, unchanged. A closed dialog stays hidden under the recipe's display. */
|
|
50
49
|
dialog:not([open]) { display: none; }
|
|
51
50
|
.drawer { display: grid; grid-template-rows: auto minmax(0, 1fr); width: min(calc(var(--sidebar-width) + var(--space-12)), 100%); height: 260px; overflow: hidden; padding: 0; border: 1px solid transparent; background: var(--color-surface-raised); color: var(--color-text); box-shadow: var(--shadow-dialog); }
|
|
@@ -91,7 +90,8 @@ main { grid-area: main; min-width: 0; display: grid; gap: var(--space-12); paddi
|
|
|
91
90
|
.contents .navlist { min-height: 0; overflow-y: auto; overscroll-behavior: contain; padding: 0.125rem; }
|
|
92
91
|
/* The heading sits outside the scrolling rows, so it stays put while they scroll. */
|
|
93
92
|
.contents-list > .group-label { flex: none; margin: 0; padding: 0 var(--space-3) var(--space-1); color: var(--color-muted); font-size: var(--text-xs); font-weight: var(--weight-semibold); }
|
|
94
|
-
/* Beside the column every list shows, so the summaries hide and each list stays open without the script
|
|
93
|
+
/* Beside the column every list shows, so the summaries hide and each list stays open without the script,
|
|
94
|
+
except in WebKit, which shows no closed disclosure's rows; there the script opens them. */
|
|
95
95
|
:is(.pages, .contents) .rail-summary { display: none; }
|
|
96
96
|
:is(.pages, .contents) > details::details-content { content-visibility: visible; }
|
|
97
97
|
.pages > details:not([open]) > .navlist { display: grid; }
|
|
@@ -124,6 +124,7 @@ footer { padding-block: var(--space-6); border-top: 1px solid var(--color-border
|
|
|
124
124
|
.pages .rail-summary { display: inline-flex; }
|
|
125
125
|
.pages > details::details-content { content-visibility: revert; }
|
|
126
126
|
.pages > details:not([open]) > .navlist { display: none; }
|
|
127
|
+
.pages > details[open] > .navlist { margin-top: var(--space-2); }
|
|
127
128
|
.contents { padding-block: var(--space-3) 0; }
|
|
128
129
|
.docs > main { padding-top: var(--space-6); }
|
|
129
130
|
[data-enhanced] .pages, [data-enhanced] .contents { display: none; }
|
|
@@ -249,6 +250,16 @@ const place = () => {
|
|
|
249
250
|
root.dataset.enhanced = '';
|
|
250
251
|
phone.addEventListener('change', place);
|
|
251
252
|
place();
|
|
253
|
+
// Beside the column a list is open. CSS decides where: there it hides the list's summary. WebKit shows no
|
|
254
|
+
// closed disclosure's rows whatever the CSS, so the script opens the list, and closes it again when the
|
|
255
|
+
// frame narrows. It changes a list only when that changes, so a reader's own choice stays until then.
|
|
256
|
+
// Opening or closing a list resizes the observed frame, so it waits a frame to avoid a resize loop.
|
|
257
|
+
const besideColumn = new Map();
|
|
258
|
+
new ResizeObserver(() => requestAnimationFrame(() => document.querySelectorAll('.rail-details').forEach((details) => {
|
|
259
|
+
const beside = getComputedStyle(details.querySelector('summary')).display === 'none';
|
|
260
|
+
if (besideColumn.get(details) !== beside) details.open = beside;
|
|
261
|
+
besideColumn.set(details, beside);
|
|
262
|
+
}))).observe(document.querySelector('.layout'));
|
|
252
263
|
// The drawer opens with the current section in view. A tap puts focus on its body, so no ring shows; a keyboard
|
|
253
264
|
// open focuses the current section, where the ring shows the reader's place.
|
|
254
265
|
trigger.addEventListener('click', (e) => {
|
package/language/reference.html
CHANGED
|
@@ -268,7 +268,7 @@
|
|
|
268
268
|
|
|
269
269
|
/* Alert: components.html#alert, unchanged. */
|
|
270
270
|
.alert { display: flex; align-items: flex-start; gap: var(--space-3); max-width: var(--measure); padding: var(--space-3) var(--space-4); border: 1px solid transparent; border-radius: var(--radius-panel); background: var(--color-surface); color: var(--color-text); font-size: var(--text-sm); }
|
|
271
|
-
.alert .icon { margin-top: 0.125rem; color: var(--color-muted); }
|
|
271
|
+
.alert .icon { flex: none; width: 16px; height: 16px; margin-top: 0.125rem; color: var(--color-muted); stroke: currentColor; fill: none; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
272
272
|
.alert.success { background: var(--color-success-surface); } .alert.success .icon { color: var(--color-success); }
|
|
273
273
|
.alert.warning { background: var(--color-warning-surface); } .alert.warning .icon { color: var(--color-warning); }
|
|
274
274
|
.alert.danger { background: var(--color-error-surface); } .alert.danger .icon { color: var(--color-error); }
|