Skip to content

feat: spacing grid with a ratcheted gate (Feature #386) - #1164

Merged
grunion-ai merged 3 commits into
mainfrom
claude/spacing-grid-1795214409
Nov 21, 2026
Merged

grunion-ai merged 3 commits into
mainfrom
claude/spacing-grid-1795214409

Conversation

@grunion-ai

Copy link
Copy Markdown
Owner

Tracker: Feature #386 (https://weave.grunion.ai/w/weave/e/aef3d9ed-a3a3-4629-9744-034dda41781b), part of Issue #1864.

What changed

  • One spacing scale, 0, 2, 4, 8, 12, 16, 20, 24, 32, 40 and 48 px, as --wv-space-* tokens in the block at the top of public/style.css, plus --wv-nudge (1 px) for an offset that keeps a border, a chip or a line box on its line. DESIGN.md gains a Spacing section.
  • Every odd spacing value in style.css (206 values in 176 declarations) and chip.css (18) is gone. Gaps and horizontal insets round to the nearest step, vertical insets round down so no row grows, and 1 px offsets become --wv-nudge (39 uses in style.css, 8 in chip.css, which writes var(--wv-nudge, 1px) for applets and exports).
  • Rule 4: every grid cell (text, document, link, date, checkbox and chip) starts 12 px in, where its column header's label starts. Name was 4 px and Description 7 px in before. --wv-cell-text-x is the 8 px step less the dressed box's 1 px border.
  • Measured geometry stays put: rating icons keep their 1 px gap through the nudge, TOGGLE_METRICS reads the toggle's new 8 px gap, a focused cell still grows 4 px each way, the phone grip keeps its 13 px bleed, the tight New button stays a 28 px square, and a date column's floor and fit read the wider inset. Row heights and density tokens are untouched.

Gate

test/space-scale.test.mjs reads padding, margin, gap, inset, scroll-padding, scroll-margin and the --*pad*, --*gap*, --*inset* custom properties in public/*.css. It refuses odd pixel values and ratchets raw pixels off the scale in test/space-baseline.json; both counts may only fall.

Stylesheet Odd declarations before, after Raw px off the scale before, after
style.css 176, 0 632, 445
chip.css 17, 0 28, 10
status.css (status page, its own surface) 19, 19 39, 39

The 445 left are mostly 6, 10 and 14 px, which have no step; follow-up sweeps lower the baseline one surface at a time.

Tests

  • test/grid-cell-inset-browser.test.mjs failed on main at all three densities (the Name cell started 9.5 px in under a header at 4.5 px) and passes here.
  • Full unit inventory and 100+ browser suites targeted locally (grid, date, column, width, resize, header, chip, checkbox, cell, edge-collision, collision, touch, plus an earlier full browser sweep): green, except render-budget type-doc|phone, which fails the same way on main locally and runs on the trend lane.
  • Visual check at 1440 x 900: column headers and cell text line up at 12 px across Name, Description, Status, Severity, Due and Done.

Kyle Adriany added 3 commits November 20, 2026 17:48
Padding, margin, gap and inset sit on one scale, 0, 2, 4, 8, 12, 16,
20, 24, 32, 40 and 48 px, as --wv-space-* tokens in the block at the
top of public/style.css, with --wv-nudge for a 1 px offset that keeps a
border, a chip or a line box on its line. DESIGN.md gains a Spacing
section.

- Every odd spacing value in style.css (206) and chip.css (18) moves to
  the scale: gaps and horizontal insets round to the nearest step,
  vertical insets round down so no row grows, and 1 px offsets become
  --wv-nudge (39 in style.css, 8 in chip.css, which writes
  var(--wv-nudge, 1px) for applets and exports).
- Grid cells of every kind start their text 12 px in, where their
  column header's label starts: --wv-cell-text-x is 8 px less the
  dressed box's 1 px border, and the header label takes 8 px. Name and
  Description were 4 and 7 px in.
- test/space-scale.test.mjs refuses odd values and holds
  test/space-baseline.json: odd 0 in style.css and chip.css; raw pixels
  off the scale 445 in style.css (632 before) and 10 in chip.css (28).
  status.css keeps its own spacing (19 odd declarations, 39 off scale).
- test/grid-cell-inset-browser.test.mjs failed before the change at
  every density: the Name cell started 9.5 px in under a header at 4.5.

ponytail:
- The remaining off-scale values are mostly 6, 10 and 14 px, which have
  no step. Upgrade path: follow-up sweeps that move them onto 4, 8, 12
  or 16 and lower the baseline, one surface per PR.

Change-Id: Iaab4e4478718766bd982f079174cd169a31454ed
- Rating icons stay 1 px apart through --wv-nudge, the gap the column
  width is computed from.
- TOGGLE_METRICS reads the toggle's new 8 px gap.
- A focused grid cell still grows 4 px each way: its vertical pad is
  the 4 px step plus the nudge.
- The phone grip keeps its 13 px bleed through the 12 px step plus the
  nudge, so it spends no layout.
- Tile field rows take the 2 px half step, which keeps the phone
  pick's 44 px hit area clear of the row under it.
- The tight New button is a 28 px square with no padding.
- Suites that pinned 5, 7 and 3 px gaps read the 4 and 8 px steps.

No-changelog: changelog.d/spacing-grid-386.md on this branch covers Feature #386
Change-Id: Ic658a5c777bb664540f6648fdd3d30d7d6764dc6
- Date inputs and checkboxes in the grid start where their headers'
  labels start, 12 px in, like every other cell; the inset test now
  covers both.
- The date box's fit reads its own padding and border instead of a
  22 px constant, and a date column's floor adds 1 px, which WebKit's
  input text needs over the span that measures it at the wider inset.

No-changelog: changelog.d/spacing-grid-386.md on this branch covers Feature #386
Change-Id: Ib521ae3193ca50bd5a75ea035b0179a4608d9a8e
@grunion-ai
grunion-ai enabled auto-merge (squash) November 20, 2026 23:50
@grunion-ai
grunion-ai merged commit 6807180 into main Nov 21, 2026
17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant