Skip to content

v2.5.0

Choose a tag to compare

@vicmaster vicmaster released this 23 Nov 14:51
· 33 commits to master since this release
a039d8d

Install or upgrade with npx framesmith, or npm i -g framesmith.

An issue tracker built in framesmith as a desktop app: a sidebar with counted navigation and project dots, an issue list with tabs, status chips and assignees, and an issue detail pane with an inspector of property rows, a description, an activity feed and a comment box.

framesmith now knows when a screen is an application: a tool you work in, not a page you read. You declare it, build it from app pieces and overlays, give elements states, and it is judged as an app. The screen above is composed from those pieces. It scores 100 in fast and detailed mode in both themes, and its error, empty-list and loading states are designed too. (#244–#253)

This release also clears every follow-up the app work left open, and fixes how contrast is measured on translucent fills. (#243, #254–#260)

Declare an app

  • canvas_create({ type: "desktop-app" }) makes an application screen on the window-1440 profile (1440×900). canvas_set_type declares an existing canvas web, mobile or desktop-app.
  • The surface report on every evaluation names the type, the window and the rules it turned on and off. On a desktop-app canvas the web type-scale ratio is off, replaced by a dense type ladder.
  • generate_design_system now writes the state opacities (state), focus-ring and border-strong, on every type.

Built from app pieces

  • New node types: link, text-input, nav-item (with count and an identity dotColor that never counts as an accent), tabs, tree-row, menu-row, property-row and divider.
  • button gains a 24px xs size and ariaLabel for icon-only buttons. A text node can carry inline links ranges.
  • Six desktop-app structures, picked by apply_structure on an app canvas: split-workbench-app, list-detail-app, editor-inspector-app, browser-app, dashboard-app and settings-app. Two components join them: data-table-app and skeleton-table-app.
  • A frame with overflow: "auto" is a scrolling pane. canvas_stress reads it as scrolling and triples app rows and card grids.

Overlays

  • tooltip, popover, menu, modal, toast and drawer. Wherever you put one in the tree, it renders in one layer above all content, stacked by kind: popover and menu, then the modal's scrim, then modal and drawer, then toast, then tooltip. They are placed with x / y in root coordinates.
  • A modal and a drawer are panes of their own for the navigation and primary-button rules.
  • Overlay screens are state variants (menu-open, confirm-delete), listed by coverage but never demanded.

States as a property

  • state: "hover" | "focus" | "pressed" | "disabled" on button, link, text-input, nav-item, tree-row, menu-row, list-row and the four controls. Tabs, tab-bar and nav-bar items, modal actions and a toast's action take it too.
  • States draw from state tokens. Focus is a 2px ring at a 2px gap. A disabled element draws in the on-surface colour at the disabled opacities, and is skipped by the 24px rule and the primary count.

Judged as an app

On a desktop-app canvas, each finding names its rule:

  • desktop-app-target: a click target below 24px. Fast mode warns; detailed mode runs WCAG 2.5.8's spacing exception and errors if a neighbour sits inside the 24px circle.
  • desktop-app-handbuilt-target and desktop-app-icon-label: a frame shaped like a button, and an icon-only action with no name.
  • desktop-app-current: each navigation region (a pane, a modal, a drawer) has exactly one current item.
  • desktop-app-type-ladder, desktop-app-row-rhythm, desktop-app-truncation and desktop-app-primary-count.
  • desktop-app-overlay: one modal at a time, text-only tooltips, no large tables or sideways scrolling in a modal, overlays inside the window, nothing under a scrim.
  • desktop-app-focus-visible, desktop-app-state-contrast, desktop-app-disabled and desktop-app-boundary: focus rings, active bars and underlines, disabled looks, and control borders, checked for contrast in each theme the canvas ships, without being drawn.
  • desktop-app-artboard: a canvas that holds app pieces but never declared itself an app.

Also on web and mobile

  • Contrast composites translucent colours. A translucent fill or text colour is blended over what is behind it before the ratio is measured. A common selected-row tint used to be judged as solid paint, so light text on it was a false error. (#243)
  • Every click target is measured on web too, with the same 24px floor and spacing exception. Inline text links are exempt.
  • Repeated findings fold. Three or more warnings or infos with the same rule and message come back as one entry with nodeIds, count and every member's fix. Errors never fold, and canvas_autofix still sees one finding per node.
  • Rules see inside component instances. Contrast, spacing and cliché checks now read the expanded tree, as the renderer does. A finding inside an instance names the instance and carries innerNodeId. A disabled control inside a component now renders dimmed. (#256)
  • unknown-token. A $ref the merged tokens don't define, or one of the wrong kind (a colour in gap), is a warning. When exactly one defined name is close, canvas_autofix renames it. Copy props such as label and content are never resolved, so a price like "$49" stays copy. (#257)
  • Tints follow the palette. accent-tint, success-tint, warning-tint, danger-tint, neutral-tint and danger derive from the applied palette and the surface they sit on, so a light preset no longer keeps dark tints. (#257)
  • Navigation lists never read as data tables, on any type.
  • select draws $border-strong when the design system defines it, and its border is checked like a text field's. An active tree-row draws a bar the indicator check measures. canvas_stress widens sidebar and tab counts to 999+. (#258)
  • cornerRadius: "$md" reads the radius scale first. Under a preset that defines md in both spacing and radius, it used to render the spacing value. (#259)
  • On a phone, links, text fields and dialog buttons are held to 44px. text-input gains size: "lg" (44px), and modal and toast gain controlSize (the button sizes; "md" is 44). A centred modal with controlSize: "md" is now a valid phone dialog, and sheet stays the choice for a panel that rises from the bottom. A link with a numeric height is never narrower than it is tall. (#260)
  • Detailed canvas_evaluate lays out in the design system's own fonts, as screenshots do.

Upgrading

Verdicts on existing canvases can move. Each change below is deliberate:

  • New findings on web canvases. Every click target is now measured on web, including icon-only links at their glyph size. Controls inside component instances are checked for the first time.
  • A misspelt or wrong-kind $token is now a warning, so a canvas that carries one stops being READY until it is fixed. canvas_autofix fixes the unambiguous ones.
  • Tints change on canvases that still hold the old seeded values. Those values are treated as unset and derived from your palette. Because of this, the sha256r: version hash of such a canvas moves once.
  • Some renders change.
    • cornerRadius short names ($sm, $md, $lg) under the dark, light and material presets render the radius value now, which is smaller than the spacing value they rendered before.
    • An unset select border draws $border-strong where it is defined.
    • A link with a numeric height gets a min-width equal to its height.
  • On a phone canvas, a default link, text-input, modal or toast action is now a mobile-touch-target error. The fixes are height: 44, size: "lg" and controlSize: "md".
  • canvas_evaluate output folds repeated findings. Read nodeIds and fixes on a folded entry, not only nodeId.