Skip to content

fix(templates): make the hero and gallery call-to-action buttons links - #12036

Merged
josephfarina merged 3 commits into
mainfrom
josephfarina/hero-working-links
Nov 16, 2026
Merged

josephfarina merged 3 commits into
mainfrom
josephfarina/hero-working-links

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

User need

Builders copy hero and gallery templates and keep their call-to-action buttons. In four of them, "Get started", "Learn more" and "Explore" did nothing when clicked. A hero's call to action is a link by design, so a copied page should start from a link, not from a button with no behavior.

Problem and solution fit

The call-to-action buttons now take href="#", so they render as links with the same look:

  • centered-hero: Get started, Learn more.
  • gallery-hero: Get started, Learn more.
  • product-gallery: Get started.
  • side-gallery: Explore.

A builder replaces # with the page each one leads to.

Current specification

This rests on Button's link mode (a Button with href renders as a link with the same look), the navigation-destinations family's FR5 (a fragment is an accepted destination that keeps browser behavior), and template source being mutable catalog data (spec:AST-017 DEC-2). # is the templates' placeholder convention for a destination the builder fills in.

Public delta and caller burden

Template source only: six call-to-action buttons across four files gain href="#", and the Get started arrows in centered-hero and product-gallery now mirror in right-to-left, as in gallery-hero. Nothing else changes in layout or styling, and there is no component, API or doc change.

Design and alternatives

  • The forward arrow on Get started now mirrors in right-to-left in centered-hero and product-gallery, as it already did in gallery-hero.
  • Links, not demo toasts. A toast on a marketing link would look wrong to the people the page is for.
  • Rejected: leaving them as buttons with no handler, which teaches a dead control.

Evidence

  • At 1280 px the links render exactly like the buttons did.
  • A build replay over the full set of build ideas moves zero starts, zero alternatives and zero block lists.

Scope

Components: templates (centered-hero, gallery-hero, product-gallery, side-gallery)

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

Testing

  • tsc on the four pages with the repo tsconfig; eslint and prettier on the changed files
  • Sandbox render at 1280 px compared with main

