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
Check · Review · Land · Live done — Landed and live in production.
mason/forge:mason/9586-the-app-page-speaks-the-home-page-s-lang → main 5 commits fork 2 threads · 2 unresolved
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> { | ||
| 166 | 166 | return out; |
| 167 | 167 | } |
| 168 | 168 | |
| 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."; | |
| 171 | ||
| 169 | 172 | /** |
| 170 | 173 | * GET /apps: every app the viewer can land, for every viewer, drawn as the |
| 171 | 174 | * shelf (`shelfRows`, `studio/shelf.ts`) — the same row the home's *Your |
| @@ -235,7 +238,7 @@ export async function appsList(ctx: Ctx): Promise<Response> { | ||
| 235 | 238 | ); |
| 236 | 239 | const rendering = performance.now(); |
| 237 | 240 | 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 })} | |
| 239 | 242 | ${cost} |
outdated
Principle 1 is met with the sentence. Make sure the 390 look shows it wrapping without shift. |
||
| 240 | 243 | ${filters} |
| 241 | 244 | ${archivedView |
test/web-apps.test.ts +3
| @@ -313,6 +313,9 @@ describe("apps, runs and the crew on the web", () => { | ||
| 313 | 313 | const list = await bodyOf(alice, "/apps"); |
| 314 | 314 | expect(list).toContain('class="list setting-list"'); |
| 315 | 315 | 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 | ); | |
| 316 | 319 | const form = await bodyOf(alice, "/apps/new"); |
| 317 | 320 | expect(form).toContain('action="/apps/new"'); |
| 318 | 321 | expect(form).not.toMatch(/class="card[ "]/); |
Behaviour added with no test that would fail without it. Assert in a /apps test that the header carries this sentence.