styleguide: the pager, two chevron icons, and two pattern sentences #314
Labels
No labels
bug
enhancement
needs-triage
ready-for-agent
ready-for-human
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle#314
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The dashboard (deckle-hosted) gets a Builds page listing every push of a site, fifty a page, and needs a shared way to move between pages. The styleguide has none: today's lists offer a "Newer" and an "Older" link in a panel foot. This adds
.pagertocomponents.csswith its sample and rules instyleguide.html, two Lucide chevron icons for its ends, and two sentences to the Patterns section that record decisions the products already follow. No new token, no new colour, no new tone; the contrast table is unchanged.The design it serves is deckle-hosted's Overview redesign, https://claude.ai/artifact/DWvnF6xuivH8o4EFPr2qEi (section 5, "The builds pages", with the pager at three and at forty pages, desktop and phone), and deckle-hosted issue #146, which is blocked on this one. The editor gains the component for free through its import of
components.cssand need not use it.Current behavior
docs/styleguide/components.csshas no pagination component; the dashboard draws Newer and Older as plain.links in a.panel__foot.styleguide.htmlsection 5 (Components) has no sample for it, section 6 (Patterns) says nothing about where a pager sits, nothing about a destructive action that needs no confirmation, and its "Responsive" article does not mention paging. The sample page's icon set (PATHSin the inline script) haslock,ext,copy,x,mail,pencil; no chevrons.Desired behavior
components.css: the pager
A new block,
/* ---- pager: the pages under a long list ---- */, placed after the list and table block and before/* ---- forms ---- */, every value a token:and, inside the existing
@media (max-width: 720px)block:The buttons inside are the existing
.btn.btn--sm(the two ends) and.btn.btn--sm.btn--ghost(the page numbers); the pager adds no button variant.flex: 1 1 100%is what makes "count left, controls right" happen inside a.panel__foot, which is itself a flex row. Theopacityrule is on a selector that names a disabled state, as the drift rule requires.Markup the sample and both products use (the dashboard renders it server-side; the current page is a
span, the ends are links or, with nothing beyond them,spans):styleguide.html, section 5 (Components): the sample and its rules
A new board after the "list · table · empty" board, labelled
pager · the pages under a long list, holding two.panels, each a short.table(two or three rows of the builds table already used in the list board) with the pager in its.panel__foot:51–100 of 128 builds· Newer · 1 [2] 3 · Older;801–850 of 1,973 builds· Newer · 1 … 15 16 [17] 18 19 … 40 · Older;and a third panel showing page 1 of 3, where Newer is a
spanwitharia-disabled="true", so the disabled end is seen once.Below the board, four articles in the
.grid, in the voice of the existing ones:pager__metasays the range and the total ("51–100 of 128 builds"), at the left;pager__current("Page 2 of 3 · ") is hidden on desktop and shown on a phone, where the numbers are not.styleguide.html, section 6 (Patterns): two sentences and one addition
styleguide.html: the icons
PATHSin the inline script gains the two Lucide chevrons, so<i data-icon="prev">and<i data-icon="next">draw in the sample:The "Shape, controls, icons, measure" article (section 4) already says icons are Lucide at 16px and 14px inside controls; nothing to change there.
README.md (docs/styleguide)
No change: the file table and "Keeping it current" already cover a new shared component.
Decisions
dashboard.cssunder adk-name; the pager is shared vocabulary even while only one product uses it.opacityon a disabled control is the one use the styleguide allows.Key interfaces
docs/styleguide/components.css: the new block and the four lines in the narrow block.docs/styleguide/styleguide.html: the board and four articles in section 5; the three sentences in section 6;PATHSin the script.docs/styleguide/check-contrast.pyandtokens.css: untouched; the pager uses--tone-neutral-bg,--color-border-control,--color-heading,--color-text-muted,--type-hint,--space-1, all listed already.web/src/styles.css: untouched; it importscomponents.cssand inherits the component.dev/sync-styleguide.sh(its drift test compares the two files verbatim) and its own icon table; that is #146 there, not this issue.Acceptance criteria
components.csshas the.pagerblock and the four narrow-screen lines, every value a token, no colour literal,opacityonly on[aria-disabled="true"].styleguide.htmlsection 5 shows the pager at three pages, at forty pages, and at page 1 with a disabled end; the current page is held, the numbers follow the window rule, the count sits at the left and the controls at the right at full width; narrowing the browser below 720px hides the numbers, shows "Page n of m · ", and puts Newer and Older at the two edges with the count below.<i data-icon="prev">and<i data-icon="next">render as chevrons in the sample.go test ./docs/(check-contrast) passes; theweb/drift test passes unchanged;styleguide.htmlopens from the folder with no server and no build step, as before.How to verify
python3 docs/styleguide/check-contrast.pyexits 0;grep -nE '#[0-9a-fA-F]{3,8}|rgba?\(' docs/styleguide/components.cssfinds nothing.docs/styleguide/styleguide.html, go to section 5, and compare the three pager samples with the artifact's section 5 at desktop width, then narrow the window under 720px and compare with its phone frame.