diff --git a/docs/foundations.md b/docs/foundations.md index 2ad43421..41ea296e 100644 --- a/docs/foundations.md +++ b/docs/foundations.md @@ -148,7 +148,7 @@ kept as a rule so both themes behave alike (DECISIONS 166). Four text levels wer full-bleed band that holds its own control focuses that control. A band that is itself the link or button takes the flush-field −2 inset above. A sortable table header is exactly that band (see the still table below). Navigation items are focusable rows: their ring goes around the hugging pill (see [Navigation](#navigation)). So are the - notification centre's entries: links or buttons, which join the hover glide on navigation's rules (below). Otherwise Basalt ships none: + notification centre's entries: links or buttons, which join the hover glide on navigation's rules (below), and the disclosure row (see [The conversation stream](#the-conversation-stream)). Otherwise Basalt ships none: the rows of Menu, Select, Combobox and CommandMenu are options and show the plate, breadcrumbs and pagination are inline, and a settings or list row is the app's own markup. The accordion trigger is the one full-width band that is itself a button; it keeps the ring it was built with @@ -2110,6 +2110,68 @@ every page, every sort), the band, Previous, Next, the count's seat, the page si (`packages/react/test/lists-modals.test.mjs`). Not checked: a real phone (on iOS the held foot sits under the keyboard while typing, as in any web form), WebKit, Firefox, a screen reader and a Windows contrast theme. +## The conversation stream + +**Status.** Decided and built by Opus on the no-council path (DECISIONS 226 and 265); the implementation is reviewed by Astra and the pixels by the +lead, and the owner sees the pictures (review round 56) before merge. Found by the first app built on Basalt (the second gaps batch, B2). React's +alone: the HTML skill has no stream module (a follow-up batch). + +A stream is one column of entries, oldest first: a support thread, a team chat, a document's comments, an assistant's answer, a build's history +(`Stream`, an ordered list). It is not a live region and does not follow its end: an app that adds entries follows the end only while the reader is +at it, as a `Terminal` does, and says what must be heard through `StatusLine`. Basalt draws; what joins, the words and the data are the app's. + +- **A message** (`StreamMessage`): the avatar's 32px gutter, `space-3`, then the text column. The head is the name at `text-base` and 500 in primary + and the time at `text-xs` in tertiary, tabular, on one baseline; meta (a `Presence`, a badge) follows the time, and controls sit at the head's end. The + words are `text-base` (14/20) in primary and wrap anywhere; they are in block flow, so a link or a badge stays in its sentence, and blocks inside + (a paragraph, a list, a quote, a disclosure row) stand `space-2` apart. The avatar is decoration (the name beside it is read). **Consecutive messages join** when + the app says so (`joined`: the author, the minutes between and an edit are the app's rules, never a number in Basalt): no avatar and no head are + drawn, and the name and time are said before the words. A new author starts `space-4` below the last entry, a joined message `space-1`. +- **A note** (`StreamNote`, "Lee joined", "Status set to Open") is a quieter row: a sentence at `text-sm` in secondary in the text column, its time + after it, and an optional icon at 16 centred in the gutter. Two notes stand `space-2` apart. A day is `EventLogRule`. +- **The other side of an exchange** (`StreamQuote`: what a person said to an assistant or a bot, the message a reply answers) is a fill one step from + its ground, radius 8, `space-2` by `space-3` inside, and **no rim**: the turn it sits in keeps the only frame. In dark the step is the level above + what it sits in (it is a well, with its own `data-level`); in light it is `surface-sunken-strong`, because light's levels 1 to 3 are one white. No + bar and no indent rule mark it. The words above it say whose it is ("Dana asked", "Replying to Sam", the app's), tertiary at 12 with the time, so the + fill never carries that alone; it is a `figure` with a `figcaption` and a `blockquote`. +- **The entry you came to** (`arrived` on a message, a note, an entry or a block). The entry a link, a search result or a notice opened is scrolled to + (to the middle of what scrolls it; one taller than most of that, a pane's visible height or the window's, to its top) and focused with no ring, as a page's title is after a route change: it is a place, + not a control (it is `tabindex="-1"` from then on, so the mark's going never drops focus). It is marked by the selected wash on its own ground and by + a word. A message, a note or a block that is not a panel takes a **plate**: one solid fill per level (the choice card's recipe), radius 8, reaching + `space-2` past the entry at the sides and `space-1` above and below, behind its content, so nothing in it moves. **A panel is never framed from + outside** (no outer frame, no outline, no bar): its own fill takes the wash, inside its one rim. The word ("Linked" by default; the app says why: + "From your notice", "Search result") is secondary at 12 at the end of the head; a panel entry's app puts it in the panel's head + (`StreamArrivedWord`); a block's message says it in its head, in the block's own words, and a block in a joined message (no head) draws it above + itself, so the word is always seen while the mark is on. Tertiary words on the wash step up to secondary. A joined message that arrives draws + its head, and keeps it. **It lasts until the reader acts**: a press anywhere, or a key that does not scroll (the arrows, Page Up and Down, Home, End + and Space outside a field read around it and leave it); then it goes over 0.75 of `duration-slow` on `ease-in`, and the word's room stays, so + nothing moves. It comes at once. An entry that has no box yet (in a hidden tab or pane) is not spent: it is scrolled to, focused and armed once it is + shown. One entry arrives at a time: placing another ends the one before (its `onArrivedEnd` is called). In forced colours the fill drops and the word stays; under reduced motion the fade is + the same, being colour and opacity. In a `LoadingShape` (and its twin) it does nothing. +- **A disclosure row** (`DisclosureRow`): one line that opens to its detail (a tool call, a thought, a folded stretch, a step's log). Lighter than + `Accordion`, which is for a page's sections: no heading, no divider, no wash. A button (`aria-expanded`, `aria-controls`) on Base UI's Collapsible: an + optional mark in a 16px seat, the line at `text-sm` in secondary, an optional meta in tertiary, and the core chevron at the end, which morphs from right + to down (a rotation group; under right-to-left it points left while closed). Closed, the line is cut with an ellipsis; open, it wraps, so it is read + whole in place (`wrap` keeps it wrapped while closed). Hover lifts the ink to primary and the meta to secondary, with no wash, as on a ruled list on + the page. It is a focusable row: the control ring at +2, radius 6. 28 tall, 44 on touch. The detail opens by height over `duration-slow` on + `ease-out` and closes at 0.75 on `ease-in`, at once under reduced motion; its clip reaches `space-1-5` past the detail, so a ring inside is whole. +- **An activity list** (`ActivityList`, `ActivityStep`): steps that run and report, a sentence each at `text-sm`, wrapping at any width. It is not + `Stepper` (a known sequence), not `EventLog` (links in mono with a time column and one tab stop) and not `LogLine` (a log's mono fields). Each step has + the plain badge's status seat (6, and a gap as wide): braille while it runs, the tertiary dot once done, the danger dot when it failed, the hollow ring + while it waits. A failed or waiting step draws its word ("Failed", "Waiting", or the app's) at 500 in primary before its sentence, as a refused + command's word is; a running or done step's word is said and not drawn, unless the app gives one ("Skipped"). The running, failed and waiting sentences + are primary and done ones secondary: ink marks where the work is, and colour is only the danger dot beside its word. A step with detail is a + disclosure row; when any step has detail, every step keeps the chevron's seat, so the metas line up. It is not a live region. +- **Presence with a duration** (`Presence`): a `Badge`, plain beside a name or in its outline: the success dot while active, the hollow ring while + away, the tertiary dot while offline, and always the state's word ("Active", "Away", "Offline", or the app's). With `since`, how long it has lasted + follows the word in its ink ("Away 6 min"): nothing under a minute (the element is there, empty and hidden, so a server's render and the + client's hydration agree), nothing for an invalid date, then "6 min", "1 hr 5 min", "3 days" (`formatElapsed`, US English; an app writing + another language passes `format`). **This is a duration, not a relative age:** it says how long something still true has been true, as a countdown + says the time left, so it stands without a date (a relative age, "11 days ago", is still written only beside its date). It is a `time` with an ISO + duration, ticks by the minute on the one shared timer, holds under `data-loops="held"`, is no live region and is not stopped by reduced motion. + `Elapsed` is the length alone, after any state's word ("Running 12 min"). +- **Loading.** The stream's parts are drawn by `LoadingShape` like any others: an avatar is a bone in its disc, the name, time and words are bars as + long as their words, a mark is a bone in its box. Nothing in them is sized by hand for loading. + ## Loading in the page's own shape **Status.** Decided by Opus and approved by the owner (DECISIONS 247, 248, 249b and 258: the shape of what it stands for, known words kept and icons hidden, @@ -2183,7 +2245,7 @@ as if it were known, which Basalt can't detect. ## What the HTML skill does not draw -The log slots, the status bar, the command block, the event log, the source stamp, the inline-label rows, the filter toolbar, the notice bar, the listbox, the open list, the drawer and `Reflow` are React's alone: the HTML skill has no module for them (DECISIONS 167, Q8). So are `Pagination` and `ListBand` (DECISIONS 222: the skill has no pagination module and none is added). The skill's modules draw the rest (DECISIONS 230, the owner approved the caps): `select` has `data-numeric` (the width of its widest option, measured once fonts are ready; cap 9,000), `filter` has a toolbar trigger that holds its widest value (cap 17,450), and the form dialog is a module of its own, `dialog-form` (`data-form`: the 480 box, the held head and foot, the scrolling body, full screen under 720, the top held as it opens and first focus by the input that opened it; cap 2,200), so the plain and alert dialog keep `dialog`'s 5,150. React's alone: `FormGrid` and the rest of Declare's gaps (DECISIONS 242: the form grid, a segmented control's `fullWidth`, `required`, `invalid` and its tab stop on the chosen value, a `Switch` description, `TextButton` keeping focus and underlining a `Reserve`), the held top's re-measure on a window resize, and the scrim closing a form only while nothing has been entered (the skill's scrim closes it). React's alone too: `LoadingShape` and its parts (DECISIONS 258; the skill's loading shape is a follow-up batch). React's alone too: `Composer`, `Mention` and `MentionPicker` (cimip-gaps-2, B3; see [Writing to someone](#writing-to-someone-the-composer-the-mention-and-the-picker)). Whether the skill gets the links and the charts is not decided. +The log slots, the status bar, the command block, the event log, the source stamp, the inline-label rows, the filter toolbar, the notice bar, the listbox, the open list, the drawer and `Reflow` are React's alone: the HTML skill has no module for them (DECISIONS 167, Q8). So are `Pagination` and `ListBand` (DECISIONS 222: the skill has no pagination module and none is added). The skill's modules draw the rest (DECISIONS 230, the owner approved the caps): `select` has `data-numeric` (the width of its widest option, measured once fonts are ready; cap 9,000), `filter` has a toolbar trigger that holds its widest value (cap 17,450), and the form dialog is a module of its own, `dialog-form` (`data-form`: the 480 box, the held head and foot, the scrolling body, full screen under 720, the top held as it opens and first focus by the input that opened it; cap 2,200), so the plain and alert dialog keep `dialog`'s 5,150. React's alone: `FormGrid` and the rest of Declare's gaps (DECISIONS 242: the form grid, a segmented control's `fullWidth`, `required`, `invalid` and its tab stop on the chosen value, a `Switch` description, `TextButton` keeping focus and underlining a `Reserve`), the held top's re-measure on a window resize, and the scrim closing a form only while nothing has been entered (the skill's scrim closes it). React's alone too: `LoadingShape` and its parts (DECISIONS 258; the skill's loading shape is a follow-up batch). React's alone too: `Composer`, `Mention` and `MentionPicker` (cimip-gaps-2, B3; see [Writing to someone](#writing-to-someone-the-composer-the-mention-and-the-picker)). So are the conversation stream's parts (`Stream` and its entries, `StreamQuote`, the arrived mark, `DisclosureRow`, `ActivityList` and `Presence`; round 56, a follow-up batch). Whether the skill gets the links and the charts is not decided. ## Logs, status and forms @@ -2334,6 +2396,9 @@ read this from compatibility data and did not check it in Safari with the settin ## How these were decided +The conversation stream (messages, notes, quotes, the entry you came to, the disclosure row, the activity list and presence) was decided and built by Opus on the +no-council path (DECISIONS 226 and 265), with no council vote; its implementation is reviewed by Astra, and the owner sees round 56's pictures before merge. + Loading in the page's own shape (`LoadingShape` and its parts) was decided by Opus and approved by the owner (DECISIONS 247, 248, 249b and 258), with no council vote; its implementation is reviewed by Astra. diff --git a/docs/motion.md b/docs/motion.md index 66845a4c..64c14b9f 100644 --- a/docs/motion.md +++ b/docs/motion.md @@ -217,6 +217,8 @@ Pass `label` when the spinner is the status (`role="status"`). Omit it when a wo | Toast | Enters on `duration-slow` and `ease-out`, leaves at 0.75 on `ease-in`. Running work shows braille in the mark seat and updates the same toast in place to its result: the title never moves, because the seat is kept. Swipe is Base UI's 40px, by distance alone, with no spring. | Opacity only, at the resting offsets | | Toast drain | A countdown, not a loop, so the hold does not stop it. A 1px line, drawn on the straight part of the bottom rim, shrinks for the timeout (only a toast that is not the only copy of what it says has one). Hover, focus, a blurred window and a hidden tab pause it and the toast's own clock together. No glow. | The line is not drawn | | `CommandMenu` | cmdk filters and selects. It loads the first time the menu opens, so an app that never opens one does not download it. No open or close animation. | No extra motion | +| `DisclosureRow` | The chevron morphs from right to down (a rotation group) over `slow`; the detail opens by height over `slow` on `ease-out` and closes at 0.75 on `ease-in`. Hover lifts the ink over `fast`, in at once. | The detail is there at once; the chevron swaps | +| The entry you came to (`arrived`) | Its plate (or a panel's wash) and its word come at once, and go over 0.75 of `slow` on `ease-in` when the reader acts. Nothing moves: the plate is behind the entry and the word's room is kept. | The same fade (colour and opacity only) | | `LivePreview` | The draft is shown in a panel before Save commits it. | The preview text changes in place | `SharedElement` was withdrawn from the public API by the panel: nothing in Basalt needs an element to keep its identity across places. It remains as an internal module. diff --git a/packages/react/README.md b/packages/react/README.md index 39a1a504..8c54a7c0 100644 --- a/packages/react/README.md +++ b/packages/react/README.md @@ -422,6 +422,52 @@ const { shortcuts, keyshortcuts } = useShortcuts([{ key: "j", description: "Next - The formatters draw nothing: `formatStamp` ("14:49:07", to the second and always 24-hour), `formatClock` ("2:49 PM" in `en-US`, "14:49" in `en-GB`: a clock a person reads follows the locale, with a numeric hour), `formatDay` ("Nov 1"), `formatCountdown` ("18d 09:10:51", `null` once passed) and `formatAge`, each with its machine `dateTime` (ISO), the zone an argument and the `locale` too (default `en-US`, never the runtime's, so a server's render and the browser's agree). `Clock`, `Stat`, `SourceStamp`, `SourceStateWords` and `CommandBlock` take `locale` as well, and `EventLog` for the width its time column reserves. - `SourceStamp`'s name and time are the app's: Basalt ships no source's icon or name. +## The conversation stream + +A support thread, a team chat, a document's comments, an assistant's answer, a build's history: one column of entries, oldest first (the +no-council path, DECISIONS 226 and 265; `docs/foundations.md`, "The conversation stream"). Basalt draws; the app owns the data, what joins, +the words, and following the end. + +```tsx +import { ActivityList, ActivityStep, DisclosureRow, EventLogRule, Presence, Stream, StreamArrivedWord, StreamEntry, StreamMessage, StreamNote, StreamQuote } from "@srasyndicate/basalt"; + + + Today + } time="4:13 PM">Assigned to Ada Brooks + Exporting invoices gives me an empty file. + Since yesterday. {/* the app decides what joins */} + } + arrived={openedFrom === "notice"} arrivedLabel="From your notice" onArrivedEnd={clearArrival}> + Why is my export empty? +

Which date range did you choose?

+
+ {/* a panel: its own fill takes the wash; the app puts the word in its head */} + Suggested edit… + +
+ +} title="Searched the help center" meta="0.8 s">…the detail… + + + Installed 214 packages + }>3 of 412 unit tests failed + Building the web app + +``` + +| Export | What it does | +|---|---| +| `Stream` | The ordered list (`label`). Not a live region, and it does not follow its end: follow the end only while the reader is at it, and say what must be heard through `StatusLine`. | +| `StreamMessage` | `author`, `time` (the app's words), `dateTime`, `avatar` (default an `Avatar` at 32, hidden from assistive technology), `joined` (no avatar or head drawn; the name and time are said), `meta` (after the time), `actions` (end of the head), `children`. | +| `StreamNote` | A quieter row: a sentence in secondary at 13, `time`, and an optional `mark` (an icon at 16) in the gutter. | +| `StreamQuote` | The other side of an exchange: `cite` (the app's words: "Dana asked", "Replying to Sam"), `time`, the words. A fill one step from its ground, no rim. | +| `StreamEntry`, `StreamBlock` | An entry of the app's own (a card, an update; `bleed` to span the gutter) and a part of a message that can be the one arrived on its own (its message's head says the block's word; in a joined message the block draws it above itself). `panel` when it holds a panel. | +| `arrived`, `arrivedLabel`, `onArrivedEnd` | On every entry and block: scrolled to, focused (no ring), a plate in the selected wash and a word ("Linked" by default) until the reader presses or types (keys that scroll don't count); then it fades and nothing moves. One entry at a time: a new arrival ends the one before (calling its `onArrivedEnd`). An entry in a hidden pane waits until it is shown. Nothing happens inside a `LoadingShape`. | +| `StreamArrivedWord` | The word, for a panel entry's own head. | +| `DisclosureRow` | One line that opens to its detail: `title`, `mark`, `meta`, `wrap`, `open`/`defaultOpen`/`onOpenChange`, `hiddenUntilFound`. Base UI's Collapsible. | +| `ActivityList`, `ActivityStep` | A sentence a step: `status` (`running`, `done`, `failed`, `waiting`), `word`, `meta`, `detail` (then the step is a disclosure row). | +| `Presence`, `Elapsed`, `formatElapsed` | "Away 6 min": `status` (`active`, `away`, `offline`), `label`, `since`, `now`, `format`, `variant` (`plain` or `outline`). `Elapsed` is the length alone after any word; `formatElapsed` writes it (plain, safe on a server). | + ## Writing to someone The composer, the mention and the mention picker (cimip-gaps-2, B3; decided and built by Opus on the no-council path, not yet reviewed). See foundations, "Writing to diff --git a/packages/react/src/activity-list.tsx b/packages/react/src/activity-list.tsx new file mode 100644 index 00000000..5777158e --- /dev/null +++ b/packages/react/src/activity-list.tsx @@ -0,0 +1,75 @@ +import * as React from "react"; + +import { DisclosureRow } from "./disclosure-row"; +import { Spinner } from "./spinner"; +import { join } from "./utils"; + +// ---- The activity list ---- +// Steps that run and report, a sentence each: what a build, an import, a sync or an agent did. Not `Stepper` (a known sequence), not `EventLog` +// (links in mono with a time column) and not `LogLine` (a log's mono fields): a step is a sentence in the interface font, and it wraps, so it is +// read whole at any width. Each step has the status seat a plain `Badge` has (6px, the gap as wide): braille while it runs, the tertiary dot once +// done, the danger dot when it failed and the hollow ring while it waits. A failed or waiting step says so in a word at 500 in primary ink before +// its sentence (as a refused command's word does); a running or done step's word is said, not drawn. The running step's sentence is primary and +// the rest secondary: ink, never colour, marks where the work is. A step with `detail` is a disclosure row that opens to it. + +export type ActivityStatus = "running" | "done" | "failed" | "waiting"; + +const WORD: Record = { running: "Running", done: "Done", failed: "Failed", waiting: "Waiting" }; +const SHOWN: Record = { running: false, done: false, failed: true, waiting: true }; + +export interface ActivityListProps extends Omit, "children"> { + /** Names the list, when no heading does. */ + label?: string; + children: React.ReactNode; +} + +/** The steps, in the order they ran. An ordered list; it is not a live region (say a finished run through `StatusLine` if the reader must hear it). */ +export function ActivityList({ label, className, children, ...props }: ActivityListProps) { + return
    {children}
; +} + +export interface ActivityStepProps extends Omit, "children"> { + status: ActivityStatus; + /** The sentence: what the step did, or is doing ("Installed 214 packages", "Reading the deploy log"). */ + children: React.ReactNode; + /** + * The status word. A failed or waiting step draws it before the sentence ("Failed", "Waiting" by default); a running or done step only says it + * ("Running", "Done"), unless the app gives one here, which is then drawn ("Skipped"). + */ + word?: string; + /** A short fact at the end of the line, in tertiary: how long it took ("1.2 s"), a count. */ + meta?: React.ReactNode; + /** What the step opens to (its log, its input and output). The step is then a disclosure row. */ + detail?: React.ReactNode; + open?: boolean; + defaultOpen?: boolean; + onOpenChange?: (open: boolean) => void; +} + +/** One step. See the module note. */ +export function ActivityStep({ status, children, word, meta, detail, open, defaultOpen, onOpenChange, className, ...props }: ActivityStepProps) { + const said = word ?? WORD[status]; + const shown = word !== undefined || SHOWN[status]; + const seat = }> + + Read 1,240 rows from contacts.csv + Matched 1,180 rows to people already in the address book by email + 12 rows with no email or phone + Adding 48 new people + + + + ); +} + +// ---- The entry you came to ---- + +function ArrivedSupport({ gone, on = true }: { gone: boolean; on?: boolean }) { + const [arrived, setArrived] = React.useState(on); + React.useEffect(() => { + if (!gone) return undefined; + // The reader acts: a press anywhere ends the mark, which fades out. + const timer = window.setTimeout(() => document.body.dispatchEvent(new PointerEvent("pointerdown", { bubbles: true })), 50); + return () => window.clearTimeout(timer); + }, [gone]); + return ( + + +

Exporting invoices as CSV gives me an empty file since yesterday.

+
+ setArrived(false)}> +

Thanks, Jules. Engineering found it: the first part of a split export was empty. It is fixed for new exports.

+
+ +

Confirmed, October exports whole now.

+
+
+ ); +} + +function ArrivedBlock() { + return ( + + +

Exports over 5,000 rows are written in parts.

+
+ +

The status page lists one open issue.

+

The first part of a split export is empty until the fix ships.

+
+
+ ); +} + +function ArrivedDoc({ arrived }: { arrived: boolean }) { + return ( + + +

Should the pricing table come before the plan names?

+
+ + + +
+ Suggested edit + +
+
+ + Mina Sato suggests moving “Plan limits” above “Pricing” in section 2. +
+
+
+
+ Theo Park resolved 2 comments +
+ ); +} + +// ---- Presence ---- + +const PEOPLE: { name: string; status: "active" | "away" | "offline"; since?: number }[] = [ + { name: "Mina Sato", status: "active" }, + { name: "Rosa Lind", status: "away", since: min(6) }, + { name: "Theo Park", status: "away", since: min(65) }, + { name: "Ada Brooks", status: "offline", since: min(60 * 24 * 3) }, +]; + +function TeamList() { + return ( +
    + {PEOPLE.map((person) => ( +
  • + {person.name} + +
  • + ))} +
+ ); +} + +function SupportDesk() { + return ( +
+
+ Ada Brooks, your support contact + +
+
+ Billing queue + +
+
+ ); +} + +// ---- LoadingShape on the stream ---- + +interface Msg { author: string; time: string; text: string } +interface Thread { title: string; messages: Msg[] } +const THREAD: Thread = { + title: "Can't export my invoices", + messages: [ + { author: "Jules Ferreira", time: "4:12 PM", text: "Exporting invoices as CSV gives me an empty file since yesterday." }, + { author: "Ada Brooks", time: "4:20 PM", text: "Thanks, Jules. Which date range did you choose, and is it the same for every client?" }, + { author: "Jules Ferreira", time: "4:31 PM", text: "October 1 to 31, and yes, every client." }, + ], +}; +const CHAT: Thread = { + title: "Design review", + messages: [ + { author: "Theo Park", time: "9:04 AM", text: "The new onboarding screens are in the shared file, on page 3." }, + { author: "Mina Sato", time: "9:11 AM", text: "The second screen reads better with the button at the bottom." }, + { author: "Rosa Lind", time: "9:20 AM", text: "Agreed. I will leave notes in the file after my workshop." }, + ], +}; +/** Stand-ins: other words, another hour and one more message in the unseen variant, so every value and the count differ. */ +const standInThread = (variant: StandInVariant, n: number): Thread => ({ + title: standIn(1, 24, variant), + messages: Array.from({ length: n + variant }, (_, i) => ({ author: standIn(10 + i, 11, variant), time: variant === 0 ? `${i + 1}:0${i} AM` : `1${i}:4${i} PM`, text: standIn(20 + i, 60 + (i % 2) * 24, variant) })), +}); + +function ThreadView({ thread, label }: { thread: Thread; label: string }) { + return ( + + {thread.messages.map((m, i) => ( +

{m.text}

+ ))} +
+ ); +} + +function Loading({ state }: { state: string }) { + const kind = kindOf(state); + const loading = kind !== "default"; + const full = kind === "full"; + const region = (thread: Thread, label: string) => ( + } : { prefill: (variant: StandInVariant) => })} + > + {() => } + + ); + return ( +
+
{caption("Support inbox", THREAD.title)}{region(THREAD, "Ticket 4821")}
+
{caption("Team chat", CHAT.title)}{region(CHAT, "Design review channel")}
+
+ ); +} + +const pair = (a: [string, string, React.ReactNode], b: [string, string, React.ReactNode]) => ( +
+
{caption(a[0], a[1])}{a[2]}
+
{caption(b[0], b[1])}{b[2]}
+
+); + +const MEDIA = ["forced-colours", "reduced-motion"]; +const SHOT = { widths: [1440, 390], scales: [2], bleed: true, touch: true }; +const PROCESS = "Decided and built by Opus on the no-council path (DECISIONS 226 and 265); Astra reviews the code and the lead the pixels; the owner sees these pictures before merge. React's alone for now: the HTML skill has no stream module (a follow-up batch)."; + +export const ROUND_58: Round = { + id: "58", + title: "The conversation stream: messages, notes, quotes, the entry you came to, disclosure rows, activity lists and presence (cimip-gaps-2, B2)", + reviewed: false, + summary: + "Parts any app can draw a stream with: a support thread, a team chat, a document's comments, an assistant's answer, a build's steps. StreamMessage (an avatar, a name, a time and the words; consecutive messages joined), StreamNote (a quieter row), StreamQuote (the other side of an exchange, a fill with no rim), the entry a link opened (arrived: a plate in the selected wash and a word, never a frame round a panel), DisclosureRow (one line that opens to its detail), ActivityList (a sentence a step, wrapping) and Presence (“Away 6 min”). Each in two unlike domains, both themes, 1440 and 390, forced colours and reduced motion, and the stream under LoadingShape. " + PROCESS, + steps: [ + { + id: "messages", + name: "Messages, notes and joined runs", + intro: "A team's chat and a support thread. A new author's message has the avatar, the name and the time; the next from the same author joins it with neither. A note (“Mina Sato joined”, “Assigned to Ada Brooks”) is a quieter row in the text column, with an icon in the gutter when it has one.", + decisions: [ + "The gutter is the avatar's 32, then space-3, then the text column. The name is 14 at 500 in primary and the time 12 in tertiary, on one baseline; meta (a Presence, a badge) follows the time; actions sit at the end of the head.", + "The words are 14/20 in primary (text-base: body in apps). A new author starts space-4 below the last entry, a joined message space-1, a note under a note space-2.", + "The app decides what joins (`joined`): the author, the minutes between, an edit are its rules, not Basalt's. A joined message says its name and time to a screen reader before its words, and draws neither.", + "A note is 13/18 in secondary with its time after it; its mark is an icon at 16, centred in the gutter. `EventLogRule` is the day rule in a stream as in an event log.", + "The stream is an ordered list, not a live region, and does not follow its end: the app follows the end only while the reader is at it (as Terminal does) and says what must be heard through StatusLine.", + ], + tryIt: ["Read the support thread with a screen reader: the joined message reads “Jules Ferreira, 4:32 PM: A single week works.”"], + states: MEDIA, + ...SHOT, + height: 900, + demo: () => pair(["Team chat", "Design review", ], ["Support inbox", "Ticket 4821: Can't export my invoices", ]), + }, + { + id: "quote", + name: "The other side of an exchange", + intro: "What a person asked a help assistant, inside the assistant's answer; and the comment a reply answers, in a document's comments. The quote is a fill with no rim, so the turn it sits in keeps the only frame.", + decisions: [ + "A fill one step from its ground: in dark the level above what it sits in (#0a0a0a on the page, #111111 in a card), in light the sunken band's grey (#f0f0f0), because light's levels 1 to 3 are one white. Radius 8, as a callout's; space-2 by space-3 inside.", + "No rim, no bar, no indent rule: a rim would be a second frame inside a turn that may already be in a panel, and a vertical bar is never used (the owner's rule).", + "The words above say whose it is (“Jules Ferreira asked”, “Replying to Theo Park”), in tertiary at 12 with the time; the fill never carries that alone. They are the app's words.", + "A figure with a figcaption and a blockquote, so it is read as a quotation with its source.", + ], + tryIt: ["Compare the two themes: the quote reads as set apart in both, and its text holds 4.5:1 on the fill (the contrast tests cover every text role on sunken-strong and every level)."], + states: MEDIA.slice(0, 1), + ...SHOT, + height: 700, + demo: () => pair(["Help desk", "An assistant's answer", ], ["Shared document", "Comments on section 2", ]), + }, + { + id: "disclosure", + name: "Disclosure rows", + intro: "One line that opens to show its detail: a research assistant's searches and reads inside its message, and a build's log. Lighter than Accordion: no heading, no divider, no wash.", + decisions: [ + "A button (aria-expanded, aria-controls) on Base UI's Collapsible: an optional mark in a 16 seat, the line at 13 in secondary, an optional meta in tertiary, and the core chevron at the end, which morphs from right to down (a rotation group). In right-to-left it points left while closed.", + "Closed, the line is cut with an ellipsis; open, it wraps, so the whole line is read in place. `wrap` keeps it wrapped while closed (an activity step's sentence).", + "Hover lifts the ink to primary (and the meta to secondary); there is no wash, as on a ruled list on the page. Focus is the control ring at +2, radius 6. 28 tall, 44 on touch.", + "The detail opens by height over duration-slow on ease-out and closes at 0.75 on ease-in; under reduced motion it is there at once. The clip reaches space-1-5 past the detail so a ring inside it is whole.", + ], + tryIt: ["Open and close a row with Enter and Space: the chevron morphs, the line wraps open.", "Narrow the window: a closed line is cut, an open one wraps."], + states: ["open", ...MEDIA], + ...SHOT, + height: 720, + demo: ({ state }) => { + const open = state.startsWith("open") || state !== "default"; + return pair(["Research assistant", "Its searches and reads", ], ["Build pipeline", "The log, a row a step", ]); + }, + }, + { + id: "activity", + name: "Activity lists", + intro: "Steps that run and report, a sentence each, wrapping at any width: a build's steps, and a contacts import inside its message. A step with detail is a disclosure row.", + decisions: [ + "Not Stepper (a known sequence), not EventLog (links in mono with a time column, one tab stop) and not LogLine (a log's mono fields): a step is a sentence in the interface font, at 13/18, and wraps.", + "The plain badge's status seat (6, and a gap as wide): braille while it runs, the tertiary dot once done, the danger dot when it failed, the hollow ring while it waits. The status is in words too: a failed or waiting step draws “Failed” or “Waiting” at 500 in primary before its sentence (as a refused command's word is); a running or done step's word is said, not drawn; an app may draw its own (“Skipped”).", + "Ink marks where the work is: the running, failed and waiting sentences are primary and done ones secondary. Colour is only the danger dot, beside the word.", + "Every step keeps the chevron's seat when any step has detail, so the metas line up. It is not a live region: an app says a finished run through StatusLine.", + ], + tryIt: ["Open the failed step: its log opens under the sentence, indented to the sentence."], + states: ["open", ...MEDIA], + ...SHOT, + height: 720, + demo: ({ state }) => pair(["Build pipeline", "Build 1287", ], ["Contacts", "An import, inside its message", ]), + }, + { + id: "arrived", + name: "The entry you came to", + intro: "A support reply opened from a notice, and a suggested edit opened from a link in a document's comments. The entry is scrolled to, focused and marked until the reader acts.", + decisions: [ + "The mark is the selected wash on the entry's own ground, and a word. A message or a note takes a plate (one solid fill per level, the choice card's recipe), radius 8, reaching space-2 past it at the sides and space-1 above and below, behind its content, so nothing in it moves.", + "A panel (a card, a callout) is never framed from outside: its own fill takes the wash, inside its one rim, and the app puts StreamArrivedWord in its head. No outer frame, no outline, no bar.", + "The word says it, so the fill never carries it alone: “Linked” by default, or the app's (“From your notice”, “Search result”), in secondary at 12 in the head. Tertiary words on the wash step up to secondary. A joined message that arrives draws its head, and keeps it.", + "It lasts until the reader acts: a press, or a key that does not scroll (arrows, Page Up and Down, Home, End and Space read around it). Then it fades over 0.75 of duration-slow on ease-in, and the word's room is kept, so nothing moves. It comes at once.", + "Focus moves to the entry (tabindex -1) with no ring, as a page's title does after a route change: it is a place, not a control. Short entries scroll to the middle of what scrolls them; one taller than most of that (a pane's height, or the window's) to its top. An entry in a hidden pane waits until it has a box, then is placed once.", + "One entry arrives at a time: placing another ends the one before, with its onArrivedEnd. A block inside a message says its own word in the message's head; in a joined message, which has no head, it draws the word above itself.", + "Forced colours: the fill drops and the word stays. Reduced motion: the same fade, which is opacity and colour only.", + ], + tryIt: ["Press anywhere: the plate and the word fade, and nothing moves.", "Press an arrow key first: the mark stays."], + states: ["gone", "panel", "panel-forced-colours", "block", "block-forced-colours", ...MEDIA], + ...SHOT, + height: 720, + // One entry arrives at a time, page-wide, so each state opens one: the support reply, the document's card, or a block in a joined message. + demo: ({ state }) => state.startsWith("block") + ? pair(["Research assistant", "A search result inside a joined message", ], ["Shared document", "Not opened from a link", ]) + : state.startsWith("panel") + ? pair(["Support inbox", "Not opened from a notice", ], ["Shared document", "Opened from a link", ]) + : pair(["Support inbox", "Opened from a notice", ], ["Shared document", "Not opened from a link", ]), + }, + { + id: "presence", + name: "Presence with a duration", + intro: "“Away 6 min” beside a name in a team list, and a support contact's state in a badge.", + decisions: [ + "Presence is a Badge: the success dot while active, the hollow ring while away, the tertiary dot while offline, and always the state's word (“Active”, “Away”, “Offline”, or the app's: “Back soon”, “Staffed”). Plain beside a name, or in its outline.", + "With `since`, the length follows the word in its ink: nothing under a minute, then “6 min”, “1 hr 5 min”, “3 days”. It is a duration (how long a state that is still true has lasted, like a countdown the other way), not a relative age, so it needs no date beside it.", + "It ticks by the minute on the one shared timer, holds under data-loops=“held”, is no live region and is not stopped by reduced motion. `Elapsed` and `formatElapsed` are the parts for any other word with a length (“Running 12 min”). Another language passes its own formatter.", + ], + tryIt: ["Pause animations: the minutes hold, and catch up when released."], + states: MEDIA.slice(0, 1), + ...SHOT, + height: 520, + demo: () => pair(["Team chat", "Who is here", ], ["Support portal", "Your contact", ]), + }, + { + id: "loading", + name: "LoadingShape on the stream", + intro: "The two threads under LoadingShape: the full shape (nothing known) and the prefill (the title known, the messages not). Avatars are bones in their discs, names, times and words are bars, as long as their words.", + decisions: [ + "Nothing in the stream's parts is drawn by hand for loading: the shape is the stream itself with stand-ins, painted as bones measured from the drawing.", + "An arrived entry does nothing in a shape or its twin (no scroll, no focus, no mark): it scrolls and focuses once the content takes the shape's place.", + "Presence's minutes and an activity step's braille are drawn like any mark: a bone in its box.", + ], + tryIt: ["Compare full and prefill: both are the same structure, the stand-ins differ."], + states: ["full", "prefill", "prefill-forced-colours", "prefill-reduced-motion"], + ...SHOT, + height: 640, + demo: ({ state }) => , + }, + ], +}; diff --git a/tools/review/rounds.tsx b/tools/review/rounds.tsx index 3c06f655..8751b739 100644 --- a/tools/review/rounds.tsx +++ b/tools/review/rounds.tsx @@ -123,6 +123,7 @@ import { ROUND_54 } from "./round54"; import { ROUND_55 } from "./round55"; import { ROUND_56 } from "./round56"; import { ROUND_57 } from "./round57"; +import { ROUND_58 } from "./round58"; export interface Step { id: string; @@ -685,3 +686,4 @@ ROUNDS.push(ROUND_54); ROUNDS.push(ROUND_55); ROUNDS.push(ROUND_56); ROUNDS.push(ROUND_57); +ROUNDS.push(ROUND_58);