Skip to content

fix(templates): five top and side nav examples get working links and actions - #12049

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

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

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

What

In the top nav examples, Search, Notifications and Profile show an honest "Demo: ... would ... here" toast. Sign in, Get started and Upgrade are navigation, so they become links (href="#", same look) with no toast, as do the side nav items in the side nav with a header menu.

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:20am 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:28 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 9c02d65

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · f533730

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.12 MB packed (+230 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.

Requesting changes. The code itself holds up: in Chromium at this head each changed control responds, the new links render as real anchors with the selected side nav item keeping aria-current="page", and every before/after frame at 390 and 1280 px is pixel-identical at rest. What needs fixing is the wording around it.

  • The changeset and the description's opening sentence claim the top nav and side nav example blocks as a family, but the Profile button in packages/cli/assets/templates/blocks/components/TopNav/TopNavHoverMenu.tsx:70 and TopNav/TopNavWithLogo.tsx:30, the Dashboard item in SideNav/SideNavNestedItems.tsx:56 and the Pin to top and Rename rows in SideNav/SideNavEndContent.tsx:97-98 are still dead at this head, so either narrow the wording to the five blocks this change touches or wire those controls and list any you leave, as the earlier page-template sweeps did.
  • The evidence line "Browser check: each changed control shows its note (Copy really copies)" names a Copy control that none of the five changed files contains, so drop or correct that parenthetical.

Two non-blocking notes: none of the nine handlers passes uniqueID, so three presses of Search leave three identical toasts stacked where the merged page templates replace theirs; and the three blocks that now call useToast do not list Toast in componentsUsed, which is what a component's example-block list and block search read.

Claims and files checked

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

  • Claim: the changeset's "top nav and side nav example blocks" scope for the demo notes and the links. False as written: four controls in those two block families keep no handler and no destination at this head.
  • Claim: the description's "in the top nav examples, Search, Notifications and Profile show a demo toast". Verified for the three changed blocks; false for the top nav examples as a whole.
  • Claim: Sign in, Get started and Upgrade become links with the same look and no toast. Verified: each renders as an anchor with href="#", and the at-rest frames are pixel-identical.
  • Claim: the side nav items in the header-menu side nav become links. Verified: both items render as anchors, and the selected one keeps aria-current="page".
  • Claim: these blocks rendered buttons and menu items that did nothing. Partly false: no menu item changed here; the header menu's rows already carried a destination on the base.
  • Claim: pixel-identical at rest at 390 and 1280 px, and the toast appears only after a click. Verified with script running; the script-off variant was not reproduced in this review.
  • Claim: each changed control shows its note. Verified for all nine handlers by click and by keyboard; the "Copy really copies" parenthetical is false.
  • Claim: a build replay shows no start, alternatives or block list changes. Not reproduced here; it is consistent with the code, because a block indexes on its authored componentsUsed and ids, which this change leaves unchanged, and the template, search, golden-read and discovery suites pass at this head.
  • Claim: typecheck (strict), lint and prettier pass. Verified: prettier and eslint are clean on the five files, the template-doc typecheck is clean, and the strict typecheck reports only two errors in untouched files caused by an unbuilt theme package in this environment.
  • Claim: no props, API, layout or styling change. Verified: only example source and a changeset change, and nothing moves at rest.
  • Claim: public text contains no internal context. Verified over the added lines, the title, the branch name and the commit message.
  • File .changeset/block-controls-nav.md: finding, the scope wording above.
  • File TopNav/TopNavShowcase.tsx: clear, with the uniqueID and componentsUsed notes.
  • File TopNav/TopNavCenteredNavigation.tsx: clear, same two notes.
  • File TopNav/TopNavEnterpriseDashboard.tsx: clear, same two notes plus the href={'#'} spelling.
  • File TopNav/TopNavMegaMenu.tsx: clear, with the href={'#'} spelling note.
  • File SideNav/SideNavWithHeaderMenu.tsx: clear, with the href={'#'} spelling note.
  • Consistency across the changed files: the nine toast strings follow one shape, and the five blocks keep their existing layout, icons and docs.

Automated review (maintainer link)

Comment thread .changeset/block-controls-nav.md Resolved
endContent={
<>
<Button
onClick={() => showToast({body: 'Demo: search would open here'})}

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.

Non-blocking: without a uniqueID, three presses of Search leave three identical toasts stacked. The merged page templates pass one, for example pages/messaging-shell/page.tsx:391 (uniqueID: what).

<>
<Button label="Sign in" variant="ghost" />
<Button label="Get started" variant="primary" />
<Button href={'#'} label="Sign in" variant="ghost" />

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.

Non-blocking: the templates write href="#" in 154 places; href={'#'} is the only spelling of its kind. Templates are copied verbatim, so the plain string reads better in a copy.

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec cf62150

@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.

Requesting changes. The description update fixed both wording findings in it; what remains is the same family-wide claim in the release note and the title.

  • The changeset (.changeset/block-controls-nav.md) still says "Top nav and side nav example blocks: …", but the Profile button in TopNav/TopNavHoverMenu.tsx and TopNav/TopNavWithLogo.tsx, the Dashboard item in SideNav/SideNavNestedItems.tsx and the Pin to top and Rename rows in SideNav/SideNavEndContent.tsx are still dead, so name the five blocks this change touches (and the header-menu side nav for the side nav links).
  • Miss: the title "top and side nav examples have working links and actions" makes the same family-wide claim against those four controls, so narrow it the same way, for example "five top and side nav examples get working links and actions".

The two earlier non-blocking notes still apply: the nine notes pass no uniqueID, so repeated presses stack identical notes, and the new destinations are written href={'#'} where the templates write href="#".

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0)
  • Changeset: the top nav and side nav example blocks get demo notes and links. False as written: four controls in those families stay dead.
  • Title: top and side nav examples have working links and actions. False as written, for the same four controls.
  • In the top nav examples, Search, Notifications and Profile show a demo note. Verified for the three changed top nav blocks; the description now says other blocks are unchanged.
  • Sign in, Get started and Upgrade become links with the same look and no note. Verified: each renders an anchor to #, and the at-rest frames are unchanged.
  • The side nav items in the header-menu side nav become links. Verified; the selected item keeps aria-current="page".
  • Some controls in these blocks did nothing. Verified on the base.
  • Other controls in these blocks and in other blocks are unchanged. Verified: only the five blocks and the changeset change.
  • No props, API, layout or styling change. Verified.
  • Pixel-identical at rest at 390 and 1280 px; the note appears only after a click. Verified with script running; the script-off variant was not reproduced.
  • Each changed control shows its note. Verified for the nine notes.
  • A build replay shows no start, alternatives or block list changes. Not reproduced; consistent with the code, since no doc metadata changes.
  • Typecheck, lint and prettier pass. Verified for lint and prettier on the changed files; the strict typecheck reports nothing in the changed files.
  • Example blocks only, with no component or API change. Verified.
  • Public text contains no internal context. Verified over the added lines, title, body, branch name and commit messages.
  • File .changeset/block-controls-nav.md: the scope finding above.
  • Files TopNavShowcase.tsx, TopNavCenteredNavigation.tsx, TopNavEnterpriseDashboard.tsx: clear, with the uniqueID note.
  • Files TopNavMegaMenu.tsx, SideNavWithHeaderMenu.tsx: clear, with the href spelling note; the five blocks stay consistent with each other.

Automated review (maintainer link)

@josephfarina josephfarina changed the title fix(templates): top and side nav examples have working links and actions fix(templates): five top and side nav examples get working links and actions Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec f533730

@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.

The release note and the title now name exactly the five blocks this change touches, which settles both earlier findings; the code was already sound. Two optional notes still apply: passing a uniqueID to each demo note would stop repeated presses from stacking identical notes, and href="#" matches how the other templates write these destinations.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0)
  • Title: five top and side nav examples get working links and actions. Verified: only those five blocks change, and each gains demo notes or links.
  • Changeset: in the five named blocks, Search, Notifications and Profile show a demo note, and Sign in, Get started, Upgrade and the header-menu side nav items are links; other top and side nav examples are unchanged. Verified block by block (TopNavShowcase.tsx:34-57, TopNavCenteredNavigation.tsx:34-48, TopNavEnterpriseDashboard.tsx:47-62, TopNavMegaMenu.tsx:91-92, SideNavWithHeaderMenu.tsx:90-91); no other such control exists in those blocks.
  • Description: Search, Notifications and Profile in the top nav examples show a demo note. Verified for the three changed top nav blocks; the description also says other blocks are unchanged.
  • Description: Sign in, Get started and Upgrade become links with the same look and no note. Verified: each renders an anchor to #, and the link style only removes the underline.
  • Description: the header-menu side nav items become links. Verified; the selected item keeps its current-page state.
  • Description: some controls in these blocks did nothing. Verified on the base, where they had no handler and no destination.
  • Description: other controls in these blocks and in other blocks are unchanged. Verified from the diff.
  • Description: no props, API, layout or styling change. Verified: no component source, layout or style line changes.
  • Description: pixel-identical at rest at 390 and 1280 px with script on and off, and the note appears only after a click. Verified from the code: the at-rest markup differs only by button to anchor with no visible style change, and the toast host is created on the first press.
  • Description: each changed control shows its note. Verified: each toast control's click handler shows its note.
  • Description: a build replay shows no start, alternatives or block list changes. Verified from the code: blocks are found by their doc metadata, which this change does not touch.
  • Description: typecheck, lint and prettier pass. Verified: strict typecheck reports nothing in the changed files, and eslint and prettier are clean on them.
  • Description: example blocks only, with no component or API change. Verified.
  • Description: public text contains no internal context. Verified over the added lines, title, body, branch name and commit messages.
  • File .changeset/block-controls-nav.md: clear.
  • Files TopNavShowcase.tsx, TopNavCenteredNavigation.tsx, TopNavEnterpriseDashboard.tsx: clear, with the optional uniqueID note.
  • Files TopNavMegaMenu.tsx, SideNavWithHeaderMenu.tsx: clear, with the optional href spelling note; the five blocks stay consistent with each other.

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 12b6045 into main Nov 16, 2026
78 checks passed
@github-actions
github-actions Bot deleted the josephfarina/block-controls-nav branch November 17, 2026 06:03

This branch was successfully deployed

1 active deployment
Preview — f533730b 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