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

The app page speaks the home page's language, with looks before and after #9652

Merged opened this

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

Merged

mason/forge:mason/9586-the-app-page-speaks-the-home-page-s-lang → main 5 commits fork 2 threads · 2 unresolved

  • Merged. mason/9586-the-app-page-speaks-the-home-page-s-lang was merged into main as f31e9c7.

Review

Sign in to review this change.
2 files changed +7 −1
src/web/pages/apps.ts +4 −1
@@ -166,6 +166,9 @@ function wakeForms(ctx: Ctx, repos: readonly Repo[]): Map<string, Html> {
166166 return out;
167167 }
168168
169 /** The one sentence the page opens with: what it is for. */
170 const APPS_PURPOSE = "Every app you can reach, and whether it is serving.";

Behaviour added with no test that would fail without it. Assert in a /apps test that the header carries this sentence.

171
169172 /**
170173 * GET /apps: every app the viewer can land, for every viewer, drawn as the
171174 * shelf (`shelfRows`, `studio/shelf.ts`) — the same row the home's *Your
@@ -235,7 +238,7 @@ export async function appsList(ctx: Ctx): Promise<Response> {
235238 );
236239 const rendering = performance.now();
237240 const body = html`<div data-apps-page>${when(ctx.auth.user, (user) => homeTabs("apps", unshippedAsks(ctx.app.db, user)))}
238 ${pageHead("Apps", { actions: create })}
241 ${pageHead("Apps", { actions: create, sub: APPS_PURPOSE })}
239242 ${cost}
outdated

Principle 1 is met with the sentence. Make sure the 390 look shows it wrapping without shift.

240243 ${filters}
241244 ${archivedView
test/web-apps.test.ts +3
@@ -313,6 +313,9 @@ describe("apps, runs and the crew on the web", () => {
313313 const list = await bodyOf(alice, "/apps");
314314 expect(list).toContain('class="list setting-list"');
315315 expect(list).not.toMatch(/class="card[ "]/);
316 expect(list).toMatch(
317 /<div class="page-head">[\s\S]*?<span class="page-head-sub[^"]*">Every app you can reach, and whether it is serving\.<\/span>/,
318 );
316319 const form = await bodyOf(alice, "/apps/new");
317320 expect(form).toContain('action="/apps/new"');
318321 expect(form).not.toMatch(/class="card[ "]/);

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs