From c1abff677df3da8dc53b4da4f2f56ec13d310052 Mon Sep 17 00:00:00 2001 From: Jaime Still Date: Tue, 1 Dec 2026 12:08:33 -0500 Subject: [PATCH 1/9] pnpm 12.25.1 and globals 17.15.0 - mise.toml: pnpm 12.23.0 -> 12.25.1. - package.json: globals 17.14.0 -> 17.15.0; lockfile regenerated under pnpm 12.25.1, which passes its supply-chain policies. - The web-foundation pin stays at v0.4.0; currency reports it current. - CHANGELOG opens an Unreleased section for the bumps, as 6084f9f did after 0.2.0. --- CHANGELOG.md | 6 ++++++ mise.toml | 2 +- package.json | 2 +- pnpm-lock.yaml | 10 +++++----- 4 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6cba4fd..37f4263 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,12 @@ All notable changes to `@standards-lab/web-components` are documented here. The [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and the package adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). +## [Unreleased] + +### Changed + +- The repository's tooling takes pnpm 12.25.1 and globals 17.15.0. + ## [0.3.0] - 2026-11-30 ### Added diff --git a/mise.toml b/mise.toml index 1d3387b..ad8544f 100644 --- a/mise.toml +++ b/mise.toml @@ -7,7 +7,7 @@ task.run_auto_install = false "github:standards-lab/claude-plugins" = { version = "0.25.0", version_prefix = "marathon/v" } actionlint = "1.7.12" node = "26.14.0" -pnpm = "12.23.0" +pnpm = "12.25.1" shellcheck = "0.11.0" "github:microsoft/typescript-go" = { version = "7.0.2", version_prefix = "typescript/v", bin_path = "package/lib" } diff --git a/package.json b/package.json index 48bd0c4..33ee30e 100644 --- a/package.json +++ b/package.json @@ -32,7 +32,7 @@ "eslint-import-resolver-typescript": "4.4.5", "eslint-plugin-boundaries": "7.4.5", "eslint-plugin-import-x": "4.18.1", - "globals": "17.14.0", + "globals": "17.15.0", "prettier": "3.10.1", "typescript": "6.0.3", "typescript-eslint": "8.74.0" diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index b797be4..11e4729 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -46,8 +46,8 @@ importers: specifier: 4.18.1 version: 4.18.1(@typescript-eslint/utils@8.74.0(eslint@10.16.0(supports-color@7.2.0))(supports-color@7.2.0)(typescript@6.0.3))(eslint-import-resolver-node@0.3.9(supports-color@7.2.0))(eslint@10.16.0(supports-color@7.2.0))(supports-color@7.2.0) globals: - specifier: 17.14.0 - version: 17.14.0 + specifier: 17.15.0 + version: 17.15.0 prettier: specifier: 3.10.1 version: 3.10.1 @@ -605,8 +605,8 @@ packages: resolution: {integrity: sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A==} engines: {node: '>=10.13.0'} - globals@17.14.0: - resolution: {integrity: sha512-UtdkTVyAJePQv0J2M9Xe4L0ruNSDV314XiIJsADI2Zf40bcdAonE/D/OhAU8AT99oij9mhLByb+NvA3QWZYgCg==} + globals@17.15.0: + resolution: {integrity: sha512-OyBOdPnzu9B2lFpums9/4wcyNHx4haAxY2X5PgO9LqCvXJgKYMMr/1y4TU7om/vTy4eYqRsVes1ZTJEJYKap8Q==} engines: {node: '>=18'} handlebars@4.7.10: @@ -1381,7 +1381,7 @@ snapshots: dependencies: is-glob: 4.0.3 - globals@17.14.0: {} + globals@17.15.0: {} handlebars@4.7.10: dependencies: From cc0fcf26b5f135411cf66361ef4b5717883280c3 Mon Sep 17 00:00:00 2001 From: Jaime Still Date: Tue, 1 Dec 2026 12:19:21 -0500 Subject: [PATCH 2/9] Scroll regions in the frameless lists; the narrow case at 390px sl-pagination, sl-document-list, and sl-search-results are flex columns of min-block-size: 0 whose list is the one scrolling region (flex: 1 1 auto; min-block-size: 0; overflow: auto). Held by a size on the host or a sized flex or grid parent, the list scrolls while the summary, the status line, and the pagination's controls stay in view; unheld, each is as tall as its content. The host doesn't grow to fill: a consumer's .scroll-frame or flex sizing does that, and in a row parent a grow would widen it. Decisions: - The scroller clips a focused button's outline, so the region's padding and scroll padding are --focus-reach, and the summary, status, and controls' rows take the same inline padding, so their text starts at the list's button edge. The controls' rule still spans the host. - sl-pagination gains a `before` slot, a row between the summary and the page, outside the scroll. sl-document-list puts its own-line status (no summary to join, or error) there, so it stays in view. - The specimen pages' narrow section is 390px (the narrow case at text 100%) in place of 20rem; tests and captions follow. Component width-range cases (20rem/40rem, the entry's 16rem floor, the drawer's dock) stay. Three specimens whose narrow assertions needed content to wrap at 320px got longer content: an entry with a long content type, a UUID run id in run.json, and a longer function name in the chat thread. Nothing overflowed its container at 390px. - The probe's content-type case skips wbr, which has no box and sat at the viewport origin. Tests: a held-host measure (test/browser/support/held.ts) per element, in a held flex column and a held scrolling grid, plus the unheld column. --- CHANGELOG.md | 14 +++ docs/components.md | 19 ++-- docs/layout.md | 18 +++- examples/artifact-viewer.html | 4 +- examples/chat-thread.html | 4 +- examples/composer.html | 2 +- examples/document-list.html | 4 +- examples/entry.html | 8 +- examples/event-log.html | 2 +- examples/examples.css | 4 +- examples/pagination.html | 2 +- examples/search-results.html | 2 +- examples/settings.html | 2 +- examples/shortcuts.html | 2 +- examples/stage-timeline.html | 2 +- examples/status-badge.html | 2 +- examples/upload-dropzone.html | 2 +- src/document-list.css | 9 +- src/document-list.ts | 13 ++- src/pagination.css | 22 ++++- src/pagination.ts | 13 ++- src/search-results.css | 15 ++- src/search-results.ts | 3 + test/browser/components.test.ts | 74 +++++++-------- test/browser/document-list.test.ts | 37 +++++++- test/browser/pagination.test.ts | 73 +++++++++++++++ test/browser/search-results.test.ts | 7 ++ test/browser/support/held.ts | 136 ++++++++++++++++++++++++++++ test/browser/support/probe.js | 2 +- 29 files changed, 411 insertions(+), 86 deletions(-) create mode 100644 test/browser/pagination.test.ts create mode 100644 test/browser/support/held.ts diff --git a/CHANGELOG.md b/CHANGELOG.md index 37f4263..cfecff1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -6,9 +6,23 @@ All notable changes to `@standards-lab/web-components` are documented here. The ## [Unreleased] +### Added + +- `sl-pagination`'s `before` slot: children slotted as `before` sit on lines of their own between + the summary and the entries, outside the page that scrolls. + ### Changed - The repository's tooling takes pnpm 12.25.1 and globals 17.15.0. +- `sl-pagination`, `sl-document-list`, and `sl-search-results` fill a host whose height is held, + by a size on the host or a sized flex or grid parent, and scroll their list inside it, the + summary, the status line, and the pagination's controls staying in view; unheld, each is as tall + as its content. Each is a flex column, and its list is inset by the focus outline's reach, with + the rows above and below it, so a focused item's outline stays whole inside the scroller. +- `sl-document-list`'s status line, when it doesn't join the summary, sits in the pagination's + `before` slot, so it stays in view as the entries scroll. +- The specimen pages' narrow section is 390px wide, the narrow case at text 100%, in place of + 20rem. ## [0.3.0] - 2026-11-30 diff --git a/docs/components.md b/docs/components.md index 7e8dbac..164a046 100644 --- a/docs/components.md +++ b/docs/components.md @@ -19,8 +19,10 @@ the tests measure as they do. any parent, a shrink-to-fit one too, and stays inside its box down to 16rem, its supported minimum width. - `./pagination.js`: `sl-pagination`, a page of entries between its summary and its controls, a - `status` slot running on after the summary's text; it dispatches `page-change` and - `page-size-change`. + `status` slot running on after the summary's text, and a `before` slot on lines of its own + between the summary and the entries; it dispatches `page-change` and `page-size-change`. Held to + a height, the entries scroll while the summary, the `before` slot, and the controls stay in + view; unheld, it is as tall as its content. - `./drawer.js`: `sl-drawer`, its children in the default slot, in one of two shadow wrappers by the viewport. At `dock`, a CSS length, 48rem by default, and wider, read in the media query `(width < )` so that exactly `dock` docks, they sit in an `aside` docked inline as an @@ -129,14 +131,18 @@ the tests measure as they do. case-insensitively as text for the query the matches were set with; its count names that query too, and says how many of a paged search's `total` it shows, while any are shown, and with none, "No matches" names the query the empty matches were set with; it dispatches `open` with a - match's id, and has loading and error states. It exports its match type and binds no key. + match's id, and has loading and error states. Held to a height, the matches scroll under the + status line, which stays in view; unheld, the results are as tall as their content. It exports + its match type and binds no key. - `./document-list.js`: `sl-document-list`, a page of documents composed of the components above, an `sl-entry` per document inside one `sl-pagination`, whose properties it takes under the same names and hands through; it frames the selected document's entry, hands a document's `status_tone` to its entry as its status tone, and has empty, loading, and error states, said on the pagination's summary line when it shows one. The entry's `open` and the pagination's `page-change` and `page-size-change` reach its listener as their parts sent them; it dispatches - none of its own. It exports its document type and binds no key. + none of its own. Held to a height, the entries scroll inside the pagination while its summary, + the status line, and its controls stay in view; unheld, it is as tall as its content. It exports + its document type and binds no key. ## Conversation @@ -188,8 +194,9 @@ which the settings and shortcuts pages carry too. `examples/glyphs.js` fills the markers. Each component has a specimen page, `examples/.html`, for `status-badge`, `entry`, `pagination`, `artifact-viewer`, `chat-thread`, `composer`, `upload-dropzone`, `stage-timeline`, `event-log`, `search-results`, `document-list`, `drawer`, `settings`, and `shortcuts`. A specimen -page shows every state of its component, labelled, then again in a section 20rem wide, and, for a -component that holds a control, one instance reached by the keyboard to show its focus ring: the +page shows every state of its component, labelled, then again in a section 390px wide, the +narrow case at text 100%, and, for a component that holds a control, one instance reached by the +keyboard to show its focus ring: the screenshot script focuses the focus section's `[data-focus-start]` mark, which takes focus only by script, then presses Tab as many times as the mark's value says, so `:focus-visible` matches. A page whose component draws its own frame drops the dashed one, so a capture shows the component's frame diff --git a/docs/layout.md b/docs/layout.md index 042dc67..0bccaf1 100644 --- a/docs/layout.md +++ b/docs/layout.md @@ -36,8 +36,18 @@ layout each one promises. region that fits would only narrow it. - A component that draws no frame (the search results, the document list, the stage timeline) is a stack of native buttons or steps that the elements sheet already borders; a frame around them - would nest one frame in another. It is as tall as its content with no cap, and a consumer that - wants it held scrolls its own box. + would nest one frame in another. The stage timeline is as tall as its content with no cap, and a + consumer that wants it held scrolls its own box. +- A frameless list that pages or searches (the pagination, and through it the document list, and + the search results) is a flex column of `min-block-size: 0` whose list is the one region that + scrolls, a flex child of `min-block-size: 0` with `overflow: auto`; its summary, status line, and + controls are its other rows. A consumer that constrains the host's block size, by a size on the + host or a sized flex or grid parent, holds it there, the list scrolling between the rows that + stay in view; unconstrained, it is as tall as its content. +- That region's padding is the foundation's `--focus-reach`, and its scroll padding too, so a + focused button's outline, which the scroller clips, stays whole at its edges and when focus + scrolls it into view. The rows above and below take the same inline padding, so their text + starts at the list's buttons' edge. - A row whose label sits at the line's end (the artifact viewer's header, the entry's head, a search match's head) is a wrapping flex row: the name is `flex: 1 1 16ch` up to `max-content`, and the label's auto inline-start margin takes the space the name leaves, so the label leaves the @@ -171,6 +181,8 @@ layout each one promises. - The status line and the list are the list's own, slotted into the pagination, so this sheet styles them; the entries and the pagination style themselves. +- With no summary to join, and in the error state, the status is in the pagination's `before` + slot, a row above the scrolling page, so it stays in view as the entries scroll. - In the pagination's status slot, the status runs on after the summary's text, inheriting its type and color. Its label opens with a middle dot the content's empty alternative keeps from being read, and keeps whole, so a narrow line wraps the label, dot and all. @@ -187,6 +199,8 @@ layout each one promises. ## Pagination +- The summary, the `before` slot, the page of the default slot's children, and the controls' row + are the column's rows; only the page scrolls, and the controls' rule spans the host's width. - The page size label and the page count never break; a narrow pagination wraps its groups instead. - The page field is `content-box`, so the elements sheet's padding and border add to its `3ch` minimum rather than come out of it: up to page 999 it keeps one width, and past it the field grows diff --git a/examples/artifact-viewer.html b/examples/artifact-viewer.html index 8da2367..c604fdd 100644 --- a/examples/artifact-viewer.html +++ b/examples/artifact-viewer.html @@ -55,7 +55,7 @@ ].join("\n"); const json = JSON.stringify({ - id: "run-01J9X4R7Q2M8ZK3T5V6W", + id: "run-01a13e73-3cb0-7bbc-87f0-910990762f62", status: "complete", stages: [ { name: "classify", duration_ms: 1840, outputs: 3 }, @@ -255,7 +255,7 @@

States

-

States at 20rem

+

States at 390px

diff --git a/examples/chat-thread.html b/examples/chat-thread.html index 8c40a0e..9685790 100644 --- a/examples/chat-thread.html +++ b/examples/chat-thread.html @@ -282,7 +282,7 @@ { ...called, call_id: "call_01a19c590db77cc28219329571ef2e06", - name: "lookup_document_metadata_and_extracted_chunks", + name: "lookup_document_metadata_and_extracted_chunks_by_run_and_stage", }, { ...tools[3], @@ -343,7 +343,7 @@

States

-

States at 20rem

+

States at 390px

diff --git a/examples/composer.html b/examples/composer.html index 4b2d38e..452887c 100644 --- a/examples/composer.html +++ b/examples/composer.html @@ -84,7 +84,7 @@

States

-

States at 20rem

+

States at 390px

diff --git a/examples/document-list.html b/examples/document-list.html index a5669e7..7c50d0b 100644 --- a/examples/document-list.html +++ b/examples/document-list.html @@ -124,7 +124,7 @@ label: "The last page: 3 of 3, its newest document's run still running", build: list({ items: last, page: 3, more: false }), }, - { label: "A long name, kept inside its entry, wrapping at 20rem", build: list({ items: long }) }, + { label: "A long name, kept inside its entry, wrapping at 390px", build: list({ items: long }) }, { label: "Status tones: a run failed at stage 3 of 5 in red, one complete in green, one underway", build: list({ items: toned, page: 2, more: true }), @@ -160,7 +160,7 @@

States

-

States at 20rem

+

States at 390px

diff --git a/examples/entry.html b/examples/entry.html index 846ca30..fa5a017 100644 --- a/examples/entry.html +++ b/examples/entry.html @@ -24,7 +24,7 @@