Repository navigation
Phase 31 slice B: the desktop-app vocabulary - #246
Merged
Merged
Conversation
Phase 31 slice B. Eight primitives on the 24/32/40 ladder (link, text-input, nav-item, tabs, tree-row, menu-row, property-row, divider), a 24px button with an accessible name, inline text links and text titles. The new targets join the 24px census, identity dots never count as accents, and a canvas holding a desktop-app primitive must declare its type.
Verify round 1 on slice B. The census now uses each primitive's rendered height, a control owns its row only when it is the row's only target, and the layout walker steps through the property-row value slot. Tabs truncate in a narrow tablist, unknown icons and copy props are checked like the phone primitives, and disabled rows leave the tab order. Docs follow.
The 12% tint mix needed #RRGGBB, so an rgb() or hsl() accent on a dark palette got the light fallback. Slice B's open items move into the spec: the tablist and text-input coverage gaps become FR-C7's tabs clause and FR-C10, and the mobile 44px gap goes to the VISION backlog.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Slice B of Phase 31 (docs/specs/PHASE-31-SPEC.md, FR-B1 to FR-B10). It also ships three items slice A deferred to this slice: identity dots (FR-A6), the new primitives in the 24px target census, and the declaration clauses of the
desktop-app-artboardrule. The spec's "Slice B — as built" block records each decision the spec left open. There is no spec change.What changes
Eight desktop-app primitives on the 24, 32 and 40 pixel steps of the density ladder:
link: a standalone text action, at least 24 tall.text-input: a field. Its border is its only boundary; an error draws an icon and the message below the field.nav-item: a sidebar row. The active one shows a tint, a 2px bar and a heavier label. It also has a collapsed 32×32 rail form and an identity dot.tabs: one tablist with a line or contained variant. Each tab is its own target.tree-row: a row that indents 16px per level and shows a disclosure chevron.menu-row: a menu item with a right-aligned shortcut, a destructive form, a checked state and a submenu chevron.property-row: an inspector row with a label column and one value.divider: a 1px hairline.Labels truncate to one line with an ellipsis and keep their full text as a
title. Colors come from the design system's tokens, with neutral fallbacks when a canvas has none.buttongainssize: "xs"(24px) andariaLabel, the accessible name of an icon-only button. The name is never drawn.A
textnode gains inline links (links: [{ start, end }]character ranges, drawn underlined) and atitletooltip.The new primitives join the 24px floor on web and desktop-app canvases:
property-rowanddivider. Inline links are exempt, as WCAG exempts them.property-row,nav-item,menu-roworlist-rowis measured by the row's box.heightcan't produce a false pass or a false warning.Identity dots are not accents. A
nav-item'sdotColornever counts as a competing accent color. The same color used anywhere else still counts.A canvas holding a desktop-app primitive must declare its type. This applies to
nav-item,tabs,tree-row,menu-rowandproperty-row. Undeclared warns, declared mobile warns, and declared web gets an info.Control borders. Checkbox, radio, toggle and text-input boundaries use
$border-strongwhen the design system has that token. Canvases without it render exactly as before.Wiring: the new primitives are covered everywhere the phone primitives already were:
$accent-tintand$border-strongtokensbreadcrumbcomponent now uses alinkfor its parentDecisions worth a look
property-rowrenders children. The other seven primitives draw their own anatomy and drop any children, and the docs say so.linkortext-inputon a phone has no 44px check, since adding one would change the mobile ruleset.text-inputs toward "three input controls need an error state".Testing
New
test-desktop-primitives.ts(fast tier) covers:New
test-desktop-primitives-render.ts(Chrome tier) covers:test-pointer-targets.tsgains link, property-row and tabs cases in detailed mode.Verification: four verifiers checked the first build: spec conformance, mutation testing, a bug review and a docs audit. The confirmed findings are fixed:
Each mutation that mattered now has a test that kills it. A second-round verifier passed every fix, failing on the old code and passing on the new. Its one remaining finding was fixed after that round and proved the same way.
Suites:
npm run test:fastpasses, andnpm run test:fullpasses 123/123.Added after verification
accent-tinttoken, the active fill is the accent mixed 12% into the surface. That mix used to need#RRGGBB, so anrgb()orhsl()accent on a dark palette got the light#EFF4FF. It now reads#RGB,#RRGGBB(AA),rgb()andhsl(). A named color still gets the light fallback. New checks intest-desktop-primitives.tsfail on the old code.text-inputtoward form coverage becomes FR-C10, also in slice C. The missing 44px check forlinkandtext-inputon phones is a Phase 30 follow-up in VISION.md.npm run test:fullpasses 123/123 on 6d97d11.