Skip to content

Added Product Tour button - #225

Merged
gkhngyk merged 2 commits into
ansvisor:mainfrom
gaoharimran29-glitch:feat/product_tour
Jun 10, 2026
Merged

gkhngyk merged 2 commits into
ansvisor:mainfrom
gaoharimran29-glitch:feat/product_tour

Conversation

@gaoharimran29-glitch

@gaoharimran29-glitch gaoharimran29-glitch commented Jun 10, 2026 •

Copy link
Copy Markdown
Contributor

Add Product Tour button to Brands page header

Fix #194

What changed

Added a Product Tour button to the BrandsHeader component in web/src/app/[locale]/(dashboard)/dashboard/brands/page.tsx.

Details

  • Button is positioned immediately to the left of the Add Brand button in the page header
  • Opens the interactive product tour in a new tab (target="_blank", rel="noopener noreferrer")
  • URL: https://app.supademo.com/demo/cmq2b1p5k0rk9qm6ugicrn655?utm_source=link
  • Renders as an outline/secondary style so Add Brand remains the primary action
  • Always visible regardless of canAddBrand / needsUpgrade state
  • Uses Compass and ExternalLink icons from lucide-react
  • Label: Product Tour

Screenshots

Screenshot 2026-06-10 195447

Notes

  • Button styling follows existing outline conventions; minor theme color variance may be addressed in a follow-up

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Ansvisor, and thank you for your first PR! A maintainer will be by soon to review.

In the meantime, two things that make review faster:

  • A short description of why the change matters, not just what it does — most of our PRs link a Fixes #... to the issue that explains the why.
  • A quick local test note if there's anything worth eyeballing in the browser.

If you'd like to keep an eye on where Ansvisor goes next, a ⭐ on the repo helps others discover it (and Watch sends you a ping when related issues land). Either way — looking forward to your next one.

@gkhngyk

gkhngyk commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Thanks for this! It matches the issue well — correct tour URL with ?utm_source=link, opens in a new tab with rel="noopener noreferrer", sits to the left of Add Brand, stays visible in all states, and keeps Add Brand as the primary action. Two things before it can go in:

1. Required — formatting will fail CI

web — format, lint & typecheck runs prettier --check, and the current diff won't pass:

  • The import has spaces around the commas: { Crown, Plus , Compass , ExternalLink } → should be { Crown, Plus, Compass, ExternalLink }.
  • The new <a> / wrapper <div> block is under-indented (the <a> should be nested one level deeper inside the flex div).

Easiest fix — run yarn format (or npx prettier --write) on the file and commit.

2. Recommended — reuse buttonVariants instead of hand-copying button classes

The long className on the <a> is essentially a hand-copied duplicate of the Button styles, which will drift over time. The repo already exports buttonVariants from @/components/ui/button (it has outline and sm), so you can keep it in sync with the design system:

import { buttonVariants } from '@/components/ui/button';

<a
  href="https://app.supademo.com/demo/cmq2b1p5k0rk9qm6ugicrn655?utm_source=link"
  target="_blank"
  rel="noopener noreferrer"
  className={buttonVariants({ variant: 'outline', size: 'sm' })}
>
  <Compass className="h-4 w-4" />
  Product Tour
  <ExternalLink className="h-4 w-4 opacity-50" />
</a>

That also resolves the "minor theme color variance" you noted, since it uses the exact outline tokens.

Once formatting passes and the button uses buttonVariants, this is good to merge. Thanks again! 🙌

@gaoharimran29-glitch

Copy link
Copy Markdown
Contributor Author

Hi @gkhngyk , I've addressed both the formatting and buttonVariants feedback. Ready for re-review when you get a chance!"

@gkhngyk
gkhngyk merged commit 130ab8e into ansvisor:main Jun 10, 2026
2 checks passed
@gkhngyk

gkhngyk commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

Merged — thanks for the quick turnaround! Clean use of buttonVariants({ variant: 'outline', size: 'sm' }), formatting passes, and the Product Tour button sits right where #194 asked. Nice contribution! 🙌

gkhngyk added a commit that referenced this pull request Jun 11, 2026
The brands page is a Server Component but called buttonVariants() (for the
Product Tour link added in #225). buttonVariants was exported from button.tsx,
which is a 'use client' module, so the export became a client reference and
threw at render: 'Attempted to call buttonVariants() from the server but
buttonVariants is on the client.'

Move the cva definition into its own non-client module
(components/ui/button-variants.ts) and import buttonVariants into the brands
page from there. button.tsx re-exports it unchanged, so the 6 existing client
callers keep working with no change.
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.

feat(brands): add a Product Tour button next to Add Brand

2 participants