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

Parked opened this
Closed without merging

scout/forge:scout/4291-the-home-page-s-front-controls-and-app-s → main 2 commits fork 1 thread · 1 unresolved

  • Closed without merging. Nothing was applied to main.

Review

Sign in to review this change.
2 files changed +11 −3
src/web/studio/home.ts +2 −3
@@ -469,7 +469,7 @@ function frontControls(ctx: Ctx, front: FrontPage): Html {
469469 )}
470470 ${btn("Rank", { size: "sm" })}
471471 </form>
472 <p class="small muted">
472 <p class="small muted break">
outdated

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.

473473 The first pin a stranger can read is featured; the rest lead the
474474 shelf in this order. The same setting:
475475 <code class="mono">PUT /api/v1/front</code> and the MCP tool
@@ -478,7 +478,6 @@ function frontControls(ctx: Ctx, front: FrontPage): Html {
478478 {
479479 head: html`${icon("settings")}
480480 <h2>The front page</h2>`,
481 extra: "front-controls",
482481 },
483482 );
484483 }
@@ -541,7 +540,7 @@ export function studioDoor(ctx: Ctx): Response {
541540 </section>
542541 ${when(front.featured, (f) => html`<div class="mt">${featuredCard(f)}</div>`)}
543542 ${tiles.length > 0
544 ? html`<div class="mt app-shelf">${tiles}</div>
543 ? html`<div class="mt stack">${tiles}</div>
545544 ${when(
546545 front.total > tiles.length + (front.featured === undefined ? 0 : 1),
547546 () =>
test/front.test.ts +9
@@ -504,6 +504,15 @@ describe("the front page", () => {
504504 ).text();
505505 expect(page).toContain("The front page");
506506 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}"`);
507516 const moved = await fetch(`${base}/front`, {
508517 method: "POST",
509518 headers: { cookie, origin: base },

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs