diff --git a/CHANGELOG.md b/CHANGELOG.md index bab19a2..fca7763 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -234,13 +234,13 @@ Fixes found while moving a second PatternLab styleguide (n8d) to Pattern Dump. - A numbered `templates` or `pages` folder now gets the `full` preview layout its category promises. The category was matched with its ordering prefix still attached, so a PatternLab tree - (`04-templates`, `05-pages`) could never hit the documented default — only a per-folder + (`04-templates`, `05-pages`) could never hit the documented default. Only a per-folder `preview: full` could. Folder *labels* still keep the number: `2-col` is a name and `04-templates` a prefix, and nothing in the string tells them apart, so a numbered folder sets `title:` for a clean label. - A `requireScript` or `globalScripts` id with no matching `/.ts` is reported instead - of failing inside the preview. `pd dev` names every unresolvable id at startup — with the component - for a `requireScript` — and the script's URL answers 404 saying which file it expected and where, + of failing inside the preview. `pd dev` names every unresolvable id at startup (with the component + for a `requireScript`), and the script's URL answers 404 saying which file it expected and where, rather than embedding a raw `ENOENT`. Scripts are TypeScript, so a `.js` file of the same name does not satisfy an id; that is the common case this hid. @@ -284,8 +284,8 @@ These can change how an existing project loads or renders: ### Fixed - A `centered` preview whose height comes from the viewport (`height: 200vh` in the base layer, a - percentage chain) no longer grows without bound. Content-fitting such a height is circular — the - frame's height feeds the content's — and the frame used to double every tick to the browser's + percentage chain) no longer grows without bound. Content-fitting such a height is circular (the + frame's height feeds the content's), and the frame used to double every tick to the browser's layout ceiling, showing a size like `785 × 33554428`. The run of growth is now detected, the frame keeps its last steady height and the content scrolls inside it, and the Console says why. - SCSS edits reach the preview live when `styles.entry` is set, and edits to base-layer styles diff --git a/apps/dev-ui/e2e/document-title.spec.ts b/apps/dev-ui/e2e/document-title.spec.ts index 5b6c188..8f2dfca 100644 --- a/apps/dev-ui/e2e/document-title.spec.ts +++ b/apps/dev-ui/e2e/document-title.spec.ts @@ -1,5 +1,5 @@ -// The browser tab names the workbench: shell.brand.title (test-bench sets "Test bench"), with the component in front -// on a component route, so tabs and history entries can be told apart. The served page has the brand before any +// The browser tab names the workbench: shell.brand.title (test-bench sets "Test bench"), with the component or folder +// in front on its route, so tabs and history entries can be told apart. The served page has the brand before any // script runs; the shell keeps the title in step with every navigation, Back included. import { test, expect } from "@playwright/test"; @@ -9,10 +9,12 @@ test("the served page's title is the brand", async ({ request }) => { expect(html).toContain("Test bench"); }); -test("a component route puts the component in front; a folder, and Back to it, the brand alone", async ({ page }) => { +test("a component or folder route puts its title in front, Back restores it, and an unknown route is the brand alone", async ({ page }) => { + await page.goto("/no-such-route"); + await expect(page).toHaveTitle("Test bench"); await page.goto("/atoms"); await expect(page.locator("#category-overview")).toBeVisible(); - await expect(page).toHaveTitle("Test bench"); + await expect(page).toHaveTitle("Atoms · Test bench"); await page.goto("/atoms/button"); await page.waitForSelector("#preview-frame[srcdoc]"); await expect(page).toHaveTitle("Button · Test bench"); diff --git a/apps/dev-ui/e2e/static/static-build.spec.ts b/apps/dev-ui/e2e/static/static-build.spec.ts index ce55eac..f63f6d6 100644 --- a/apps/dev-ui/e2e/static/static-build.spec.ts +++ b/apps/dev-ui/e2e/static/static-build.spec.ts @@ -48,14 +48,14 @@ test.describe("static build — built without the audit (--no-audit)", () => { }); test.describe("static build — the browser tab", () => { - test("names the brand in every shell page, and the component in front on a component route", async ({ page, request }) => { + test("names the brand in every shell page, and the component or folder in front on its route", async ({ page, request }) => { expect(await (await request.get("atoms/button")).text()).toContain("Test bench"); await page.goto("atoms/button"); await page.waitForSelector("#preview-frame[srcdoc]"); await expect(page).toHaveTitle("Button · Test bench"); await page.goto("atoms"); await expect(page.locator("#category-overview")).toBeVisible(); - await expect(page).toHaveTitle("Test bench"); + await expect(page).toHaveTitle("Atoms · Test bench"); }); }); diff --git a/apps/dev-ui/e2e/theme-picker.spec.ts b/apps/dev-ui/e2e/theme-picker.spec.ts index 3f53ef7..27b057d 100644 --- a/apps/dev-ui/e2e/theme-picker.spec.ts +++ b/apps/dev-ui/e2e/theme-picker.spec.ts @@ -16,7 +16,7 @@ // but not clickable, so the user-facing affordance is the chip