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

scout/forge:scout/4293-an-issue-change-or-comment-s-origin-link → main 3 commits fork 9 threads · 9 unresolved

  • Merged. scout/4293-an-issue-change-or-comment-s-origin-link was merged into main as 07f5942.

Review

Sign in to review this change.
6 files changed +115 −4
src/web/comments.ts +1 −1
@@ -46,7 +46,7 @@ export function commentCard(card: CommentCard): Html {
4646 card.originUrl != null && card.originUrl !== "",
4747 () => html`<span class="spacer"></span>
4848 <a
49 class="origin-link small"
49 class="bar muted small"
outdated

muted small drops the old inline-flex and 4px gap, so the icon sits flush against the text. Restore the spacing with an existing utility.

5050 href="${card.originUrl ?? ""}"
5151 rel="noreferrer noopener"
5252 >${icon("external")}view on origin</a
src/web/pages/browse.ts +1 −1
@@ -722,7 +722,7 @@ async function browseThread(
722722 ${when(
723723 detail.issue.originUrl,
724724 (url) =>
725 html`<a class="origin-link" href="${url}" rel="noreferrer noopener"
725 html`<a class="bar muted small" href="${url}" rel="noreferrer noopener"
726726 >${icon("external")}view on origin</a
727727 >`,
728728 )}
src/web/studio/change.ts +1 −1
@@ -214,7 +214,7 @@ export function changeHead(ctx: Ctx, repo: Repo, pull: Pull): Html {
214214 ${when(
215215 pull.originUrl,
216216 (url) =>
217 html`<a class="origin-link" href="${url}" rel="noreferrer noopener"
217 html`<a class="bar muted small" href="${url}" rel="noreferrer noopener"
218218 >${icon("external")}view on origin</a
219219 >`,
220220 )}
src/web/studio/tell.ts +1 −1
@@ -354,7 +354,7 @@ async function studioTell(
354354 ${when(
355355 issue.originUrl,
356356 (url) =>
357 html`<a class="origin-link" href="${url}" rel="noreferrer noopener"
357 html`<a class="bar muted small" href="${url}" rel="noreferrer noopener"
358358 >${icon("external")}view on origin</a
359359 >`,
360360 )}
test/web-origins.test.ts +5
@@ -378,6 +378,11 @@ describe("origins on the web", () => {
378378 const page = await (await asUser(alice, "/alice/widgets/issues/7")).text();
379379 expect(page).toContain("mona");
380380 expect(page).toContain("view on origin");
381 // §5's muted small text, not the retired .origin-link.
382 expect(page).not.toContain("origin-link");
383 expect(page).toMatch(
384 /<a class="bar muted small" href="[^"]+" rel="noreferrer noopener"/,
outdated

Only the issue page is asserted. Add the same not.toContain('origin-link') and anchor-shape check for an imported change and an imported comment.

385 );
381386 });
382387
383388 test("commenting on a mirrored issue goes through to the origin", async () => {

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs