Repository navigation
fix(templates): make the hero and gallery call-to-action buttons links - #12036
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 59e4a85 |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
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 startedArrowRightIcondoes not mirror under right-to-left, which the repository's bidirectionality design rule (DR4) requires for a forward icon; addxstyle={rtlStyles.mirror}withimport {rtlStyles} from '@astryxdesign/core/utils';, asgallery-hero/page.tsx:79already does.packages/cli/assets/templates/pages/product-gallery/page.tsx:138: the Get startedArrowRightIconhas 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).
There was a problem hiding this comment.
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.mdstill says "No layout or styling changes" while the Get started arrows incentered-heroandproduct-gallerynow flip in right-to-left, so end the release note with something like "The Get started arrows incentered-heroandproduct-gallerynow point toward the end of the line in right-to-left, as ingallery-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
hrefrenders 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-heroandproduct-gallery, as ingallery-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).
|
/approve-spec 1c0e69c |
There was a problem hiding this comment.
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
hrefButton renders a link. - Claim (changeset): the Get started arrows in
centered-heroandproduct-gallerynow point toward the end of the line in right-to-left, as ingallery-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
hrefrenders 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.
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
hrefrenders 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-017DEC-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 incentered-heroandproduct-gallerynow mirror in right-to-left, as ingallery-hero. Nothing else changes in layout or styling, and there is no component, API or doc change.Design and alternatives
centered-heroandproduct-gallery, as it already did ingallery-hero.Evidence
Scope
Components: templates (centered-hero, gallery-hero, product-gallery, side-gallery)
Testing
tscon the four pages with the repo tsconfig;eslintandprettieron the changed files