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

An issue, change or comment's origin link draws §5's link and muted text, and .origin-link leaves the markup #4334

Merged opened this

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

Merged

The "view on origin" link on an issue, a change and a comment now uses §5's `muted` and `small` text classes, and `.origin-link` no longer appears in any rendered HTML. I changed only the markup. The `.origin-link` rule in `style/content.ts` and `docs/DESIGN.md` are untouched for part two.

shipped production is serving it deploy f5d5671

opened this

The "view on origin" link on an issue, a change and a comment now uses §5's muted and small text classes, and .origin-link no longer appears in any rendered HTML. I changed only the markup. The .origin-link rule in style/content.ts and docs/DESIGN.md are untouched for part two.

  • Markup: the link in src/web/pages/browse.ts, src/web/studio/tell.ts, src/web/studio/change.ts and src/web/comments.ts is now <a class="muted small" href=… rel="noreferrer noopener">. The icon, the words "view on origin" and the escaped href are as before. The comment's .spacer is unchanged.
  • Test: test/web-origins.test.ts already checked the imported-issue page for "view on origin". It now also asserts that origin-link is absent and that the anchor carries rel="noreferrer noopener". That test covers the issue page only; the change and comment variants have no new assertion.
  • What I left out: the old hover-to-accent colour and the flex alignment of the icon. The link now relies on the browser's default anchor styling, and I couldn't check how that looks since there's no browser here.
  • Checks: bun test test/design-lint.test.ts test/web-origins.test.ts and bun test test/web-browse.test.ts pass, and bun scripts/design-lint.ts is clean. I did not get a usable bun x tsc --noEmit result: it failed here with "Cannot find type definition file for 'bun'", so the forge's check will be the first real type check.

To try it, open an imported issue, such as /alice/widgets/issues/7 in that test's fixture, and look for the "view on origin" link.

Closes #4293

commented

The "view on origin" link on an issue, a change and a comment now uses §5's muted and small text classes, and .origin-link no longer appears in any rendered HTML. I changed only the markup. The .origin-link rule in style/content.ts and docs/DESIGN.md are untouched for part two.

  • Markup: the link in src/web/pages/browse.ts, src/web/studio/tell.ts, src/web/studio/change.ts and src/web/comments.ts is now <a class="muted small" href=… rel="noreferrer noopener">. The icon, the words "view on origin" and the escaped href are as before. The comment's .spacer is unchanged.
  • Test: test/web-origins.test.ts already checked the imported-issue page for "view on origin". It now also asserts that origin-link is absent and that the anchor carries rel="noreferrer noopener". That test covers the issue page only; the change and comment variants have no new assertion.
  • What I left out: the old hover-to-accent colour and the flex alignment of the icon. The link now relies on the browser's default anchor styling, and I couldn't check how that looks since there's no browser here.
  • Checks: bun test test/design-lint.test.ts test/web-origins.test.ts and bun test test/web-browse.test.ts pass, and bun scripts/design-lint.ts is clean. I did not get a usable bun x tsc --noEmit result: it failed here with "Cannot find type definition file for 'bun'", so the forge's check will be the first real type check.

To try it, open an imported issue, such as /alice/widgets/issues/7 in that test's fixture, and look for the "view on origin" link.

Changes requested — before the latest push

The markup change is right: four sites, same escaped href, rel kept, and I found no other .origin-link in rendered markup. The preview answers 200. One thing to fix first: the new assertion covers only the issue page, but the change (change.ts) and comment (comments.ts) variants changed too, and neither has a test that would fail if it went back to .origin-link. Add one assertion each in test/web-origins.test.ts, for an imported change head and for an imported comment card. Second, smaller: the retired rule gave the icon a 4px gap and inline-flex alignment, and .ico has neither, so the icon now touches 'view on origin'. Give the icon a gap with a §5 utility or wrap the link text, instead of leaving it to default anchor styling. Third, the dead .origin-link rule and its DESIGN.md entry are still there; that is fine if part two is filed and linked.

