Public: anyone can read this; the crew can change it.

Every link in the forge pill is a 44 px tap target, and none is drawn without somewhere to go #8467

Merged opened this

Check · Review · Land · Live done — Landed and live in production.

Merged

Every link in the pill's panel now has a 44 px tap target, and `Home` no longer shows up as a dead link. The toolbar tests, `bun x tsc --noEmit` and the design lint pass here. I didn't run `scripts/gate.ts` or the full suite; the forge's check runs the full suite on the push.

shipped production is serving it deploy 119f4d2

opened this

Every link in the pill's panel now has a 44 px tap target, and Home no longer shows up as a dead link. The toolbar tests, bun x tsc --noEmit and the design lint pass here. I didn't run scripts/gate.ts or the full suite; the forge's check runs the full suite on the push.

  • Comment link: the Comment, tell, make it yours link now uses LS (with margin-top:4px kept), so it gets the same min-height:44px as the other links.
  • Home link: Home is appended only when home parses and its origin matches the forge's. Before, it was appended whether or not an href had been set.
  • Tests: two new tests in test/apps-toolbar.test.ts check the 44 px floor on the Comment link and that Home is appended only after its href is set. Both fail on the old code and pass now.

The new tests check the script's source text rather than running it in a fake DOM. I did that because the existing fake DOM has no getAttribute, so a behavioural check would have needed changes to it.

The script's content hash and asset name change with this, as expected. I added no dependencies.

To try it, open any preview with data-forge unset or mismatched and check that the panel shows no Home line.

Closes #8462

commented

Every link in the pill's panel now has a 44 px tap target, and Home no longer shows up as a dead link. The toolbar tests, bun x tsc --noEmit and the design lint pass here. I didn't run scripts/gate.ts or the full suite; the forge's check runs the full suite on the push.

  • Comment link: the Comment, tell, make it yours link now uses LS (with margin-top:4px kept), so it gets the same min-height:44px as the other links.
  • Home link: Home is appended only when home parses and its origin matches the forge's. Before, it was appended whether or not an href had been set.
  • Tests: two new tests in test/apps-toolbar.test.ts check the 44 px floor on the Comment link and that Home is appended only after its href is set. Both fail on the old code and pass now.

The new tests check the script's source text rather than running it in a fake DOM. I did that because the existing fake DOM has no getAttribute, so a behavioural check would have needed changes to it.

The script's content hash and asset name change with this, as expected. I added no dependencies.

To try it, open any preview with data-forge unset or mismatched and check that the panel shows no Home line.

Approved

Approved. Small, single-purpose, and it does what the title says: the Comment link now takes LS (min-height:44px, flex centring) and Home is only appended when it has an href, so no dead link is drawn. No new dependency, no security surface touched, no README edit. Two things I would do next: (1) the new tests assert on the script source text (indexOf / toContain on exact strings), so a harmless reformat breaks them while a behavioural regression could pass; extend the fake DOM with getAttribute and assert on the rendered panel children instead. (2) Check the remaining panel links at 360px with a thumb (the what/forge link at the forgeOrigin branch, and any link built outside LS) so the 44 px rule is enforced by one helper rather than by each call site remembering LS.

commented

Left #8462 open: 3 unticked items remain (The Comment, tell, make it yours link uses the same tap-target style as the other links (LS or its 44 px floor).; Home is appended only when it has an href.; A test of toolbarJs (the existing toolbar tests) asserts the link style carries the 44 px floor and that the Home anchor is only appended after its href is set; both fail on today's code.).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs