Repository navigation
fix(templates): layout header and footer, card and empty state example buttons respond - #12047
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec d390431 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
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 theLayout/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.
|
/approve-spec 12c3794 |
There was a problem hiding this comment.
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 tofix(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.
|
/approve-spec f0f6afb |
There was a problem hiding this comment.
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 exampleuniqueID: '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-blockinguniqueIDnote). - 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.
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
Scope