Skip to content

Update merch nav dropdown#985

Merged
tannerlinsley merged 1 commit into
mainfrom
taren/nav-merch-dropdown
Jun 15, 2026
Merged

Update merch nav dropdown#985
tannerlinsley merged 1 commit into
mainfrom
taren/nav-merch-dropdown

Conversation

@tannerlinsley

@tannerlinsley tannerlinsley commented Jun 15, 2026

Copy link
Copy Markdown
Member

What changed

  • Point the top-level Merch nav item at /shop.
  • Replace the Merch dropdown with three newest shop products and an All Merch link.
  • Prevent mouse clicks on non-link desktop nav triggers from leaving the menu stuck open via focus.

Validation

  • CI=true pnpm test:tsc
  • Commit hook: pnpm run format && pnpm run test
  • Browser check: Merch renders as /shop link, non-link trigger mouse click does not leave focused dropdown open.

Note: local Shopify products could not render because SHOPIFY_PRIVATE_STOREFRONT_TOKEN is not configured in this dev environment; the shop route reports the same environment error.

Summary by CodeRabbit

  • New Features
    • Introduced a "Merch" section in the navigation menu featuring dynamically loaded recent products with images and pricing
    • Navigation now includes a link to the complete merchandise shop
    • Added loading indicators to provide visual feedback while products load

@coderabbitai

coderabbitai Bot commented Jun 15, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: a4ebc8b0-00e7-4537-92d3-58d332e98421

📥 Commits

Reviewing files that changed from the base of the PR and between dccfc63 and 3d52b84.

📒 Files selected for processing (1)
  • src/components/Navbar.tsx

📝 Walkthrough

Walkthrough

The Navbar's mega-menu gains a dynamic "Merch" section. The merch nav group is updated to route to /shop with no static content. MegaMenuContent branches on group.key === 'merch' to render new MerchMenuContent and MerchProductLink components that fetch, display, and link to recent Shopify products. Desktop nav trigger buttons also gain onMouseDown preventDefault.

Changes

Merch Mega-Menu Feature

Layer / File(s) Summary
Imports and merch nav group config
src/components/Navbar.tsx
Adds ShoppingBag, getProducts, formatMoney, shopifyImageUrl, and ProductListItem imports; updates the merch nav group href to /shop and clears its static sections.
MegaMenuContent merch branch and trigger fix
src/components/Navbar.tsx
Adds group.key === 'merch' conditional in MegaMenuContent to render MerchMenuContent; adds onMouseDown preventDefault to desktop nav trigger buttons.
MerchMenuContent and MerchProductLink
src/components/Navbar.tsx
Implements MerchMenuContent with async product fetch on mount, loading skeletons, unmount cancellation guard, product grid, and "All Merch" link. MerchProductLink renders product image or ShoppingBag fallback and formatted minimum variant price.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • TanStack/tanstack.com#982: Introduced the mega-menu refactor and MegaMenuContent rendering logic that this PR directly extends with the group.key === 'merch' branch.

Poem

🐇 Hop hop, the shop has arrived in the nav,
A grid full of merch, both recent and fab.
With skeletons loading and images bright,
Each product and price rendered just right.
No static links needed — getProducts will do,
The bunny's got swag, and so now do you! 🛍️

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main change: updating the merchandise navigation dropdown component with new product display and navigation improvements.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch taren/nav-merch-dropdown

Comment @coderabbitai help to get the list of available commands and usage tips.

@tannerlinsley tannerlinsley marked this pull request as ready for review June 15, 2026 03:21
@tannerlinsley tannerlinsley merged commit 3cb4b5b into main Jun 15, 2026
9 checks passed
@tannerlinsley tannerlinsley deleted the taren/nav-merch-dropdown branch June 15, 2026 05:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant