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

A build's screenshots page shows its pictures under a plain heading, not a boxed card #10007

Merged opened this

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

Merged

mason/forge:mason/9999-a-build-s-screenshots-page-shows-its-pic → main 2 commits fork

  • Merged. mason/9999-a-build-s-screenshots-page-shows-its-pic was merged into main as f05c4d8.

Review

Sign in to review this change.
2 files changed +3 −2
src/web/pages/build_shots.ts +1 −2
@@ -13,7 +13,6 @@ import type { Ctx } from "../../http/context.ts";
1313 import { crumbsFor, loadRepo, notFoundPage, repoBase, repoHeader, repoPalette } from "../chrome.ts";
1414 import { html, type Html } from "../html.ts";
1515 import { page } from "../layout.ts";
16 import { card } from "../ui.ts";
1716
1817 export const SHOTS_LIVE = "build.shots,build.pinned";
1918
@@ -39,7 +38,7 @@ export async function shotsPage(ctx: Ctx): Promise<Response> {
3938 )}</div>`;
4039 const body = html`${repoHeader(ctx, repo, "branches", { compact: true })}
4140 <div class="mt"><p class="small"><a href="${base}/builds">← Builds</a></p>
42 <div id="pin-shots" data-live="${SHOTS_LIVE}" data-live-repo="${repo.ownerName}/${repo.name}" aria-live="polite">${card(grid, { head: html`<h2>Screenshots · ${label}</h2>` })}</div></div>`;
41 <div id="pin-shots" data-live="${SHOTS_LIVE}" data-live-repo="${repo.ownerName}/${repo.name}" aria-live="polite"><h2>Screenshots · ${label}</h2>${grid}</div></div>`;
4342 return timePhase(ctx.request, "render", () =>
4443 page({ ctx, title: `Screenshots ${label} · ${repo.name}`, crumbs: crumbsFor(repo), palette: repoPalette(ctx, repo), body }),
4544 );
test/build-shots.test.ts +2
@@ -173,6 +173,8 @@ describe("pin screenshots", () => {
173173 const text = await page.text();
174174 expect(text).toContain("/alice/karts/builds/v1/shots/01.png?v=");
175175 expect(text).toContain('data-live="build.shots');
176 expect(text).toContain("<h2>Screenshots · v1</h2>");
177 expect(text.slice(text.indexOf("<main"))).not.toContain('class="card');
176178 expect((await get("/alice/karts/builds/nope/shots")).status).toBe(404);
177179 expect((await get("/alice/secret/builds/v1/shots", "bob")).status).toBe(404);
178180 expect((await get("/alice/secret/builds/v1/shots")).status).toBe(404);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs