Skip to content

Open source alternative to Semrush and Ahrefs

Port onboarding and subscribe to shadcn (EVE-306) (#757)

Carter Smith89d2229ad029
diff --git a/src/client/components/ThemePreferenceMenuItems.tsx b/src/client/components/ThemePreferenceMenuItems.tsx
index c7a6c82d..eb504ab9 100644
--- a/src/client/components/ThemePreferenceMenuItems.tsx
+++ b/src/client/components/ThemePreferenceMenuItems.tsx
@@ -1,6 +1,12 @@
import type { ReactNode } from "react";
import { Monitor, Moon, Sun } from "lucide-react";
import { SegmentedToggle } from "@/client/components/SegmentedToggle";
+import {
+ DropdownMenuLabel,
+ DropdownMenuGroup,
+ DropdownMenuRadioGroup,
+ DropdownMenuRadioItem,
+} from "@/client/components/ui/dropdown-menu";
import { type ThemePreference, useThemePreference } from "@/client/lib/theme";
const THEME_OPTIONS: {
@@ -39,3 +45,26 @@ export function ThemePreferenceMenuItems() {
</>
);
}
+
+export function ThemePreferenceDropdownItems() {
+ const { themePreference, setThemePreference } = useThemePreference();
+
+ return (
+ <DropdownMenuGroup>
+ <DropdownMenuLabel>Theme</DropdownMenuLabel>
+ <DropdownMenuRadioGroup
+ value={themePreference}
+ onValueChange={(value) => {
+ const option = THEME_OPTIONS.find((item) => item.value === value);
+ if (option) setThemePreference(option.value);
+ }}
+ >
+ {THEME_OPTIONS.map(({ value, label, icon }) => (
+ <DropdownMenuRadioItem key={value} value={value}>
+ {icon} {label}
+ </DropdownMenuRadioItem>
+ ))}
+ </DropdownMenuRadioGroup>
+ </DropdownMenuGroup>
+ );
+}
diff --git a/src/client/features/ai-mcp/AgentSetup.tsx b/src/client/features/ai-mcp/AgentSetup.tsx
index 487dc93d..eea531d6 100644
--- a/src/client/features/ai-mcp/AgentSetup.tsx
+++ b/src/client/features/ai-mcp/AgentSetup.tsx
@@ -1,8 +1,8 @@
-import { ArrowLeft, ArrowRight } from "lucide-react";
import { AgentList } from "./AgentList";
import { AgentSetupPanel, AGENT_SETUP_DESCRIPTION } from "./AgentSetupPanel";
import { getAgentSetupPrompt } from "./agentSetupPrompt";
import { captureClientEvent } from "@/client/lib/posthog";
+import { WizardFooter } from "@/client/features/onboarding/WizardFooter";
export function AgentSetup({
onComplete,
@@ -21,7 +21,7 @@ export function AgentSetup({
<h1 className="text-2xl font-semibold tracking-tight">
Set up your agent
</h1>
- <p className="mt-3 text-pretty text-sm leading-relaxed text-base-content/60">
+ <p className="mt-3 text-pretty text-sm leading-relaxed text-muted-foreground">
{AGENT_SETUP_DESCRIPTION}
</p>
<AgentList />
@@ -30,21 +30,13 @@ export function AgentSetup({
prompt={prompt}
onCopy={() => captureClientEvent("onboarding:setup_prompt_copy")}
/>
- <div className="mt-7 flex items-center justify-between gap-3 border-t border-base-300 pt-5">
- <button
- type="button"
- className="flex min-h-10 items-center gap-1.5 text-xs text-base-content/60 hover:text-base-content"
- onClick={onBack}
- >
- <ArrowLeft className="size-3.5" /> Back
- </button>
- <button
- type="button"
- className="btn btn-ghost btn-sm gap-2"
- onClick={onComplete}
- >
- Finish <ArrowRight className="size-4" />
- </button>
+ <div className="mt-7 border-t border-border pt-5">
+ <WizardFooter
+ onBack={onBack}
+ onContinue={onComplete}
+ continueLabel="Finish"
+ continueDisabled={disabled}
+ />
</div>
</fieldset>
);
diff --git a/src/client/features/ai-mcp/AgentSetupPanel.tsx b/src/client/features/ai-mcp/AgentSetupPanel.tsx
index 2f1ba5c2..85b1221f 100644
--- a/src/client/features/ai-mcp/AgentSetupPanel.tsx
+++ b/src/client/features/ai-mcp/AgentSetupPanel.tsx
@@ -13,14 +13,14 @@ export function AgentSetupPanel({
}) {
return (
<>
- <div className="rounded-xl border border-base-300 bg-base-200/25 p-5">
+ <div className="rounded-xl border border-border bg-muted/25 p-5">
<div className="mb-5 flex items-center gap-3">
- <span className="flex size-10 shrink-0 items-center justify-center rounded-lg border border-base-300 bg-base-100">
- <Package className="size-5 text-base-content/70" />
+ <span className="flex size-10 shrink-0 items-center justify-center rounded-lg border border-border bg-background">
+ <Package className="size-5 text-muted-foreground" />
</span>
<div>
<p className="text-sm font-medium">OpenSEO plugin</p>
- <p className="mt-1 text-xs text-base-content/55">
+ <p className="mt-1 text-xs text-muted-foreground">
MCP connection + SEO skills
</p>
</div>
@@ -40,7 +40,7 @@ export function AgentSetupPanel({
href="https://openseo.so/docs/agent-setup"
target="_blank"
rel="noreferrer"
- className="text-xs text-base-content/60 underline decoration-base-content/25 underline-offset-4 hover:text-base-content"
+ className="text-xs text-muted-foreground underline decoration-muted-foreground/25 underline-offset-4 hover:text-foreground"
>
Manual setup
</a>
diff --git a/src/client/features/billing/PlanOfferCard.tsx b/src/client/features/billing/PlanOfferCard.tsx
index 924b9aac..78d1b0e5 100644
--- a/src/client/features/billing/PlanOfferCard.tsx
+++ b/src/client/features/billing/PlanOfferCard.tsx
@@ -1,5 +1,11 @@
import type { ReactNode } from "react";
import type { PlanOffer } from "@/client/features/billing/plan-offers";
+import { Card, CardContent } from "@/client/components/ui/card";
+import {
+ Tooltip,
+ TooltipContent,
+ TooltipTrigger,
+} from "@/client/components/ui/tooltip";
import { SUPPORT_EMAIL } from "@/client/lib/support";
// Shared card for the full-page checkout screens (/subscribe, /yc). Callers
@@ -16,39 +22,45 @@ export function PlanOfferCard({
children: ReactNode;
}) {
return (
- <div className="rounded-lg border border-base-300 p-5 space-y-4">
- <div className="flex items-baseline justify-between gap-4">
- <span className="font-semibold">{offer.name}</span>
- <span className="text-lg font-semibold tabular-nums">
- ${offer.priceUsd}/month
- </span>
- </div>
+ <Card>
+ <CardContent className="space-y-4">
+ <div className="flex items-baseline justify-between gap-4">
+ <span className="font-semibold">{offer.name}</span>
+ <span className="text-lg font-semibold tabular-nums">
+ ${offer.priceUsd}/month
+ </span>
+ </div>
- <ul className="space-y-2">
- {features.map((item) => (
- <li key={item} className="flex gap-2.5 text-sm text-base-content/70">
- <span className="text-base-content/40 mt-[2px] shrink-0">
- &mdash;
- </span>
- {item}
- </li>
- ))}
- {afterFeatures}
- </ul>
+ <ul className="space-y-2">
+ {features.map((item) => (
+ <li
+ key={item}
+ className="flex gap-2.5 text-sm text-muted-foreground"
+ >
+ <span className="text-muted-foreground/60 mt-[2px] shrink-0">
+ &mdash;
+ </span>
+ {item}
+ </li>
+ ))}
+ {afterFeatures}
+ </ul>
- {children}
+ {children}
- <p className="text-center text-xs text-base-content/50">
- <span
- className="tooltip before:max-w-60 before:whitespace-normal"
- data-tip={`Not for you yet? Email ${SUPPORT_EMAIL} within 30 days of your charge and we'll refund your subscription.`}
- >
- <span className="cursor-help underline decoration-dotted">
- 30-day money-back guarantee
- </span>
- </span>
- . Cancel anytime. Powered by Stripe.
- </p>
- </div>
+ <p className="text-center text-xs text-muted-foreground">
+ <Tooltip>
+ <TooltipTrigger className="cursor-help underline decoration-dotted">
+ 30-day money-back guarantee
+ </TooltipTrigger>
+ <TooltipContent>
+ Not for you yet? Email {SUPPORT_EMAIL} within 30 days of your
+ charge and we'll refund your subscription.
+ </TooltipContent>
+ </Tooltip>
+ . Cancel anytime. Powered by Stripe.
+ </p>
+ </CardContent>
+ </Card>
);
}
diff --git a/src/client/features/billing/PlanPageAccountMenu.tsx b/src/client/features/billing/PlanPageAccountMenu.tsx
index 859f49a0..be683b83 100644
--- a/src/client/features/billing/PlanPageAccountMenu.tsx
+++ b/src/client/features/billing/PlanPageAccountMenu.tsx
@@ -1,53 +1,56 @@
import { Link } from "@tanstack/react-router";
import { Settings, User } from "lucide-react";
-import { ThemePreferenceMenuItems } from "@/client/components/ThemePreferenceMenuItems";
+import { ThemePreferenceDropdownItems } from "@/client/components/ThemePreferenceMenuItems";
+import { Button } from "@/client/components/ui/button";
+import {
+ DropdownMenu,
+ DropdownMenuContent,
+ DropdownMenuGroup,
+ DropdownMenuItem,
+ DropdownMenuLabel,
+ DropdownMenuSeparator,
+ DropdownMenuTrigger,
+} from "@/client/components/ui/dropdown-menu";
import { signOutAndRedirect } from "@/lib/auth-client";
-// Account dropdown for the standalone plan pages (/subscribe, /yc), which
-// render outside the app shell and so have no other way to sign out.
+// Shared account menu for onboarding and standalone plan pages.
export function PlanPageAccountMenu({ email }: { email: string | undefined }) {
if (!email) return null;
- const handleSignOut = () => signOutAndRedirect();
-
return (
- <div className="fixed top-4 right-4">
- <div className="dropdown dropdown-end">
- <button
- type="button"
- tabIndex={0}
- className="btn btn-ghost btn-circle"
- aria-label="Open account menu"
- >
- <User className="h-5 w-5" />
- </button>
- <ul
- tabIndex={0}
- className="dropdown-content z-20 menu mt-3 min-w-56 rounded-box border border-base-300 bg-base-100 p-2 shadow-lg"
+ <div className="fixed top-4 right-4 z-20">
+ <DropdownMenu>
+ <DropdownMenuTrigger
+ render={
+ <Button
+ variant="ghost"
+ size="icon-lg"
+ aria-label="Open account menu"
+ />
+ }
>
- <li className="menu-title max-w-full">
- <span className="truncate text-base-content" data-ph-mask>
+ <User className="size-5" />
+ </DropdownMenuTrigger>
+ <DropdownMenuContent align="end" className="w-56">
+ <DropdownMenuGroup>
+ <DropdownMenuLabel className="truncate" data-ph-mask>
{email}
- </span>
- </li>
- <li>
- <Link to="/settings" className="flex items-center gap-2">
- <Settings className="h-4 w-4" />
- Settings
- </Link>
- </li>
- <ThemePreferenceMenuItems />
- <li>
- <button
- type="button"
- className="text-error"
- onClick={handleSignOut}
- >
- Sign out
- </button>
- </li>
- </ul>
- </div>
+ </DropdownMenuLabel>
+ </DropdownMenuGroup>
+ <DropdownMenuItem render={<Link to="/settings" />}>
+ <Settings className="size-4" /> Settings
+ </DropdownMenuItem>
+ <DropdownMenuSeparator />
+ <ThemePreferenceDropdownItems />
+ <DropdownMenuSeparator />
+ <DropdownMenuItem
+ variant="destructive"
+ onClick={() => signOutAndRedirect()}
+ >
+ Sign out
+ </DropdownMenuItem>
+ </DropdownMenuContent>
+ </DropdownMenu>
</div>
);
}
diff --git a/src/client/features/integrations/GoogleConnectionCard.tsx b/src/client/features/integrations/GoogleConnectionCard.tsx
index b5be4be7..4d730aed 100644
--- a/src/client/features/integrations/GoogleConnectionCard.tsx
+++ b/src/client/features/integrations/GoogleConnectionCard.tsx
@@ -2,6 +2,9 @@ import * as React from "react";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
import { toast } from "sonner";
import { Badge } from "@/client/components/ui/badge";
+import { Button } from "@/client/components/ui/button";
+import { Skeleton } from "@/client/components/ui/skeleton";
+import { QueryError } from "@/client/components/QueryState";
import { CardShell } from "@/client/components/CardShell";
import { PermissionHint } from "@/client/components/PermissionHint";
import { GoogleConnectedState } from "@/client/features/integrations/GoogleConnectedState";
@@ -126,14 +129,15 @@ export function GoogleConnectionCard({
const changingConnection =
setPropertyMutation.isPending || disconnectMutation.isPending || linking;
const dismissButton = onDismiss ? (
- <button
+ <Button
type="button"
- className="btn btn-ghost btn-sm text-base-content/60"
+ variant="ghost"
+ size="sm"
onClick={onDismiss}
disabled={dismissing || changingConnection}
>
Dismiss
- </button>
+ </Button>
) : null;
const handleConnect = () => void linkAccount(window.location.href);
const startPicking = () => {
@@ -161,24 +165,18 @@ export function GoogleConnectionCard({
<div
role="status"
aria-label="Loading connection"
- className="space-y-3 animate-pulse"
+ className="space-y-3"
>
- <div className="h-4 w-2/3 rounded bg-base-200" />
- <div className="h-9 w-24 rounded bg-base-200" />
+ <Skeleton className="h-4 w-2/3" />
+ <Skeleton className="h-9 w-24" />
</div>
) : connectionUnavailable ? (
- <div role="alert" className="space-y-3 text-sm">
- <p className="text-error">
- Couldn't check this project's connection.
- </p>
- <button
- type="button"
- className="btn btn-ghost btn-sm"
- onClick={() => void connectionQuery.refetch()}
- >
- Try again
- </button>
- </div>
+ <QueryError
+ error={connectionQuery.error}
+ fallback="Couldn't check this project's connection."
+ onRetry={() => void connectionQuery.refetch()}
+ isRetrying={connectionQuery.isFetching}
+ />
) : needsGoogleOAuthSetup ? (
<div className="space-y-3">
<GoogleOAuthSetupWarning
@@ -242,7 +240,7 @@ export function GoogleConnectionCard({
</GoogleProjectEmptyState>
)}
{setPropertyMutation.isError || disconnectMutation.isError ? (
- <p role="alert" className="mt-3 text-sm text-error">
+ <p role="alert" className="mt-3 text-sm text-destructive">
{getStandardErrorMessage(
setPropertyMutation.error ?? disconnectMutation.error,
)}
diff --git a/src/client/features/integrations/googleSetupState.test.ts b/src/client/features/integrations/googleSetupState.test.ts
index 465a6c90..18bb9eae 100644
--- a/src/client/features/integrations/googleSetupState.test.ts
+++ b/src/client/features/integrations/googleSetupState.test.ts
@@ -125,6 +125,6 @@ describe("onboarding connection actions", () => {
expect(html).toContain("Couldn&#x27;t check your Google connection.");
expect(html).toContain("Try again");
expect(html).not.toContain("Choose property");
- expect(html).toMatch(/disabled="">Save and continue<\/button>/);
+ expect(html).toMatch(/disabled=""[^>]*>Save and continue/);
});
});
diff --git a/src/client/features/onboarding/OnboardingAccountMenu.tsx b/src/client/features/onboarding/OnboardingAccountMenu.tsx
deleted file mode 100644
index cc16ee49..00000000
--- a/src/client/features/onboarding/OnboardingAccountMenu.tsx
+++ /dev/null
@@ -1,53 +0,0 @@
-import { Settings, User } from "lucide-react";
-import { ThemePreferenceMenuItems } from "@/client/components/ThemePreferenceMenuItems";
-import { signOutAndRedirect } from "@/lib/auth-client";
-
-// Account dropdown for the onboarding wizard so a signed-in user can reach
-// Settings / theme / sign out from it. Fixed top-right; renders nothing until
-// we know the user's email.
-export function OnboardingAccountMenu({
- email,
-}: {
- email: string | undefined;
-}) {
- if (!email) return null;
-
- const handleSignOut = () => signOutAndRedirect();
-
- return (
- <div className="fixed top-4 right-4">
- <div className="dropdown dropdown-end">
- <button
- type="button"
- tabIndex={0}
- className="btn btn-ghost btn-circle"
- aria-label="Open account menu"
- >
- <User className="h-5 w-5" />
- </button>
- <ul
- tabIndex={0}
- className="dropdown-content z-20 menu mt-3 min-w-56 rounded-box border border-base-300 bg-base-100 p-2 shadow-lg"
- >
- <li className="menu-title max-w-full">
- <span className="truncate text-base-content" data-ph-mask>
- {email}
- </span>
- </li>
- <li>
- <a href="/settings" className="flex items-center gap-2">
- <Settings className="h-4 w-4" />
- Settings
- </a>
- </li>
- <ThemePreferenceMenuItems />
- <li>
- <button type="button" onClick={handleSignOut}>
- Sign out
- </button>
- </li>
- </ul>
- </div>
- </div>
- );
-}
diff --git a/src/client/features/onboarding/OnboardingCard.tsx b/src/client/features/onboarding/OnboardingCard.tsx
index 6ca1a1f1..b7df2517 100644
--- a/src/client/features/onboarding/OnboardingCard.tsx
+++ b/src/client/features/onboarding/OnboardingCard.tsx
@@ -1,4 +1,5 @@
import type { ReactNode } from "react";
+import { Card, CardContent } from "@/client/components/ui/card";
export function OnboardingCard({
step,
@@ -15,25 +16,27 @@ export function OnboardingCard({
<img src="/transparent-logo.png" alt="" className="size-7" />
OpenSEO
</div>
- <main className="mt-8 rounded-2xl border border-base-300 bg-base-100 p-6 shadow-sm md:mt-12 md:p-10">
- <div
- className="mb-8 flex gap-2"
- role="progressbar"
- aria-label="Onboarding progress"
- aria-valuemin={1}
- aria-valuemax={total}
- aria-valuenow={step}
- aria-valuetext={`Step ${step} of ${total}`}
- >
- {Array.from({ length: total }, (_, index) => (
- <span
- key={index}
- className={`h-1 flex-1 rounded-full ${index < step ? "bg-primary" : "bg-base-300"}`}
- />
- ))}
- </div>
- {children}
- </main>
+ <Card role="main" className="mt-8 md:mt-12">
+ <CardContent className="p-6 md:p-10">
+ <div
+ className="mb-8 flex gap-2"
+ role="progressbar"
+ aria-label="Onboarding progress"
+ aria-valuemin={1}
+ aria-valuemax={total}
+ aria-valuenow={step}
+ aria-valuetext={`Step ${step} of ${total}`}
+ >
+ {Array.from({ length: total }, (_, index) => (
+ <span
+ key={index}
+ className={`h-1 flex-1 rounded-full ${index < step ? "bg-primary" : "bg-muted"}`}
+ />
+ ))}
+ </div>
+ {children}
+ </CardContent>
+ </Card>
</div>
);
}
diff --git a/src/client/features/onboarding/PostSignupOnboarding.tsx b/src/client/features/onboarding/PostSignupOnboarding.tsx
index f3c077bc..b6c5416c 100644
--- a/src/client/features/onboarding/PostSignupOnboarding.tsx
+++ b/src/client/features/onboarding/PostSignupOnboarding.tsx
@@ -1,5 +1,5 @@
import { OnboardingCard } from "./OnboardingCard";
-import { ArrowLeft, ArrowRight, Check } from "lucide-react";
+import { Check } from "lucide-react";
import type { ReactNode } from "react";
import { Fragment } from "react";
import {
@@ -14,6 +14,9 @@ import {
} from "@/client/features/onboarding/onboardingModel";
import { AgentSetup } from "@/client/features/ai-mcp/AgentSetup";
import { SearchConsoleOnboardingStep } from "@/client/features/onboarding/SearchConsoleOnboardingStep";
+import { WizardFooter } from "@/client/features/onboarding/WizardFooter";
+import { Input } from "@/client/components/ui/input";
+import { Toggle } from "@/client/components/ui/toggle";
type PostSignupOnboardingProps = {
step: number;
@@ -116,44 +119,12 @@ export function PostSignupOnboarding({
)}
{step < 3 && (
- <div className="mt-8 flex items-center justify-between gap-3">
- {step > 0 ? (
- <button
- type="button"
- className="flex min-h-10 items-center gap-1.5 text-xs text-base-content/60 hover:text-base-content"
- onClick={onBack}
- >
- <ArrowLeft className="size-3.5" /> Back
- </button>
- ) : (
- <button
- type="button"
- className="btn btn-ghost"
- onClick={onSkip}
- >
- Skip
- </button>
- )}
- <div className="flex items-center gap-2">
- {step > 0 && (
- <button
- type="button"
- className="btn btn-ghost btn-sm text-base-content/55"
- onClick={onSkip}
- >
- Skip
- </button>
- )}
- <button
- type="button"
- className="btn btn-primary"
- disabled={!canContinue || isSaving}
- onClick={onNext}
- >
- Continue <ArrowRight className="size-4" />
- </button>
- </div>
- </div>
+ <WizardFooter
+ onBack={step > 0 ? onBack : undefined}
+ onSkip={onSkip}
+ onContinue={onNext}
+ continueDisabled={!canContinue || isSaving}
+ />
)}
</fieldset>
</OnboardingCard>
@@ -194,7 +165,7 @@ function OnboardingChoiceGroup({
<div className="mb-8">
<h1 className="text-2xl font-semibold tracking-tight">{title}</h1>
{description ? (
- <p className="mt-3 text-sm leading-relaxed text-base-content/60">
+ <p className="mt-3 text-sm leading-relaxed text-muted-foreground">
{description}
</p>
) : null}
@@ -207,22 +178,22 @@ function OnboardingChoiceGroup({
return (
<Fragment key={option}>
- <button
- type="button"
- className={`flex min-h-11 items-center gap-3 rounded-full border px-4 py-2.5 text-left text-sm transition-colors focus-visible:outline-2 focus-visible:outline-primary ${selected ? "border-primary bg-primary/5 text-primary" : "border-base-300 hover:bg-base-200"} disabled:cursor-not-allowed disabled:opacity-35`}
- aria-pressed={selected}
+ <Toggle
+ variant="outline"
+ pressed={selected}
+ className={`min-h-11 gap-3 rounded-full px-4 py-2.5 text-left ${selected ? "border-primary bg-primary/5 text-primary" : "border-border"}`}
disabled={disabled}
- onClick={() => onToggle(option)}
+ onPressedChange={() => onToggle(option)}
>
<span
- className={`flex size-4 shrink-0 items-center justify-center border ${multiple ? "rounded" : "rounded-full"} ${selected ? "border-primary bg-primary text-primary-content" : "border-base-content/30"}`}
+ className={`flex size-4 shrink-0 items-center justify-center border ${multiple ? "rounded" : "rounded-full"} ${selected ? "border-primary bg-primary text-primary-foreground" : "border-muted-foreground/30"}`}
>
{selected && <Check className="size-3" />}
</span>
<span className="capitalize">
{ONBOARDING_OPTION_LABELS[option] ?? option}
</span>
- </button>
+ </Toggle>
{selected && option === CLIENT_WORK_FOR ? followUp : null}
</Fragment>
@@ -231,9 +202,9 @@ function OnboardingChoiceGroup({
</div>
{isOtherSelected ? (
- <input
+ <Input
type="text"
- className="input input-bordered mt-4 w-full"
+ className="mt-4"
aria-label={multiple ? "Other tasks" : "Other answer"}
placeholder={multiple ? "Tell us what else..." : "Tell us more..."}
value={otherValue}
@@ -252,8 +223,8 @@ function ClientWebsiteCountPicker({
onChange: (value: string) => void;
}) {
return (
- <div className="w-full rounded-lg border border-base-300 bg-base-200/40 p-4">
- <p className="text-sm text-base-content/70">
+ <div className="w-full rounded-lg border border-border bg-muted/40 p-4">
+ <p className="text-sm text-muted-foreground">
About how many client sites do you work on?
</p>
<div className="mt-2 flex flex-wrap gap-2">
@@ -261,19 +232,15 @@ function ClientWebsiteCountPicker({
const selected = value === option;
return (
- <button
+ <Toggle
key={option}
- type="button"
- className={`rounded-md border px-3 py-1.5 text-sm transition-colors ${
- selected
- ? "border-base-content bg-base-200 text-base-content"
- : "border-base-300 text-base-content/75 hover:border-base-content/40 hover:bg-base-200/60"
- }`}
- aria-pressed={selected}
- onClick={() => onChange(selected ? "" : option)}
+ variant="outline"
+ pressed={selected}
+ className="rounded-md"
+ onPressedChange={() => onChange(selected ? "" : option)}
>
{option}
- </button>
+ </Toggle>
);
})}
</div>
diff --git a/src/client/features/onboarding/SearchConsoleOnboardingStep.tsx b/src/client/features/onboarding/SearchConsoleOnboardingStep.tsx
index 1591f5fd..1a4f707e 100644
--- a/src/client/features/onboarding/SearchConsoleOnboardingStep.tsx
+++ b/src/client/features/onboarding/SearchConsoleOnboardingStep.tsx
@@ -1,7 +1,7 @@
import * as React from "react";
import { projectsQueryOptions } from "@/client/features/projects/projectQueries";
import { useMutation, useQuery, useQueryClient } from "@tanstack/react-query";
-import { ArrowLeft, ArrowRight, Check } from "lucide-react";
+import { Check } from "lucide-react";
import { GoogleGlyph } from "@/client/features/gsc/GoogleGlyph";
import { QueryError } from "@/client/components/QueryState";
import { Spinner } from "@/client/components/Spinner";
@@ -19,6 +19,9 @@ import {
useGoogleLinkPending,
} from "@/client/features/integrations/startGoogleLink";
import { captureClientEvent } from "@/client/lib/posthog";
+import { Button } from "@/client/components/ui/button";
+import { Spinner as SpinnerIcon } from "@/client/components/ui/spinner";
+import { WizardFooter } from "@/client/features/onboarding/WizardFooter";
const GRANT_STATUS_KEY = ["gscGrantStatus"];
@@ -44,7 +47,7 @@ export function SearchConsoleOnboardingStep(props: NavigationProps) {
<h1 className="text-2xl font-semibold tracking-tight">
Connect Google Search Console now?
</h1>
- <p className="mt-3 text-sm leading-relaxed text-base-content/60">
+ <p className="mt-3 text-sm leading-relaxed text-muted-foreground">
Bring your real clicks and queries into OpenSEO and your AI agent. You
can also do this later from the dashboard.
</p>
@@ -64,7 +67,12 @@ export function SearchConsoleOnboardingStep(props: NavigationProps) {
) : (
<Spinner size="sm" label="Checking…" />
)}
- <StepNavigation {...props} />
+ <WizardFooter
+ onBack={props.onBack}
+ onSkip={props.onSkip}
+ skipLabel="Skip for now"
+ continueLabel="Save and continue"
+ />
</>
)}
</div>
@@ -148,7 +156,7 @@ function GscConnect({
<span className="flex size-6 shrink-0 items-center justify-center rounded-full bg-success/20 text-success">
<Check className="size-3.5" />
</span>
- <span className="text-base-content/80">
+ <span className="text-foreground/80">
Connected to{" "}
<span className="font-mono">{connection?.property}</span>.
</span>
@@ -170,11 +178,11 @@ function GscConnect({
}
saveLabel="Save and continue"
renderActions={(saveButton) => (
- <StepNavigation
- onNext={onNext}
+ <WizardFooter
onBack={onBack}
onSkip={onSkip}
- saveAction={saveButton}
+ skipLabel="Skip for now"
+ continueAction={saveButton}
/>
)}
saving={setSiteMutation.isPending}
@@ -182,72 +190,32 @@ function GscConnect({
onReconnect={handleConnect}
/>
) : (
- <button
+ <Button
type="button"
+ variant="outline"
onClick={handleConnect}
disabled={linking}
aria-busy={linking}
- className="inline-flex items-center gap-2.5 rounded-lg border border-base-300 bg-base-100 px-4 py-2.5 text-sm font-semibold text-base-content shadow-sm transition hover:bg-base-200 hover:shadow focus-visible:outline-2 focus-visible:outline-primary"
>
{linking ? (
- <span className="loading loading-spinner loading-xs" />
+ <SpinnerIcon />
) : (
<GoogleGlyph className="size-[18px]" />
)}
{linking ? "Opening Google…" : "Connect with Google"}
- </button>
+ </Button>
)}
</div>
)}
{!showPicker && (
- <StepNavigation
- connected={connected}
- onNext={onNext}
+ <WizardFooter
onBack={onBack}
- onSkip={onSkip}
+ onSkip={connected ? undefined : onSkip}
+ skipLabel="Skip for now"
+ onContinue={connected ? onNext : undefined}
+ continueLabel={connected ? "Continue" : "Save and continue"}
/>
)}
</fieldset>
);
}
-
-function StepNavigation({
- connected = false,
- onNext,
- onBack,
- onSkip,
- saveAction,
-}: NavigationProps & { connected?: boolean; saveAction?: React.ReactNode }) {
- return (
- <div className="mt-8 flex items-center justify-between gap-3">
- <button
- type="button"
- className="flex min-h-10 items-center gap-1.5 text-xs text-base-content/60 hover:text-base-content"
- onClick={onBack}
- >
- <ArrowLeft className="size-3.5" /> Back
- </button>
- <div className="flex items-center gap-2">
- {connected ? (
- <button type="button" className="btn btn-primary" onClick={onNext}>
- Continue <ArrowRight className="size-4" />
- </button>
- ) : (
- <button
- type="button"
- className="btn btn-ghost btn-sm text-base-content/55"
- onClick={onSkip}
- >
- Skip for now
- </button>
- )}
- {!connected &&
- (saveAction ?? (
- <button type="button" className="btn btn-primary btn-sm" disabled>
- Save and continue
- </button>
- ))}
- </div>
- </div>
- );
-}
diff --git a/src/client/features/onboarding/WizardFooter.tsx b/src/client/features/onboarding/WizardFooter.tsx
new file mode 100644
index 00000000..054811df
--- /dev/null
+++ b/src/client/features/onboarding/WizardFooter.tsx
@@ -0,0 +1,51 @@
+import type { ReactNode } from "react";
+import { ArrowLeft, ArrowRight } from "lucide-react";
+import { Button } from "@/client/components/ui/button";
+
+export function WizardFooter({
+ onBack,
+ onSkip,
+ skipLabel = "Skip",
+ onContinue,
+ continueLabel = "Continue",
+ continueDisabled = false,
+ continueAction,
+}: {
+ onBack?: () => void;
+ onSkip?: () => void;
+ skipLabel?: string;
+ onContinue?: () => void;
+ continueLabel?: string;
+ continueDisabled?: boolean;
+ continueAction?: ReactNode;
+}) {
+ return (
+ <div className="mt-8 flex items-center justify-between gap-3">
+ {onBack ? (
+ <Button type="button" variant="ghost" onClick={onBack}>
+ <ArrowLeft className="size-4" /> Back
+ </Button>
+ ) : onSkip ? (
+ <Button type="button" variant="ghost" onClick={onSkip}>
+ {skipLabel}
+ </Button>
+ ) : null}
+ <div className="flex items-center gap-2">
+ {onBack && onSkip ? (
+ <Button type="button" variant="ghost" size="sm" onClick={onSkip}>
+ {skipLabel}
+ </Button>
+ ) : null}
+ {continueAction ?? (
+ <Button
+ type="button"
+ onClick={onContinue}
+ disabled={continueDisabled || !onContinue}
+ >
+ {continueLabel} <ArrowRight className="size-4" />
+ </Button>
+ )}
+ </div>
+ </div>
+ );
+}
diff --git a/src/routes/_authenticated.onboarding.index.tsx b/src/routes/_authenticated.onboarding.index.tsx
index 6552dc77..fcc60418 100644
--- a/src/routes/_authenticated.onboarding.index.tsx
+++ b/src/routes/_authenticated.onboarding.index.tsx
@@ -1,7 +1,7 @@
import { useMutation, useSuspenseQuery } from "@tanstack/react-query";
import { createFileRoute, redirect, useNavigate } from "@tanstack/react-router";
import { useState } from "react";
-import { OnboardingAccountMenu } from "@/client/features/onboarding/OnboardingAccountMenu";
+import { PlanPageAccountMenu } from "@/client/features/billing/PlanPageAccountMenu";
import { PostSignupOnboarding } from "@/client/features/onboarding/PostSignupOnboarding";
import {
buildOnboardingPayload,
@@ -132,7 +132,7 @@ function OnboardingFlow({
onSkip={handleSkip}
onFinish={handleFinish}
isSaving={saveMutation.isPending}
- accountMenu={<OnboardingAccountMenu email={email} />}
+ accountMenu={<PlanPageAccountMenu email={email} />}
/>
);
}
diff --git a/src/routes/_authenticated.subscribe.tsx b/src/routes/_authenticated.subscribe.tsx
index 8c5c84d8..a786f6f8 100644
--- a/src/routes/_authenticated.subscribe.tsx
+++ b/src/routes/_authenticated.subscribe.tsx
@@ -19,6 +19,7 @@ import { normalizeAuthRedirect } from "@/lib/auth-redirect";
import { useCanManageBilling } from "@/client/features/team/organizationQueries";
import { AUTUMN_MANAGED_ACCESS_FEATURE_ID } from "@/shared/billing";
import { SUPPORT_EMAIL } from "@/client/lib/support";
+import { Button } from "@/client/components/ui/button";
const PLAN_FEATURES = [
"Keyword research, backlinks, rank tracking, and site audits",
@@ -199,7 +200,7 @@ function SubscribePage() {
<div className="w-full max-w-sm space-y-6">
<PlanPageAccountMenu email={session?.user?.email} />
- <div className="text-center space-y-3">
+ <div className="space-y-3 text-center">
<img
src="/transparent-logo.png"
alt="OpenSEO"
@@ -212,7 +213,7 @@ function SubscribePage() {
? `Welcome to OpenSEO, ${firstName}!`
: "Welcome to OpenSEO!"}
</h1>
- <p className="text-sm text-base-content/60">
+ <p className="text-sm text-muted-foreground">
SEO on your terms. All your SEO tools in one place at a fair price.
</p>
</div>
@@ -224,7 +225,7 @@ function SubscribePage() {
/* Sub-bullet of the Usage Credits line above. */
<li className="-mt-1 pl-6 text-xs">
<a
- className="text-base-content/60 underline decoration-base-content/40 decoration-dotted underline-offset-4 transition-colors hover:text-base-content"
+ className="text-muted-foreground underline decoration-muted-foreground/40 decoration-dotted underline-offset-4 transition-colors hover:text-foreground"
href="https://openseo.so/pricing"
target="_blank"
rel="noreferrer"
@@ -238,18 +239,23 @@ function SubscribePage() {
</li>
}
>
- {error ? <p className="text-sm text-error">{error}</p> : null}
+ {error ? (
+ <p role="alert" className="text-sm text-destructive">
+ {error}
+ </p>
+ ) : null}
{canManageBilling ? (
- <button
- className="btn btn-soft w-full"
- disabled={isAttaching}
+ <Button
+ className="w-full"
+ variant="secondary"
+ pending={isAttaching}
onClick={() => void handleSubscribe()}
>
{isAttaching ? "Redirecting..." : "Subscribe"}
- </button>
+ </Button>
) : (
- <p className="text-sm text-base-content/60">
+ <p className="text-sm text-muted-foreground">
Only the organization owner can subscribe. Ask them to upgrade this
organization.
</p>
@@ -257,7 +263,7 @@ function SubscribePage() {
</PlanOfferCard>
<div className="text-center space-y-2">
- <p className="text-sm text-base-content/60">
+ <p className="text-sm text-muted-foreground">
Questions? Email{" "}
<a className="link" href={`mailto:${SUPPORT_EMAIL}`}>
{SUPPORT_EMAIL}
@@ -265,14 +271,14 @@ function SubscribePage() {
.
</p>
{isUpgradeFlow ? (
- <button
+ <Button
type="button"
- className="inline-flex cursor-pointer items-center gap-1.5 text-sm font-medium text-base-content/70 hover:text-base-content transition-colors"
+ variant="ghost"
onClick={() => void navigate({ to: "/", replace: true })}
>
<ArrowRight className="size-3.5 rotate-180" />
Back to app
- </button>
+ </Button>
) : null}
</div>
</div>