@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 9:48am 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, 9:50 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 59e4a85

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 1c0e69c

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.12 MB packed (+72 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 six call-to-action links work and look exactly like the buttons they replace, but two of the changed pages keep a forward arrow, already there on main, that points backward in right-to-left.

  • packages/cli/assets/templates/pages/centered-hero/page.tsx:57: the Get started ArrowRightIcon does not mirror under right-to-left, which the repository's bidirectionality design rule (DR4) requires for a forward icon; add xstyle={rtlStyles.mirror} with import {rtlStyles} from '@astryxdesign/core/utils';, as gallery-hero/page.tsx:79 already does.
  • packages/cli/assets/templates/pages/product-gallery/page.tsx:138: the Get started ArrowRightIcon has the same missing mirror; apply the same fix.

The description's "Current specification" line is not stated by any current record; the change rests on Button's link mode, the fragment-link rule for navigation destinations, and the release rule that template source is mutable catalog data.

Claims and files checked

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

  • Claim (changeset): the CTAs in the four templates are now links to #. Verified in the diff and in the rendered markup.
  • Claim (changeset): they behave as links instead of doing nothing. Verified: on the base a click changes nothing; on the head it navigates to #.
  • Claim (changeset): no layout or styling changes. Verified: base and head renders of all four pages are pixel-identical at 1280 px.
  • Claim (changeset): a patch release note for @astryxdesign/cli. Verified: the changeset check passes.
  • Claim (description): the CTAs did nothing when clicked. Verified: each was a type="button" Button with no handler.
  • Claim (description): the per-template list of six CTAs. Verified in the diff.
  • Claim (description): template controls either work or state what they stand in for, as current specification. Unsupported: no current record states it.
  • Claim (description): template source only, no layout, styling, component, API or doc change. Verified; the diff also reflows seven string literals through Prettier, with no value change.
  • Claim (description): the build replay moves no starts, alternatives or block lists. Not reproduced: the replay is not in the repository; the template metadata it ranks on is unchanged.
  • Claim (description): ESLint and Prettier pass on the changed files. Verified.
  • File .changeset/hero-working-links.md: clear.
  • File packages/cli/assets/templates/pages/centered-hero/page.tsx: blocking finding at line 57.
  • File packages/cli/assets/templates/pages/gallery-hero/page.tsx: clear (its arrow already mirrors).
  • File packages/cli/assets/templates/pages/product-gallery/page.tsx: blocking finding at line 138.
  • File packages/cli/assets/templates/pages/side-gallery/page.tsx: clear (no directional icon).

Automated review (maintainer link)

@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 six call-to-action links and the two right-to-left arrow fixes are correct, and the earlier right-to-left findings are resolved, but two claims about the change no longer match it.

  • Regression: .changeset/hero-working-links.md still says "No layout or styling changes" while the Get started arrows in centered-hero and product-gallery now flip in right-to-left, so end the release note with something like "The Get started arrows in centered-hero and product-gallery now point toward the end of the line in right-to-left, as in gallery-hero; nothing else changes in layout or styling." and correct the description's "No layout, styling, component, API or doc change" the same way.
  • The description's "Current specification" lists "the rule that a navigation destination a template cannot know is a fragment link (#) the builder replaces" as a current record, but no current record states it, so cite the navigation-destinations family's FR5 (fragments are accepted destinations that keep browser behavior) and describe # as the templates' placeholder convention instead.

Both are text-only edits; the code needs no change.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim (changeset): the call-to-action controls in the four templates are now links to #. Verified in the diff and in the rendered markup.
  • Claim (changeset): they behave as links instead of doing nothing. Verified: on the base a click changes nothing; on the head it goes to #.
  • Claim (changeset): no layout or styling changes. False: the two Get started arrows now mirror in right-to-left.
  • Claim (changeset): a patch release note for the CLI package. Verified: the changeset check passes.
  • Claim (description): the controls did nothing when clicked. Verified: each was a type="button" Button with no handler or destination.
  • Claim (description): the per-template list of six controls. Verified in the diff.
  • Claim (description): a Button with href renders as a link with the same look. Verified by Button's current link-mode clause and pixel-identical left-to-right renders.
  • Claim (description): a current record makes an unknown destination a # link the builder replaces. False: no current record states it.
  • Claim (description): template source is mutable catalog data. Verified by the release record's decision on template source.
  • Claim (description): template source only, with no layout, styling, component, API or doc change. False for styling, as above; the rest verified, and Prettier also reflows seven image-path strings with no value change.
  • Claim (description): the Get started arrow now mirrors in right-to-left in centered-hero and product-gallery, as in gallery-hero. Verified by a right-to-left render.
  • Claim (description): at 1280 px the links render exactly like the buttons did. Verified: pixel-identical.
  • Claim (description): a build replay moves no starts, alternatives or block lists. Verified by inspection: build ranks on template metadata and rendered component tags, which this change leaves unchanged.
  • Claim (description): the scope checklist. Verified: one intent with its right-to-left fix, no internal context; tests and migration do not apply to starter content.
  • Claim (description): TypeScript, ESLint and Prettier pass on the changed files. Verified.
  • File .changeset/hero-working-links.md: blocking finding at line 5.
  • File packages/cli/assets/templates/pages/centered-hero/page.tsx: clear (arrow mirrored).
  • File packages/cli/assets/templates/pages/gallery-hero/page.tsx: clear (arrow mirrored).
  • File packages/cli/assets/templates/pages/product-gallery/page.tsx: clear (arrow mirrored).
  • File packages/cli/assets/templates/pages/side-gallery/page.tsx: clear (no directional icon).

Automated review (maintainer link)

Comment thread .changeset/hero-working-links.md Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 1c0e69c

@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, and the required checks still have to pass.

The six call-to-action links and the two right-to-left arrow fixes match Button's link mode, the navigation-destinations rule for fragment links and the bidirectionality rule for directional icons. Both earlier findings are resolved: the release note now names the mirrored Get started arrows, and the description cites the navigation-destinations rule instead of a record that does not exist.

Claims and files checked

Review mode: incremental; reason: none

  • changed rules (0): none
  • Claim (changeset): the call-to-action controls in the four templates are now links to #. Verified in all six Buttons.
  • Claim (changeset): they behave as links instead of doing nothing. Verified: on the base they have no destination or handler; with href Button renders a link.
  • Claim (changeset): the Get started arrows in centered-hero and product-gallery now point toward the end of the line in right-to-left, as in gallery-hero. Verified: all three arrows use the shared mirror style and flip under a right-to-left ancestor.
  • Claim (changeset): nothing else changes in layout or styling. Verified: left-to-right renders match, and the reflowed image paths keep their values.
  • Claim (changeset): a patch release note for the CLI package. Verified: the changeset check passes.
  • Claim (description): the controls did nothing when clicked. Verified.
  • Claim (description): the per-template list of six controls. Verified in the diff.
  • Claim (description): a Button with href renders as a link with the same look. Verified by Button's current link-mode clause and matching renders.
  • Claim (description): the navigation-destinations family accepts a fragment that keeps browser behavior. Verified against its current clause.
  • Claim (description): template source is mutable catalog data. Verified by the release record's decision on template source.
  • Claim (description): # is the templates' placeholder convention. Verified: many existing templates use it.
  • Claim (description): template source only, with the arrow mirrors and no other layout, styling, component, API or doc change. Verified; Prettier also reflows seven image-path strings with no value change.
  • Claim (description): at 1280 px the links render exactly like the buttons did. Verified.
  • Claim (description): a build replay moves no starts, alternatives or block lists. Verified by inspection: build ranks on template metadata and component tags, which this change leaves unchanged.
  • Claim (description): ESLint and Prettier pass on the changed files, and TypeScript on the four pages. Verified.
  • File .changeset/hero-working-links.md: clear.
  • File packages/cli/assets/templates/pages/centered-hero/page.tsx: clear.
  • File packages/cli/assets/templates/pages/gallery-hero/page.tsx: clear.
  • File packages/cli/assets/templates/pages/product-gallery/page.tsx: clear.
  • File packages/cli/assets/templates/pages/side-gallery/page.tsx: clear.

Automated review (maintainer link)

@josephfarina
josephfarina merged commit ad7e734 into main Nov 16, 2026
78 checks passed
@github-actions
github-actions Bot deleted the josephfarina/hero-working-links branch November 17, 2026 06:03

This branch was successfully deployed

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