feat(templates): add Shell — Top Nav page template#3194
Closed
ernestt wants to merge 6 commits into
Closed
Conversation
…me list) CSS `anchor-name` is a comma-separated list, but `useLayer`'s ref callback set/cleared the whole property — so when two layers anchored to the same element (e.g. two TopNavMegaMenus in one <nav>), each one clobbered the other's anchor. The menu that lost its anchor fell back to the viewport origin and rendered on top of the nav, producing flashing/jumping as the user hovered between triggers. This adds anchor-name list helpers (read/write/add/remove) so each layer appends and removes only its own `anchorId`, leaving sibling layers' anchors intact. Fixes #3190 Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
A storefront app-shell template under the new "Shell" category. Uses AppShell (surface variant) as the root with a TopNav featuring two TopNavMegaMenus (Shop + Brands) — each with a fixed-width 2-column item grid and a featured card — plus Sale/Service items and search/sign-in/ checkout actions. Body is centered skeleton content (hero + category tile lockups). The two mega menus are pinned to identical widths so switching between them produces no layout shift. Relies on the core anchor-name list fix (#3193) so both mega menus can anchor to the same nav. Co-authored-by: Cursor <cursoragent@cursor.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Replace the shimmering Skeleton hero + category tiles with static muted Card placeholders so the loading state doesn't animate. Co-authored-by: Cursor <cursoragent@cursor.com>
cixzhang
requested changes
Jun 27, 2026
cixzhang
left a comment
Contributor
There was a problem hiding this comment.
Same as the other Shell PRs: category: 'Shell - Top Nav' is inert — not a TemplateDoc field (docs-types.ts L636) and generate-data.mjs only extracts name/description/isReady (L688-L691). Please wire it through or drop it.
Separately, this is based on #3193 — worth retargeting to main once that lands so the diff is reviewable on its own.
4 tasks
726616e to
15b14a4
Compare
Add the shell-commerce entry to TEMPLATE_COMPONENTS so the Shell tab in the docsite templates gallery renders its thumbnail and live preview. Co-authored-by: Cursor <cursoragent@cursor.com>
Rename the slug shell-commerce → shell-top-nav, set the display name to "Top Nav", and update the docsite gallery component map. Co-authored-by: Cursor <cursoragent@cursor.com>
3 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds a Top Nav example to the new Shell template category — a top-nav app shell with a fully built-out navigation and a static placeholder body.
AppShell(surface variant) as the root.TopNavwith twoTopNavMegaMenus — Shop and Brands — each a fixed-width 2-column item grid plus aTopNavMegaMenuFeaturedCard, alongsideSale/Serviceitems and search / sign-in / checkout actions.Cardplaceholders (hero banner + repeated category-tile lockups) with whitespace gutters on wide screens.Preview
(Default view; Shop and Brands open mega-menu panels on hover.)
Test plan
tscpasses; lint/format clean.Template Rubric Score
Type: page · File:
packages/cli/templates/pages/shell-top-nav/page.tsx· Grade: A (90/100)AppShell,TopNav*,Grid,Stack,Button,Badge,Card…) plus localMegaItems/MegaFeaturedhelpers.<Icon icon={…}>oricon=props.contentMax(maxWidth + marginInline),megaItems(gridColumn + width),megaFeatured(width). All justified (no Astryx prop for capped/centered body width or fixed mega-panel widths) but the count lands in the 4–10 bracket.AppShellroot for aShell -category;Grid minChildWidthfor the responsive tile grid; single page; inerthref="#"links.type,name,description,isReadyall present (+category).lookaside.facebook.com/assets/astryx/…CDN URLs (no external/placeholder hosts).'use client', default export, self-contained imports, realistic mock data, no dead code.The only deduction is Custom CSS (5/15) — all load-bearing (centered body cap + equal-width mega panels).