Skip to content

Trail table row permalinks after cell text - #163

Closed
tony wants to merge 1 commit into
mainfrom
table-row-permalinks
Closed

tony wants to merge 1 commit into
mainfrom
table-row-permalinks

Conversation

@tony

@tony tony commented Oct 18, 2026

Copy link
Copy Markdown
Contributor

On a prose table such as the "Stable identity, not name or index" table on the Rust server, session, window and pane page, each row's permalink sat at the right edge of the first cell, a long way from the label it links. The first column's text also touched the table edge.

Rows now show the immediately after the first cell's last line of text, with a small gap, hidden until the row is hovered, focused or targeted, as the section behaves. Markdown table cells share one 0.75rem inline inset, first and last columns included.

What changed

  • site/src/styles/global.css: .row-anchor-link keeps its static position at the end of the cell's last line and leaves the flow, so it never widens the column or wraps onto its own line (a --expand-environment flag wrapped at 390px in an in-flow version). It uses the section permalink's theme colors and the row's :hover, :target and :focus-within reveal that .row-label-link already uses.
  • Typography zeroes the outer padding of the first and last column from the utilities layer. A rule on .prose table:not([class]) in that layer, the way the heading overrides do it, replaces it. Component tables carry a class and keep their own padding.
  • site/scripts/check-dev-sample.mjs: checkRowPermalinks, run by checkDevSample (--sample) and by the full check-dev.mjs flow. It loads the Rust, tmux and Ruby workspace CLI tables in light and dark at 1440, 768 and 390px and checks every anchored row:
    • the permalink starts 0.1em to 0.5em after the end of the text, on the last line box;
    • the first column's text has the same left inset as the other columns, and as its header;
    • the permalink is invisible at rest and appears on hover, focus and :target with at least 3:1 contrast against what is behind it.
  • CONTRIBUTING.md lists row permalinks among the browser checks.

Verification

  • The gate fails on origin/main CSS with the named failure on all three pages, for example row "Session" permalink starts 39.8px after its text (Rust and tmux) and row "--json" permalink starts 100.7px after its text (Ruby). With only the rule applied and the cell inset removed, it fails on first-column text sits 0.0px from the cell edge. It passes with this change, in Chromium, Firefox and WebKit.
  • The gate also passed on four additional pages (Rust transports, TypeScript queries, Python options-and-hooks, Rust batching-commands): 46 rows on seven pages in all.
  • pnpm run lint is clean. site/test/row-anchors.test.ts, prose-markdown.test.ts, declaration-body-spacing.test.ts and header-pickers.test.ts pass (100 passed, 4 skipped); two prose-markdown link tests hit vitest's 5s timeout while the host's load average was above 90 and pass with --testTimeout=120000.

Not run

  • node site/scripts/check-dev.mjs --sample did not get past its first step. checkPickerFilters times out on its 5s page.goto of /demo/widgets/pickers/ on this host (load average 50 to 110) before reaching the new check. That step does not touch this change, and it failed the same way with the origin/main stylesheet. The wiring is checked by node --check and by importing the module; the check itself ran against a static page that renders the same Markdown through rehypeRowAnchors with this branch's compiled stylesheet, and against the Rust page in a live dev server before it was stopped.
  • The runtime of the sample loop with the new check is unmeasured; the check adds two cold page compiles (Rust, Ruby) to the sample.
  • Style-parity and visual baselines need an assembled _site, which was not built. The visual baseline pages (API reference pages) contain no .prose tables.

why: A prose table row's permalink sat at its first cell's right edge,
far from the label it links, and appeared inconsistently with the
section permalink. Typography also zeroes the outer padding of the
first and last columns, so labels touched the table edge and the row's
hover background.

what:
- Keep the row permalink at the end of its first cell's last line, out
  of flow so it neither widens the column nor wraps onto its own line
- Hide it until the row is hovered, focused or targeted, with the
  section permalink's theme colors
- Give markdown table cells a 0.75rem inline inset, first and last
  columns included; component tables keep their own padding
- Add checkRowPermalinks to check-dev-sample.mjs and run it from the
  sample and full check-dev flows. Rust, tmux and Ruby tables at 1440,
  768 and 390 px in light and dark must put the permalink within 0.5em
  of the last text line, share one inset across columns, stay quiet at
  rest, and appear legibly on hover, focus and target
@tony

tony commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Folded into #157, which now carries every fix from the 2026-10-18 review on one branch so they share one CI run, preview and deploy. This commit is on that branch unchanged. Discussion and evidence stay here.

@tony tony closed this Oct 18, 2026
@tony

tony commented Oct 18, 2026

Copy link
Copy Markdown
Contributor Author

Correction: one line differs on #157. The check-dev.mjs import of check-native-layout.mjs there also brings in #162's alignment checks, so both changes import cleanly.

@tony
tony deployed to docs-preview October 18, 2026 12:47 — with GitHub Actions Active
@tony
tony deployed to docs-preview-cleanup October 18, 2026 13:23 — with GitHub Actions Active

This branch was successfully deployed

2 active deployments
docs-preview-cleanup — 5c43cdb3 Deployed Oct 18, 2026 by tony via cleanup #147
docs-preview — 5c43cdb3 Deployed Oct 18, 2026 by tony via publish-preview / publish #819
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