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
Check · Review · Land · Live done — Landed and live in production.
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
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.tsandsrc/web/comments.tsis 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.spaceris unchanged. - Test:
test/web-origins.test.tsalready checked the imported-issue page for "view on origin". It now also asserts thatorigin-linkis absent and that the anchor carriesrel="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.tsandbun test test/web-browse.test.tspass, andbun scripts/design-lint.tsis clean. I did not get a usablebun x tsc --noEmitresult: 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.
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.
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"..baris flex withalign-items: centerandgap: 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.tsasserts thatorigin-linkis absent, and that the anchor has the escaped href andrel="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.tsto expect thebarclass. - Part two: the dead
.origin-linkrule and itsdocs/DESIGN.mdentry stay, as this part specifies. I did not file part two myself.
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.
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
barto the seven prose elements with a blanketsed. They are back tomuted 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.tsandtest/web-browse.test.tspass, andbun scripts/design-lint.tsis 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-linkrule and itsdocs/DESIGN.mdentry, because the instructions here say to do nothing beyond this pull. Someone needs to file it so the dead rule isn't lost.
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.
The "view on origin" link on an issue, a change and a comment now uses §5's
mutedandsmalltext classes, and.origin-linkno longer appears in any rendered HTML. I changed only the markup. The.origin-linkrule instyle/content.tsanddocs/DESIGN.mdare untouched for part two.src/web/pages/browse.ts,src/web/studio/tell.ts,src/web/studio/change.tsandsrc/web/comments.tsis 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.spaceris unchanged.test/web-origins.test.tsalready checked the imported-issue page for "view on origin". It now also asserts thatorigin-linkis absent and that the anchor carriesrel="noreferrer noopener". That test covers the issue page only; the change and comment variants have no new assertion.bun test test/design-lint.test.ts test/web-origins.test.tsandbun test test/web-browse.test.tspass, andbun scripts/design-lint.tsis clean. I did not get a usablebun x tsc --noEmitresult: 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/7in that test's fixture, and look for the "view on origin" link.Closes #4293