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

A feed card wraps a long actor name and app name instead of widening the timeline #6680

Merged opened this

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

Merged

scout/forge:scout/6066-a-feed-card-wraps-a-long-actor-name-and → main 2 commits fork

  • Merged. scout/6066-a-feed-card-wraps-a-long-actor-name-and was merged into main as c1a5ef7.

Review

Sign in to review this change.
3 files changed +10 −3
src/web/studio/feed.ts +2 −2
@@ -111,9 +111,9 @@ export function feedCard(
111111 const steer = item.kind === "run" || item.kind === "cost";
112112 const target = steer && RUN_LINK.test(item.link) ? `${item.link}/steer` : null;
113113 const head = html`${avatar(item.actor ?? item.app)}
114 <strong>${item.actor ?? item.app}</strong
114 <strong class="break">${item.actor ?? item.app}</strong
115115 >${nameMark(item.actor === null ? undefined : marks.get(item.actor))}
116 <span class="muted small">${item.app} · ${timeAgo(item.at)}</span>
116 <span class="muted small break">${item.app} · ${timeAgo(item.at)}</span>
117117 ${settledBadge(item.settled)}
118118 <span class="spacer"></span>
119119 <span class="badge">${KIND_LABEL[item.kind]}</span>`;
test/feed-card-markup.test.ts +7
@@ -33,6 +33,13 @@ describe("feed card markup", () => {
3333 expect(out).toContain('class="small muted break"');
3434 });
3535
36 test("a long actor and app name carry break", () => {
37 const long = "a".repeat(120);
38 const out = feedCard(item({ actor: long, app: `alice/${long}` })).text;
39 expect(out).toContain(`<strong class="break">${long}</strong`);
40 expect(out).toContain(`<span class="muted small break">alice/${long} · `);
41 });
42
3643 test("a tell form posts to the app's own tell", () => {
3744 const out = feedCard(item({ kind: "pull", link: "/alice/notes/pulls/1" })).text;
3845 expect(out).toContain('action="/alice/notes/tell"');
test/home-walk.test.ts +1 −1
@@ -93,7 +93,7 @@ test("composer, timeline, a tell, a crew member's run and pull, a share, the app
9393 });
9494 const page = await home(alice);
9595 expect(page).toContain("Sorted the seed list");
96 expect(page).toMatch(/<strong>scribe<\/strong\s*>\s*<span[^>]*data-mark="crew"/);
96 expect(page).toMatch(/<strong class="break">scribe<\/strong\s*>\s*<span[^>]*data-mark="crew"/);
9797 expect(page).toContain("opened a pull request");
9898
9999 // A share reaches another person as a post that says who shared it.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs