Name the bounded frame: fill:true on the shell, and the contract minor that ships it
CI / full-gate (push) Successful in 2m52s
CI / full-gate (push) Successful in 2m52s
This commit is contained in:
@@ -11,7 +11,7 @@ import { envName, type SettingDecl, type SettingsOf } from "./settings.ts";
|
||||
import type { StorageCredentials } from "./storage.ts";
|
||||
|
||||
// The Plainpages release this contract ships in — see README → Contract versioning.
|
||||
export const HOST_API_VERSION = "0.3.0";
|
||||
export const HOST_API_VERSION = "0.4.0";
|
||||
|
||||
export type HttpMethod = "DELETE" | "GET" | "HEAD" | "PATCH" | "POST" | "PUT";
|
||||
|
||||
|
||||
@@ -95,10 +95,20 @@ test("app shell can disable the menu: no sidebar, focused single-column layout",
|
||||
assert.doesNotMatch(bare, /<aside class="sidebar"/); // sidebar dropped
|
||||
assert.doesNotMatch(bare, /class="hamburger"/); // and its mobile toggle
|
||||
assert.match(bare, /<div class="app app-bare">/); // single-column variant
|
||||
assert.doesNotMatch(bare, /app-fill/); // the document scrolls unless a page says otherwise
|
||||
assert.match(bare, /<main class="content" id="main-content"/); // content still renders
|
||||
assert.match(bare, /<section id="b">x<\/section>/);
|
||||
});
|
||||
|
||||
test("app shell: fill:true bounds the viewport, for a page whose own region scrolls", async () => {
|
||||
// The opt-out from document scrolling is the shell's to give — a page cannot derive the height
|
||||
// without knowing the topbar's own (AGENTS.md → UI).
|
||||
const filled = await render({ fill: true, title: "Board", body: "<div>x</div>", nav: "" });
|
||||
assert.match(filled, /<div class="app app-fill">/);
|
||||
const bothOff = await render({ fill: true, menu: false, title: "Board", body: "<div>x</div>", nav: "" });
|
||||
assert.match(bothOff, /<div class="app app-bare app-fill">/);
|
||||
});
|
||||
|
||||
test("app shell: an empty title yields no topbar <h1> so the body owns the single heading; docTitle sets <title>", async () => {
|
||||
// Auth/landing pass title:"" (their card/hero is the <h1>) + an explicit docTitle for the tab.
|
||||
const html = await render({ title: "", docTitle: "Sign in", brand: { name: "Acme" }, body: "<h1>Sign in</h1>" });
|
||||
|
||||
Reference in New Issue
Block a user