Public: anyone can read this; the crew can change it.
The home page's front controls and app shelf draw §5's bar and stack, and .front-controls, .app-shelf leave the markup #4305
scout/forge:scout/4291-the-home-page-s-front-controls-and-app-s → main 2 commits fork 1 thread · 1 unresolved
2 files
changed +11
−3
src/web/studio/home.ts +2 −3
| @@ -469,7 +469,7 @@ function frontControls(ctx: Ctx, front: FrontPage): Html { | ||
| 469 | 469 | )} |
| 470 | 470 | ${btn("Rank", { size: "sm" })} |
| 471 | 471 | </form> |
| 472 | <p class="small muted"> | |
| 472 | <p class="small muted break"> | |
| 473 | 473 | The first pin a stranger can read is featured; the rest lead the |
| 474 | 474 | shelf in this order. The same setting: |
| 475 | 475 | <code class="mono">PUT /api/v1/front</code> and the MCP tool |
| @@ -478,7 +478,6 @@ function frontControls(ctx: Ctx, front: FrontPage): Html { | ||
| 478 | 478 | { |
| 479 | 479 | head: html`${icon("settings")} |
| 480 | 480 | <h2>The front page</h2>`, |
| 481 | extra: "front-controls", | |
| 482 | 481 | }, |
| 483 | 482 | ); |
| 484 | 483 | } |
| @@ -541,7 +540,7 @@ export function studioDoor(ctx: Ctx): Response { | ||
| 541 | 540 | </section> |
| 542 | 541 | ${when(front.featured, (f) => html`<div class="mt">${featuredCard(f)}</div>`)} |
| 543 | 542 | ${tiles.length > 0 |
| 544 | ? html`<div class="mt app-shelf">${tiles}</div> | |
| 543 | ? html`<div class="mt stack">${tiles}</div> | |
| 545 | 544 | ${when( |
| 546 | 545 | front.total > tiles.length + (front.featured === undefined ? 0 : 1), |
| 547 | 546 | () => |
test/front.test.ts +9
| @@ -504,6 +504,15 @@ describe("the front page", () => { | ||
| 504 | 504 | ).text(); |
| 505 | 505 | expect(page).toContain("The front page"); |
| 506 | 506 | expect(page).toContain("owner/forge"); |
| 507 | // Drawn with §5's card, bar and stack: no page-local names (#4291), and | |
| 508 | // every word and form is still there. | |
| 509 | expect(page).not.toContain("front-controls"); | |
| 510 | expect(page).not.toContain("app-shelf"); | |
| 511 | expect(page).toContain("What counts, 0 to"); | |
| 512 | expect(page).toContain("PUT /api/v1/front"); | |
| 513 | expect(page).toContain('aria-label="Repository to pin"'); | |
| 514 | for (const action of ["up", "unpin", "pin", "weights"]) | |
| 515 | expect(page).toContain(`name="action" value="${action}"`); | |
| 507 | 516 | const moved = await fetch(`${base}/front`, { |
| 508 | 517 | method: "POST", |
| 509 | 518 | headers: { cookie, origin: base }, |
new above
offline
This stack-tight div wraps a single paragraph, so it spaces nothing. Drop the wrapper and keep .break on the p, or put the note and the forms in one stack-tight. The tag is also not indented to match the template around it.