From 29ede3ad4bd5452e97f0b6106012c2aa36f82aef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rados=C5=82aw=20Smoli=C5=84ski?= Date: Thu, 29 Oct 2026 15:03:39 +0100 Subject: [PATCH 1/2] Block library: fixes from the first visual test on the reference site MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - CMSLink: a link that wraps content (a logo, a card) and leads nowhere keeps the content — an empty link group ({ type: 'internal' }) no longer hides logos - entryList: field `collection` → `entryCollection` (Mongoose reserves `collection`; unreleased, snapshot updated) + a test against reserved names - post template starts with a page hero holding the title (the page's h1) - legal and cookie policy templates set noindex: true (AGENT.md §0c) - hero background: a full bg-overlay scrim under the text - MediaValue accepts any object (generated Media types fit without a cast) - contact: Turnstile renders dark in an inverted section Co-Authored-By: Claude Opus 5.5 --- docs/block-library.md | 19 +++++++++------ .../blocks/contact/Component.tsx | 10 +++++++- .../blocks/entryList/Component.tsx | 4 ++-- .../block-library/blocks/entryList/config.ts | 3 ++- .../block-library/blocks/hero/Component.tsx | 2 +- src/modules/block-library/data.ts | 2 +- src/modules/block-library/templates/build.ts | 8 ++++++- src/modules/block-library/templates/pages.ts | 23 +++++++++++-------- src/modules/block-library/ui/CMSLink.tsx | 11 +++++---- test/block-library.schema.json | 2 +- test/blockLibrary.test.ts | 21 ++++++++++++++++- test/blockLibraryRender.test.ts | 10 +++++++- 12 files changed, 85 insertions(+), 30 deletions(-) diff --git a/docs/block-library.md b/docs/block-library.md index fc813b6..587be27 100644 --- a/docs/block-library.md +++ b/docs/block-library.md @@ -91,13 +91,13 @@ block has them) → `variant` (sidebar) → `settings` (sidebar: anchor, backgro | Slug (builder) | Panel name | Own fields | Variants | Accessibility | |---|---|---|---|---| -| `hero` (`buildHeroBlock`) | Hero / `Sekcja główna` | `media` (image or video), `poster` | `split`, `background`, `centered`, `page` | the first section's heading is the page `h1`; its image is the LCP image (eager, high priority); a background image is decorative (`alt=""`) under a scrim | +| `hero` (`buildHeroBlock`) | Hero / `Sekcja główna` | `media` (image or video), `poster` | `split`, `background`, `centered`, `page` | the first section's heading is the page `h1`; its image is the LCP image (eager, high priority); a background image is decorative (`alt=""`) under a full `bg-overlay` scrim (raise `--ipal-overlay` for very light photos) | | `textMedia` (`buildTextMediaBlock`) | Text and image | `content` (rich text), `media` | `mediaRight`, `mediaLeft` | reading order = text first on every screen | | `featureGrid` (`buildFeatureGridBlock`) | Feature grid | `items[]`: `icon` (with `icons`), `media`, `heading`, `text`, `link`; `columns` | `cards`, `list`, `numbered` | a linked feature: its heading is the link and covers the card; a dead link leaves plain text | | `gallery` (`buildGalleryBlock`) | Gallery | `items[]`: `media`, `caption`; `columns` | `grid`, `masonry` | each image a `LightboxTrigger` (keyboard, focus return, labels from Form messages); captions in `
` | | `faq` (`buildFaqBlock`) | FAQ | `items[]`: `question`, `answer` | `single`, `twoColumn` | native `
`/``, works without script | | `cta` (`buildCtaBlock`) | Call to action | `media` | `band`, `card`, `split` | renders nothing without a heading and buttons | -| `contact` (`buildContactBlock`) | Contact | `form` (relation), `content` | `formWithDetails`, `formOnly` | `RenderForm` (labels, errors, consent); details as `
` | +| `contact` (`buildContactBlock`) | Contact | `form` (relation), `content` | `formWithDetails`, `formOnly` | `RenderForm` (labels, errors, consent); details as `
`; the spam check widget turns dark in an inverted section | | `team` (`buildTeamBlock`) | Team | `items[]`: `media`, `heading` (name), `text` (role), `bio`, `link` | `grid`, `list` | the name is the profile link | | `pricing` (`buildPricingBlock`) | Pricing | `items[]`: `heading`, `price`, `period`, `text`, `features[]`, `highlighted`, `link`; `highlightLabel`, `note` | — | the highlighted plan carries a text label, not only a colour | | `logos` (`buildLogosBlock`) | Logos | `items[]`: `media`, `heading` (name), `link` | `row`, `grid` | the name is the alt text when the image has none; no marquee | @@ -105,7 +105,7 @@ block has them) → `variant` (sidebar) → `settings` (sidebar: anchor, backgro | `stats` (`buildStatsBlock`) | Key figures / `Liczby` | `items[]`: `value`, `heading` (label), `text` | `row`, `cards` | a `
`; static (no count-up animation) | | `richText` (`buildRichTextBlock`) | Text | `content`, `tableOfContents` | `narrow`, `wide` | heading anchors + table of contents (`aria-current` on the section being read) | | `steps` (`buildStepsBlock`) | Steps | `items[]`: `heading`, `text`, `media` | `numbered`, `timeline` | an `
    `; the number read as "Step 1" | -| `entryList` (`buildEntryListBlock`) | Entry list | `collection`, `mode` (latest / chosen), `limit`, `entries` | `cards`, `list` | each title links to its entry and covers the card; dates in `