Skip to content

fix(templates): layout header and footer, card and empty state example buttons respond - #12047

Merged
josephfarina merged 3 commits into
mainfrom
josephfarina/block-controls-layout
Nov 16, 2026
Merged

josephfarina merged 3 commits into
mainfrom
josephfarina/block-controls-layout

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What

In the layout header and footer examples (the general Layout examples are not part of this change), the card examples (card with inner layout, clickable card with a nested button) and all the empty state examples including the showcase, each action button (Save, Cancel, Export, New Item, Add to cart, Go back, Clear filters, Settings, Refresh, Import, Create project) shows an honest "Demo: ... would ... here" toast instead of doing nothing.

Why

Some controls in these example blocks did nothing when used. The controls listed above now do what they say or say plainly that the example stops there. Other controls in these blocks and in other blocks are unchanged. No props, API, layout or styling change.

Evidence

  • Pixel-identical at rest at 390 and 1280 px, with script on and off (full-page screenshots before and after, zero changed pixels); the toast appears only after a click.
  • Browser check: each changed control shows its note.
  • Build replay over real build requests: no start, alternatives list or block list changes.
  • Typecheck (strict, no unused locals), lint and prettier pass.

Scope

  • Example blocks only; no component or API change.
  • Public text contains no internal context.

@vercel

vercel Bot commented Nov 16, 2026 •

Copy link
Copy Markdown

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

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 16, 2026 10:35am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 16, 2026, 10:49 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 16, 2026
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec d390431

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · f0f6afb

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.12 MB packed (+508 B); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Changes requested: the demo toasts work in all nine blocks, and an engineering owner's /approve-spec for this head settles that direction, but the release note and the description claim more than the change does.

  • The changeset (.changeset/block-controls-layout.md:5) and the title say the empty state and layout example buttons respond, but the EmptyState showcase's Clear filters button (packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx:16) still does nothing and the Layout/ example blocks keep their dead buttons, so give the showcase button the same demo toast and narrow the title to the layout header and footer (or wire those blocks too).
  • The description says these blocks rendered menu items that did nothing and that "Copy really copies", but none of the nine blocks has a menu item or a Copy control, so please drop both phrases.

Non-blocking: no toast passes a uniqueID, so repeated presses stack identical toasts; one id per action would replace the toast in place.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Claim: each listed button (Save, Cancel, Export, New Item, Add to cart, Go back, Clear filters, Settings, Refresh, Import, Create project) in the named blocks shows a demo toast instead of doing nothing. Verified: 17 handlers on this head and none on the base (Add to cart had an empty one); in Chromium one press shows the toast in each of the nine blocks.
  • Claim: the empty state example blocks' action buttons respond (changeset and description). False: the EmptyState showcase's Clear filters button has no handler.
  • Claim: the layout example buttons respond (title). Broader than the change: only the layout header and footer blocks change.
  • Claim: these blocks rendered buttons and menu items that did nothing. False: they render no menu items.
  • Claim: each control now does what it says or says plainly that the example stops there. Verified: every changed button shows a demo toast.
  • Claim: no props, API, layout or styling change, and example blocks only. Verified from the diff.
  • Claim: the blocks are pixel-identical at rest and the toast appears only after a click. Verified at 900 px in Chromium for all nine blocks; not re-measured at 390 or 1280 px or with script off.
  • Claim: a browser check shows each changed control's note. Verified for all nine blocks; false in part, since no Copy control exists here.
  • Claim: a build replay shows no change. Not reproducible here; consistent with the unchanged template docs.
  • Claim: typecheck, lint and prettier pass. Verified on the nine blocks.
  • Claim: public text carries no internal context. Verified.
  • File .changeset/block-controls-layout.md: finding; it says the empty state blocks respond while the showcase does not.
  • File packages/cli/assets/templates/blocks/components/Card/CardWithInnerLayout.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/Card/ClickableCardWithNestedButton.tsx: clear; the press does not navigate the surrounding card.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx: clear.

Automated review (maintainer link)

Comment thread .changeset/block-controls-layout.md Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 12c3794

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Not ready to approve yet: the demo toasts work in all ten blocks, but this head needs an engineering owner's decision on that direction, and the title still claims more than the change does.

  • The title says the layout example buttons respond, but the general Layout example blocks still render buttons with no handler (for example packages/cli/assets/templates/blocks/components/Layout/LayoutBasicCardLayout.tsx:53), so please retitle to fix(templates): layout header and footer, card and empty state example buttons respond.

No current spec record says what a template's example action does without a real handler (the template-authoring record is still a draft), and the earlier /approve-spec names the previous head, before the EmptyState showcase commit, so approval waits on an engineering owner deciding that these blocks show a "Demo: … would … here" toast. An engineering owner records that decision by commenting /approve-spec followed by this head's full commit SHA; the author may do so as an engineering owner. Non-blocking: no toast passes a uniqueID, so repeated presses stack identical toasts, and one id per action would replace the toast in place.

Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim (title): the layout, card and empty state example buttons respond. Card and empty state verified (every Card block with an action button and all four EmptyState blocks are wired); layout false, since the general Layout example blocks keep buttons with no handler.
  • Claim: each listed action button (Save, Cancel, Export, New Item, Add to cart, Go back, Clear filters, Settings, Refresh, Import, Create project) in the layout header and footer, card and empty state examples, showcase included, shows a demo toast instead of doing nothing. Verified: 17 handlers on this head and none on the base (Add to cart had an empty one); in Chromium one press shows the toast in each of the ten blocks.
  • Claim: the general Layout examples are not part of this change. Verified: those files are unchanged.
  • Claim: the listed controls now do what they say or say plainly that the example stops there, and other controls are unchanged. Verified from the diff.
  • Claim: no props, API, layout or styling change, and example blocks only. Verified from the diff and identical rest frames.
  • Claim: the blocks are pixel-identical at rest and the toast appears only after a click. Verified at 900 px in Chromium for all ten blocks; not re-measured at 390 or 1280 px or with script off.
  • Claim: a browser check shows each changed control's note. Verified for one control in each of the ten blocks.
  • Claim: a build replay shows no change to starts, alternatives or block lists. Not reproduced; consistent with no template metadata change.
  • Claim: typecheck (strict, no unused locals), lint and prettier pass. Verified on the changed files.
  • Claim (changeset): the layout header and footer, card and empty state example blocks' action buttons show a short demo note, and the general Layout blocks are not part of this change. Verified.
  • Claim: public text contains no internal context. Verified.
  • File .changeset/block-controls-layout.md: clear.
  • File packages/cli/assets/templates/blocks/components/Card/CardWithInnerLayout.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/Card/ClickableCardWithNestedButton.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx: clear; same pattern and wording as its siblings.
  • File packages/cli/assets/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx: clear.

Automated review (maintainer link)

@josephfarina josephfarina changed the title fix(templates): layout, card and empty state example buttons respond fix(templates): layout header and footer, card and empty state example buttons respond Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec f0f6afb

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approved pending CI: CI has not finished on this head yet. All 17 action buttons in the ten example blocks now show their demo toasts, an engineering owner's /approve-spec for this head settles that direction, and the new title fixes the earlier scope finding.

  • Non-blocking: no toast passes a uniqueID, so pressing the same button twice stacks two identical toasts; one id per action (for example uniqueID: 'save') would replace the toast in place.
Claims and files checked

Review mode: incremental; reason: none

  • Changed rules (0): none.
  • Claim (title): the layout header and footer, card and empty state example buttons respond. Verified: every action button in the LayoutHeader, LayoutFooter, Card and EmptyState example blocks has a handler, and each shows its toast in Chromium.
  • Claim: each listed action button (Save, Cancel, Export, New Item, Add to cart, Go back, Clear filters, Settings, Refresh, Import, Create project), the empty state showcase included, shows a "Demo: … would … here" toast instead of doing nothing. Verified: all 17 presses show their own line on this head and nothing on the base (Add to cart had an empty handler).
  • Claim: the general Layout examples are not part of this change. Verified: those files are unchanged.
  • Claim: the listed controls now say plainly that the example stops there, and other controls are unchanged. Verified from the diff; the clickable card links are untouched.
  • Claim: no props, API, layout or styling change, and example blocks only. Verified from the diff and identical rest frames.
  • Claim: the blocks are pixel-identical at rest at 390 and 1280 px, and the toast appears only after a click. Verified with script on at both widths for all ten blocks; the script-off run was not reproduced.
  • Claim: a browser check shows each changed control's note. Verified for all 17 buttons.
  • Claim: a build replay shows no change to starts, alternatives or block lists. Not reproduced; consistent with no change to any block's metadata.
  • Claim: typecheck (strict, no unused locals), lint and prettier pass. Verified for the changed files.
  • Claim: public text contains no internal context. Verified.
  • Claim (changeset): the layout header and footer, card and empty state example blocks' action buttons show a short demo note instead of doing nothing, and the general Layout example blocks are not part of this change. Verified.
  • File .changeset/block-controls-layout.md: clear.
  • File packages/cli/assets/templates/blocks/components/Card/CardWithInnerLayout.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/Card/ClickableCardWithNestedButton.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateActions.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateCompact.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateContainer.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/EmptyState/EmptyStateShowcase.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutFooter/LayoutFooterActions.tsx: clear (non-blocking uniqueID note).
  • File packages/cli/assets/templates/blocks/components/LayoutFooter/LayoutFooterShowcase.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutHeader/LayoutHeaderShowcase.tsx: clear.
  • File packages/cli/assets/templates/blocks/components/LayoutHeader/LayoutHeaderWithActions.tsx: clear.

Automated review (maintainer link)

@josephfarina
josephfarina merged commit b78ca36 into main Nov 16, 2026
77 checks passed
@github-actions
github-actions Bot deleted the josephfarina/block-controls-layout branch November 17, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — f0f6afb7 Deployed Nov 16, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant