Optional basket page; Button blocks follow the site colour; Site design tidy-up #9

Merged
reudy merged 5 commits from booking-basket-pages into main 2026-10-26 13:09:24 +01:00
Member

Two changes: an optional basket page, and a fix for Button blocks ignoring the site's primary colour.

Optional basket page

Site design → Header gets an optional Basket page text box, where you type the page's slug (e.g. basket). Booking and paying can now be separate pages.

  • The CTA button works as before: a label and an address. Its address is also where hero buttons without their own address and Book another after paying lead.
  • Basket page: the header basket, ✓ In basket / view basket in the Shop block, and Back to your basket after a failed payment lead here. Empty = the CTA's address, so a single page with both blocks keeps working as it does today.
  • Slashes and spaces around the slug are ignored. Site design warns when no page has the typed slug, or when the basket's page (or, if no basket page is set, the CTA's page) isn't published or has no Checkout block.
  • On a separate basket page, an empty basket shows a Book a session link to the CTA's address instead of "Pick a service or product above."

Before this, all of these links pointed at a hard-coded /book. They now come from shopLinks(header) in packages/shared/src/types.ts. No migration is needed, since the setting lives in the header global's JSON.

Site design tidy-up

  • "Saved." slides in and collapses away after 2.5 s, with no motion when the system's reduce-motion setting is on. Errors stay until the next save.
  • The CTA and Basket page hints are short tooltips on an info button, shown on hover or keyboard focus.
  • A CTA address such as /book is checked like the basket slug: Site design warns when no page has that slug or the page isn't published. / and external links aren't checked.
  • Home page is moved above Navigation.

Button block colour

ButtonBlock built its class as btn-${variant}. Tailwind only generates classes written out in the source, and the public app never spells out btn-primary. So primary Button blocks were plain grey on the live site. The admin preview looked right, because the admin uses btn-primary elsewhere. The block now maps each variant to a whole class name, and AGENTS.md notes the rule.

Tested

  • svelte-check: 0 errors in both apps; no new warnings.

  • In a browser on a test stack with the primary colour set to blue:

    • Before the fix: a primary Button block was grey (oklch(0.98 0 0)).
    • After the fix: it is blue (rgb(29, 78, 216)), and the secondary variant still follows the accent colour.
  • Links, after saving each of these settings in Site design:

    CTA address Basket page CTA Header basket and In basket Hero button
    /book basket /book /basket /book
    /book empty /book /book /book
    /all empty /all /all /all

    With the /all setting, Site design warned that "All blocks" has no Checkout block.

  • Basket slug typed as /basket/: links went to /basket. Typed as nope: Site design warned "There is no page with the slug “nope”".

  • Site design: /nope as the CTA address warns. "Saved." is still shown at 2 s and gone at 3.5 s, while a failed save's error is still shown after 4 s. The tooltips fit at 1500 px and 390 px widths and open on keyboard focus.

  • I didn't rerun the PocketBase hook suites: no hook or schema changed.

🤖 Generated with Claude Code

https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW

Two changes: an optional basket page, and a fix for Button blocks ignoring the site's primary colour. ## Optional basket page Site design → Header gets an optional **Basket page** text box, where you type the page's slug (e.g. `basket`). Booking and paying can now be separate pages. - **The CTA button works as before**: a label and an address. Its address is also where hero buttons without their own address and *Book another* after paying lead. - **Basket page**: the header basket, *✓ In basket* / *view basket* in the Shop block, and *Back to your basket* after a failed payment lead here. **Empty = the CTA's address**, so a single page with both blocks keeps working as it does today. - Slashes and spaces around the slug are ignored. Site design warns when no page has the typed slug, or when the basket's page (or, if no basket page is set, the CTA's page) isn't published or has no Checkout block. - On a separate basket page, an empty basket shows a *Book a session* link to the CTA's address instead of "Pick a service or product above." Before this, all of these links pointed at a hard-coded `/book`. They now come from `shopLinks(header)` in `packages/shared/src/types.ts`. No migration is needed, since the setting lives in the `header` global's JSON. ## Site design tidy-up - "Saved." slides in and collapses away after 2.5 s, with no motion when the system's reduce-motion setting is on. Errors stay until the next save. - The CTA and Basket page hints are short tooltips on an info button, shown on hover or keyboard focus. - A CTA address such as `/book` is checked like the basket slug: Site design warns when no page has that slug or the page isn't published. `/` and external links aren't checked. - Home page is moved above Navigation. ## Button block colour `ButtonBlock` built its class as `` btn-${variant} ``. Tailwind only generates classes written out in the source, and the public app never spells out `btn-primary`. So primary Button blocks were plain grey on the live site. The admin preview looked right, because the admin uses `btn-primary` elsewhere. The block now maps each variant to a whole class name, and AGENTS.md notes the rule. ## Tested - `svelte-check`: 0 errors in both apps; no new warnings. - In a browser on a test stack with the primary colour set to blue: - **Before the fix:** a primary Button block was grey (`oklch(0.98 0 0)`). - **After the fix:** it is blue (`rgb(29, 78, 216)`), and the secondary variant still follows the accent colour. - Links, after saving each of these settings in Site design: | CTA address | Basket page | CTA | Header basket and *In basket* | Hero button | |---|---|---|---|---| | `/book` | `basket` | `/book` | `/basket` | `/book` | | `/book` | empty | `/book` | `/book` | `/book` | | `/all` | empty | `/all` | `/all` | `/all` | With the `/all` setting, Site design warned that "All blocks" has no Checkout block. - Basket slug typed as ` /basket/ `: links went to `/basket`. Typed as `nope`: Site design warned "There is no page with the slug “nope”". - Site design: `/nope` as the CTA address warns. "Saved." is still shown at 2 s and gone at 3.5 s, while a failed save's error is still shown after 4 s. The tooltips fit at 1500 px and 390 px widths and open on keyboard focus. - I didn't rerun the PocketBase hook suites: no hook or schema changed. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
agent added 1 commit 2026-10-26 12:20:05 +01:00
The header button, the basket indicator, the shop's "view basket" links,
hero buttons and the payment return page all pointed at a hard-coded
/book. Site design now has a Booking page (where the CTA leads) and a
Basket page (where the basket leads; empty = the booking page), and
warns when the page picked is unpublished or lacks its Shop / Checkout
block. On a basket page of its own, an empty basket links to the
booking page instead of saying "pick a service above".

Sites saved before this keep their links: the booking page falls back
to the CTA's old address, then /book.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
agent added 2 commits 2026-10-26 12:44:06 +01:00
The variant class was built as `btn-${variant}`. Tailwind only generates
classes written out in the source, and nothing in the public app spells
out `btn-primary`, so primary Button blocks rendered as plain grey
buttons on the live site (the admin preview, which uses btn-primary
elsewhere, looked right).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
Instead of a separate booking page setting, booking links lead to the
header button's own address again, and the basket page falls back to
that address when it isn't set. Site design warns when the basket's
page isn't published or has no Checkout block.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
agent changed title from Site design: separate booking page and basket page to Optional basket page; Button blocks follow the site colour 2026-10-26 12:44:15 +01:00
agent added 1 commit 2026-10-26 12:50:55 +01:00
Like the CTA's address, the basket page is now a text box. Slashes and
spaces around the slug are ignored, and Site design warns when no page
has that slug.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
agent changed title from Optional basket page; Button blocks follow the site colour to Optional basket page; Button blocks follow the site colour; Site design tidy-up 2026-10-26 13:07:16 +01:00
agent added 1 commit 2026-10-26 13:07:16 +01:00
- "Saved." slides in and collapses away after 2.5 s (no motion with
  prefers-reduced-motion); errors stay until the next save.
- The CTA and basket hints are short tooltips on an info button
  (hover or keyboard focus) instead of paragraphs.
- A CTA address like "/book" is checked like the basket slug: warns
  when no page has that slug or it isn't published.
- Home page moves above Navigation.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Hy2vMnHJYP7QGsiH21zHxW
reudy merged commit 95a3c6d6b3 into main 2026-10-26 13:09:24 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: reudy-net/domaino#9
No description provided.