Skip to content

feat(components): add the Footer family and three Stats variants - #452

Merged
Ducksss merged 3 commits into
devfrom
PinZheng/footer-stats-families
Aug 13, 2026
Merged

Ducksss merged 3 commits into
devfrom
PinZheng/footer-stats-families

Conversation

@Ducksss

@Ducksss Ducksss commented Aug 9, 2026 •

Copy link
Copy Markdown
Owner

Ports the two largest tailark/blocks families we had not covered. 73 components after this (was 67).

Stats — three siblings, not a new family

stats already existed as a category with stats-proof, so this adds variants to it:

Component Layout
stats-grid Heading + intro over a rule-topped number grid (4-up on desktop)
stats-card Centred heading over one divided panel, equal columns derived from the row count
stats-inline Rule-topped rows where each figure reads as one sentence

The planned stats-split was dropped — it would have duplicated stats-proof's split-narrative layout.

Footer — a genuinely new category

Placed last in the curated catalog order, as the chrome that closes a layout rather than fills it.

Component Layout
footer-columns Brand block beside labelled link columns, copyright rule
footer-simple Compact brand-left / links-right row
footer-centered Centred brand, tagline, nav; rule carrying copyright + policy links

Decisions worth a look

  • stats-proof was refactored onto a new shared statsFields base (0.2.0 → 0.3.0). A family where one variant ignores the shared base contradicts the documented variants model. Field shape and stored data are unchanged, but its installed file set grew by one, so this touches a shipped component.
  • New shared/footerUrls.ts restricts link hrefs to same-origin paths, HTTPS, mailto:, and tel:, in both the admin validator and at render. A footer is almost entirely links and React does not sanitize href. Note TeamGrid ships a raw href today, so this slightly tightens house posture rather than matching it.
  • Link groups are labelled <nav> regions, not headings — a footer has no natural h2 to hang an h3 off.
  • No social-icon variant: lucide v1 removed the brand marks. footer-centered carries a legal-links row instead.
  • First components with no shadcn UI dependency. public-registry.int.spec.ts compares against registryItem.registryDependencies, and an absent key fails the assert, so the footers declare an explicit [] (which survives shadcn build).
  • Footers install as Pages-layout blocks, since that is the only install mode. Each doc page says so and points at rendering the component in a root layout for real site chrome. Footer-as-a-global would be separate work.

Sync points touched beyond the template checklist

README inventory table, CLI help list, familyRepresentatives, and four count pins (67 → 73). The catalog SEO description enumerates families and was missing stats as well as footers — both added.

Verification

pnpm test:release → exit 0 (500 int, 403 e2e).

Darwin baselines minted for the six new components. The landing baselines legitimately move: the catalog teaser gains a Footer family card (+34px page height).

✅ Linux baselines landed via #454 (visual-baselines workflow, specs components-visual frontend): 6 added component images + 2 updated landing images, nothing unrelated rewritten. Branch carries 73 linux baselines for 73 components.

Rebased onto dev (was 6 behind, through the 1.3.1 release). All 150 baseline blobs verified byte-identical after the rebase — git rebase can silently drop a binary-only commit, so this was checked by blob rather than by git log. dev added no components, so the 73 count is unchanged. Re-ran pnpm test:release on the rebased tree: exit 0, 44 int files, 405 e2e (includes dev's new WebKit wall guard, which is bounds-based and needs no baselines).

Review fixes applied: the ordered catalog regex now actually pins stats and footers (it previously would not have caught their removal), and the PROVENANCE URL fence got a language tag (MD040).

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added six installable components: three stats layouts and three footer variants.
    • Added responsive catalog previews, demos, sample content, and installation metadata.
    • Added safe footer link validation for supported URLs.
    • Expanded component navigation and catalog listings.
  • Documentation

    • Added setup, usage, content model, requirements, and attribution guidance for all new components.
    • Updated the component inventory and Stats Proof family navigation.
  • Bug Fixes

    • Invalid footer links are now excluded from rendered footers.

Copilot AI lite review requested due to automatic review settings August 9, 2026 14:25
@vercel

vercel Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
payload-components Ready Ready Preview Aug 9, 2026 6:30pm
payload-components-97bf Ready Ready Preview Aug 9, 2026 6:30pm

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

@coderabbitai

coderabbitai Bot commented Aug 9, 2026 •

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@Ducksss, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 25 minutes

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 84b1946f-ea9b-49b8-99ff-68a9f549ea05

📥 Commits

Reviewing files that changed from the base of the PR and between f0ce44a and 3a151e0.

⛔ Files ignored due to path filters (8)
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-footer-centered-chromium-linux.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-footer-columns-chromium-linux.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-footer-simple-chromium-linux.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-stats-card-chromium-linux.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-stats-grid-chromium-linux.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-stats-inline-chromium-linux.png is excluded by !**/*.png
  • tests/e2e/frontend.e2e.spec.ts-snapshots/landing-home-desktop-chromium-linux.png is excluded by !**/*.png
  • tests/e2e/frontend.e2e.spec.ts-snapshots/landing-home-mobile-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (4)
  • README.md
  • payload-components/PROVENANCE.md
  • tests/int/fumadocs-site.int.spec.ts
  • tools/payload-components/cli.ts
📝 Walkthrough

Walkthrough

Adds six installable Payload components: three Stats variants and three Footer variants. The change includes shared field and URL helpers, manifests, registry entries, catalog integration, visual demos, documentation, provenance updates, and test updates.

Changes

Stats and footer components

Layer / File(s) Summary
Shared field and URL contracts
payload-components/source/blocks/shared/*, payload-components/source/blocks/StatsProof/config.ts, payload-components/manifests/stats-proof.json, payload-components/registry.json
Adds reusable Stats and footer fields. Adds footer URL validation and sanitization. Updates Stats Proof to use shared fields.
Payload block definitions and rendering
payload-components/source/blocks/Stats*/*, payload-components/source/blocks/Footer*/*
Adds six Payload block schemas and React components.
Registry and installation metadata
payload-components/manifests/{stats-*,footer-*}.json, payload-components/registry.json
Adds component manifests, registry wiring, source-file lists, recovery patches, post-install commands, and sample content.
Catalog and visual demos
src/components/site/demos/*, src/lib/{demo-content.ts,site.ts,component-page-tree.tsx}, README.md, tools/payload-components/cli.ts
Adds demo content, demo registry entries, catalog metadata, Footer taxonomy, README inventory entries, and CLI component listings.
Documentation and validation
content/docs/components/*, payload-components/PROVENANCE.md, tests/**/*
Adds six component documentation pages, updates Stats Proof family navigation and provenance, and updates catalog and installation assertions.

Estimated code review effort: 4 (Complex) | ~60 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Payload
  participant FooterColumnsBlock
  participant getSafeFooterHref
  participant Browser
  Payload->>FooterColumnsBlock: provide footer block data
  FooterColumnsBlock->>getSafeFooterHref: sanitize each link href
  getSafeFooterHref-->>FooterColumnsBlock: safe URL or undefined
  FooterColumnsBlock->>Browser: render valid footer links and content
Loading

Possibly related PRs

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Description check ⚠️ Warning The description includes detailed scope and verification results but omits the required Summary, Registry Checklist, and Notes sections. Add the required template headings and complete the Registry Checklist, Verification checkbox, and Notes sections.
✅ Passed checks (4 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed Docstring coverage is 85.71% which is sufficient. The required threshold is 80.00%.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title clearly summarizes the primary changes: adding the Footer family and three Stats variants.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch PinZheng/footer-stats-families

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@payload-components/PROVENANCE.md`:
- Around line 42-44: Update the fenced URL example in PROVENANCE.md to specify
the text language identifier, while preserving the existing URL template
unchanged.

In `@tests/int/fumadocs-site.int.spec.ts`:
- Around line 892-894: Update the catalogDescription assertion in
fumadocs-site.int.spec.ts to require both “stats” and “footers” in the expected
category order, preserving the existing terms and ordering constraints.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6bb99795-6bf3-435e-aa6f-cebfac018765

📥 Commits

Reviewing files that changed from the base of the PR and between 63a195f and f0ce44a.

⛔ Files ignored due to path filters (8)
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-footer-centered-chromium-darwin.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-footer-columns-chromium-darwin.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-footer-simple-chromium-darwin.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-stats-card-chromium-darwin.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-stats-grid-chromium-darwin.png is excluded by !**/*.png
  • tests/e2e/components-visual.e2e.spec.ts-snapshots/component-stats-inline-chromium-darwin.png is excluded by !**/*.png
  • tests/e2e/frontend.e2e.spec.ts-snapshots/landing-home-desktop-chromium-darwin.png is excluded by !**/*.png
  • tests/e2e/frontend.e2e.spec.ts-snapshots/landing-home-mobile-chromium-darwin.png is excluded by !**/*.png
📒 Files selected for processing (50)
  • README.md
  • content/docs/components/footer-centered.mdx
  • content/docs/components/footer-columns.mdx
  • content/docs/components/footer-simple.mdx
  • content/docs/components/meta.json
  • content/docs/components/stats-card.mdx
  • content/docs/components/stats-grid.mdx
  • content/docs/components/stats-inline.mdx
  • content/docs/components/stats-proof.mdx
  • payload-components/PROVENANCE.md
  • payload-components/manifests/footer-centered.json
  • payload-components/manifests/footer-columns.json
  • payload-components/manifests/footer-simple.json
  • payload-components/manifests/stats-card.json
  • payload-components/manifests/stats-grid.json
  • payload-components/manifests/stats-inline.json
  • payload-components/manifests/stats-proof.json
  • payload-components/registry.json
  • payload-components/source/blocks/FooterCentered/Component.tsx
  • payload-components/source/blocks/FooterCentered/config.ts
  • payload-components/source/blocks/FooterColumns/Component.tsx
  • payload-components/source/blocks/FooterColumns/config.ts
  • payload-components/source/blocks/FooterSimple/Component.tsx
  • payload-components/source/blocks/FooterSimple/config.ts
  • payload-components/source/blocks/StatsCard/Component.tsx
  • payload-components/source/blocks/StatsCard/config.ts
  • payload-components/source/blocks/StatsGrid/Component.tsx
  • payload-components/source/blocks/StatsGrid/config.ts
  • payload-components/source/blocks/StatsInline/Component.tsx
  • payload-components/source/blocks/StatsInline/config.ts
  • payload-components/source/blocks/StatsProof/config.ts
  • payload-components/source/blocks/shared/footerFields.ts
  • payload-components/source/blocks/shared/footerUrls.ts
  • payload-components/source/blocks/shared/statsFields.ts
  • src/components/site/CatalogFamilyTeaser.tsx
  • src/components/site/demos/FooterCenteredDemo.tsx
  • src/components/site/demos/FooterColumnsDemo.tsx
  • src/components/site/demos/FooterSimpleDemo.tsx
  • src/components/site/demos/StatsCardDemo.tsx
  • src/components/site/demos/StatsGridDemo.tsx
  • src/components/site/demos/StatsInlineDemo.tsx
  • src/components/site/demos/registry.ts
  • src/lib/component-page-tree.tsx
  • src/lib/demo-content.ts
  • src/lib/site.ts
  • tests/e2e/frontend.e2e.spec.ts
  • tests/int/curated-tailark-ports.int.spec.ts
  • tests/int/fumadocs-site.int.spec.ts
  • tests/int/payload-components.int.spec.ts
  • tools/payload-components/cli.ts

Comment thread payload-components/PROVENANCE.md Resolved
Comment thread tests/int/fumadocs-site.int.spec.ts Resolved
Ducksss and others added 3 commits August 10, 2026 02:16
Ports the two largest tailark/blocks families we had not covered.

Stats already existed as a category with one variant (stats-proof), so this
adds three siblings rather than a new family: stats-grid (rule-topped number
grid), stats-card (divided equal-column panel), and stats-inline (value-leads-
the-sentence rows). stats-split was dropped from the plan — it would have
duplicated stats-proof's split-narrative layout.

Footer is a genuinely new category, placed last in the curated catalog order as
the chrome that closes a layout rather than fills it: footer-columns (brand plus
labelled link columns), footer-simple (compact brand/links row), and
footer-centered (centred stack with a legal-links rule).

Notes:
- Extracts shared/statsFields.ts and refactors StatsProof onto it (0.2.0 ->
  0.3.0), so the family shares one base per the variants model. Field shape and
  stored data are unchanged.
- Adds shared/footerUrls.ts: footers are almost entirely a link surface and
  React does not sanitize href, so link hrefs are restricted to same-origin
  paths, HTTPS, mailto:, and tel: in both the admin validator and at render.
- Link groups are labelled <nav> regions rather than headings, which avoids
  inventing an h2/h3 level a footer does not have.
- No social-icon variant: lucide v1 removed the brand marks.
- Footers are the first items with no shadcn UI dependency; they declare an
  explicit empty registryDependencies so the public-registry parity assert
  still matches.

Darwin visual baselines minted for the six new components; the landing
baselines move because the catalog teaser gains a Footer family card. Linux
baselines still need the visual-baselines workflow.

Co-Authored-By: Claude Opus 5 <[email protected]>
…#454)

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…fence

Two review findings from the footer/stats family add:

- catalogDescription gained "stats" and "footers", but the ordered regex in
  fumadocs-site.int.spec.ts did not require either, so removing one from the
  copy would not have failed the gate. Both are now pinned in order.
- The upstream-URL fence in PROVENANCE.md had no language identifier
  (markdownlint MD040).

Co-Authored-By: Claude Opus 5 <[email protected]>
@Ducksss
Ducksss force-pushed the PinZheng/footer-stats-families branch from fd5d340 to 3a151e0 Compare August 9, 2026 18:25
@Ducksss
Ducksss merged commit 7bda120 into dev Aug 13, 2026
12 checks passed
@Ducksss
Ducksss deleted the PinZheng/footer-stats-families branch August 13, 2026 16:57
Ducksss added a commit that referenced this pull request Aug 30, 2026
* ci: require closing keywords in a promote PR body

#475 documented that closing keywords belong in the promote body, because a
keyword on a feature PR is squashed away before it reaches main and never
fires. Nothing enforced it, so a cycle could leak resolved issues the way
v1.4.0 did.

A `base: main` PR whose body carries neither a closing keyword nor the line
"No issues closed this cycle." now fails.

Its own workflow rather than a job in Registry Verification, because it has to
re-run on `edited`: a maintainer adding keywords in response to a red check
must be able to turn it green without pushing a commit. Adding `edited` to
Registry Verification's trigger would re-run the full release gate, including
four ~90-minute fresh-consumer shards, on every description tweak.

The body reaches the script through the environment, never interpolated into
`run:` — a PR description is untrusted input and would otherwise be a shell
injection vector. Plain bash, so the ref-exact Actions allowlist needs no new
entry, and no checkout or extra permissions.

Accepts either a keyword or the opt-out line, so a pure dependency-bump
promote is not forced to claim it closed something. The matcher is permissive
about separators and accepts #123, owner/repo#123, and full issue URLs; a bare
"#452" in a table row does not count.

This checks presence, not completeness — verified against #473's real body,
which passes on its one `closes #108` while three issues from that cycle
leaked. Enumerating what a promote *should* close is the follow-up the issue
describes.

Making it block also needs the check added to main's branch protection.

Closes #477

* read the body to EOF in every grep — -q SIGPIPEs printf on large matching bodies

CodeRabbit flagged the matched-capture line (head -c inside the pipeline);
verifying that locally surfaced the same defect one step earlier: grep -Eiq
exits at the first match, printf takes SIGPIPE writing the rest, and under
pipefail the whole condition reads false — so an oversized body WITH a valid
keyword would fail the check. GitHub caps bodies at 65536 characters, which
multibyte text pushes past the 64KiB pipe buffer, so this is reachable.

Both greps now consume the body to EOF (-o for capture, -c for the opt-out
count) with truncation applied after capture, outside the pipeline. Also
scoped the AGENTS.md sentence per review: commit messages landing on main
also fire keywords; the promote body is the reviewable place.

Verified against the full 13-case matrix from the PR body plus three
oversized-body cases (matching, non-matching, early match + padding):
16/16. YAML parses; prettier clean.

Co-Authored-By: Claude Fable 5 <[email protected]>

---------

Co-authored-by: Claude Fable 5 <[email protected]>

This branch was successfully deployed

2 active deployments
Preview – payload-components-97bf — 3a151e01 Deployed Aug 9, 2026 by vercel[bot]
Preview – payload-components — 3a151e01 Deployed Aug 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants