Skip to content

5.3 Editor design system

Editor screens use shared tokens and components. The colours, themes and full component catalogue are in the GUI design guide. Paths below are relative to gui/web/src/.

Tokens

styles/tokens.css is the only place a raw value appears. A stylesheet that needs a colour, size, radius or font reads a token.

  • Surfaces: --surface-app behind everything, --surface-chrome for headers, sidebars and panels, --surface-control for inputs and buttons at rest, --surface-hover under the pointer. Borders are --border-hair (--border-subtle), and --border-strong on hover.
  • Ink: --text-heading for names and titles, --text-body for values and controls, --text-muted for labels, help and counts, --tempo-faint for disabled or empty values. --state-danger marks a problem.
  • Accent: gold marks the selection, the screen’s primary action and keyboard focus. A pressed view toggle uses the neutral --toggle-on-* tokens.
  • Type: a rule sets font from one of these roles.
RoleTokenUse
Title--text-title-fontthe page title in the header bar
Heading--text-heading-fonta section or group heading
Label--text-label-fonta compact heading in a panel, a row’s name
Small--text-small-fontrow labels, control text, list cells
Meta--text-meta-fonthelp lines, counts, units
Caps--text-caps-fontuppercase list-group labels, with --ls-caps
Code--text-code-fontcode snippets
  • Space: the --space-* steps. Panels pad 12 to 16 px, rows 2 to 10 px.
  • Radii: --radius-xs for tags and dots, --radius-sm for inputs, --radius-md for buttons and selects, --radius-lg for groups, cards and panels, --radius-xl for dialogs.
  • Heights: --header-h (56 px) for the top bar, --control-h for a control, --control-h-compact for a control in an inspector, --row-h for a list row, --setting-row-h for a row of a settings group.

Page shapes

styles/primitives.css holds the shapes screens share. A screen applies the class and adds only what differs.

The global base in tokens.css and every rule in primitives.css sit in the tempo-base and tempo-primitives cascade layers, declared in that order at the top of tokens.css. Screen stylesheets stay unlayered, so a screen’s override of a primitive wins whatever order the bundle puts the files in. Write new shared rules inside the layer and screen rules outside it. npm run build ends with scripts/check-css-layers.mjs, which fails when a primitive rule escapes its layer, a screen rule enters one, the layer order is missing, or App Settings’ narrow-dialog row override is not unlayered. styles/cssLayers.test.ts runs the same check on the source files.

  • .tempo-page-header: the bar across the top of every screen. Put EditorHeader inside it, with back, title, then the screen’s actions at the right and the primary action last.
  • .tempo-group: an outlined group of rows split by hairlines. App Settings builds every section this way through SettingsSection and SettingsRow. A list of links, such as where a command is used, takes the same outline.
  • .tempo-empty__title: the title of what a screen shows with nothing in it.
  • .tempo-section-label: the uppercase caps label over a group of fields.

Components

Use the shared component before writing a new control.

Check that numbers shown to users are short and round. The units module sets display precision: inches, speeds, accelerations and masses use at most two decimal places, meters and radians three, degrees one, and MOI three. Trim trailing zeros and limit readouts to six significant digits. Fields keep the full canonical value until a different value is entered. Retyping the displayed number must preserve storage. Changed values, including explicit unit suffixes, use five decimal places in canonical storage. If that changes the selected unit’s display, use the fewest additional decimal places that preserve it. Code, exports, sync payloads and copied snippets emit the stored value without further rounding. Planner outputs retain their computed precision. Store each quantity once in its canonical unit. Rotation targets, turn rates and arrival tolerances store radians. Legacy degree fields are consumed during document migration. Every writer and consumer, including canvas drags, history, code and planning, uses that value.

Tutorial targets use clean steps in the selected units. A goal accepts only an entry that displays as the instructed number at the field’s display precision. Both half-step boundaries are excluded, independent of trimmed zeros in the instruction. A visibly different entry must fail.

NeedUse
An actionButton: primary for the screen’s main action, ghost for quiet ones, danger to confirm a delete
An icon actionIconButton
Text or a numberField, NumberField, UnitLengthField
One of a few choicesSegmentedControl; ChoiceCards when each choice needs a sentence
One of many choicesSelect
A form checkboxToggle
A setting that applies at onceSwitch in a settings row
An explanationInfoHint beside the label it explains
Optional depthDisclosure; pass right to summarise what it holds while closed
A listOutlineRow rows in a listbox, AddButton to add
A side panel of settingsInspectorSection and InspectorRow
A dialogModal, with Tabs in its toolbar for several pages

Screen layout

Authoring screens put the list on the left, the work in the middle and the selected item’s settings in a resizable panel on the right at the inspector’s density (Paths, Autos, Poses). Library screens with no field, such as Commands & Sensors, give the middle to an overview list, one row per entry with the columns a reader needs to tell entries apart, and keep the same right-hand details panel. Settings use outlined groups. A screen states what its kind of item is in one line under the group heading, so a first-time user can read the screen without opening help.

esc

Loading search...