commented

The "view on origin" link is now drawn with §5's bar, muted and small classes on all four pages, and it has tests for the change head and the comment card. I ran test/web-origin-link.test.ts, test/web-origins.test.ts and bun scripts/design-lint.ts, which pass. tsc --noEmit still won't run in this sandbox (it can't find the bun types), so the forge's check will be the first real type check.

  • Icon gap: the anchor is now class="bar muted small". .bar is flex with align-items: center and gap: 8px, so the icon no longer touches the text. The old rule's gap was 4px; the 8px is .bar's own, and I didn't add a new rule for it.
  • Tests: the new test/web-origin-link.test.ts asserts that origin-link is absent, and that the anchor has the escaped href and rel="noreferrer noopener".

- Change head: it opens a real pull and sets its origin URL in the database. - Comment card: it renders commentCard directly with an origin URL.

  • Existing issue assertion: I updated it in test/web-origins.test.ts to expect the bar class.
  • Part two: the dead .origin-link rule and its docs/DESIGN.md entry stay, as this part specifies. I did not file part two myself.
Changes requested — before the latest push

The four 'view on origin' anchors are right: bar muted small, escaped href, rel kept, and two real tests (change head via a served pull, comment card rendered directly). The preview answers 200. But the diff also adds bar to seven elements that are not origin links, and that is the one thing to fix first. Revert those and keep only the four anchors.

What is wrong: bar is display:flex with a gap, so putting it on a text paragraph or a span with inline content changes how that text lays out. It is not the retired .origin-link's concern and the issue did not ask for it. The affected elements are browse.ts 'No labels.', change.ts the check note span, the 'Not ready to ship' paragraph and the 'Take it back' paragraph, and tell.ts the closing-pull note span, the standing-direction span and the wordInfo note span. Each of these now becomes a flex container whose text and inline children turn into separate flex items with 8px gaps. That is a visible layout change on phone widths, where wrapped sentences are laid out differently, and no test covers it. It also reads as a design-system departure: §5's bar is for rows of controls, not prose.

Smaller: the anchor in a flex container loses its inline wrapping, so check 'view on origin' on a 360px head line. Part two (removing the .origin-link rule and its DESIGN.md entry) stays as the pull says; open it as an issue so it is not lost.

commented

The "view on origin" link now uses bar muted small on the four origin anchors, and nothing else in the diff carries bar. git diff against the base is exactly those four lines (comments.ts, browse.ts, change.ts, tell.ts).

  • Revert: I had added bar to the seven prose elements with a blanket sed. They are back to muted small: 'No labels.', the check-note spans, 'Not ready to ship', 'Take it back', the closing-pull note, the standing-direction span and the wordInfo note.
  • Checks: test/web-origin-link.test.ts, test/web-origins.test.ts and test/web-browse.test.ts pass, and bun scripts/design-lint.ts is clean.
  • Wrapping at 360px: I couldn't check this, since there's no browser here. The change and issue anchors sit directly in .issue-meta, which is already a wrapping flex row, so the anchor was a flex item there before and after. The comment anchor sits in .card-head. I did not check that container's display, and I did not add a wrapping test.
  • Part two: I didn't open the follow-up issue for removing the .origin-link rule and its docs/DESIGN.md entry, because the instructions here say to do nothing beyond this pull. Someone needs to file it so the dead rule isn't lost.
Approved

Approved. All four origin anchors (issue, studio issue, change head, comment card) now draw bar muted small from existing tokens/components; .origin-link is gone from rendered markup, href stays escaped, rel kept, works with JS off. Tests cover the change head (real pull), the comment card and the issue page, and would fail on the old class. Two things next: (1) remove the now-dead .origin-link rule in src/web/style/content.ts and its entry in docs/DESIGN.md, and file that part-two issue since none exists; (2) the link loses the old hover-to-accent and underline-free look; check at 360px that the anchor wraps cleanly inside .card-head and .issue-meta and that the 8px bar gap is acceptable versus the old 4px.

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs