Open source alternative to Semrush and Ahrefs
TypeScript backlink-analysisgoogle-search-console-mcpkeyword-researchmcpseoseo-agentseo-auditseo-automationseo-skillsseo-toolssite-audit
Restore the pre-shadcn look of sign in, sign up and onboarding (EVE-353) (#768)
Carter Smith3911753d6d33
diff --git a/src/client/components/form/useAppForm.tsx b/src/client/components/form/useAppForm.tsxindex fc8d32ab..55bd4b35 100644--- a/src/client/components/form/useAppForm.tsx+++ b/src/client/components/form/useAppForm.tsx@@ -74,15 +74,24 @@ function useFieldControl(description: ReactNode) {function TextField({label,+ hideLabel = false,description,...inputProps-}: FieldText & Omit<ComponentProps<typeof Input>, BoundProps>) {+}: FieldText & {+ /** Keeps the label for screen readers only, for forms that use placeholders. */+ hideLabel?: boolean;+} & Omit<ComponentProps<typeof Input>, BoundProps>) {const field = useFieldContext<string>();const control = useFieldControl(description);return (<Field data-invalid={control.invalid}>- <FieldLabel htmlFor={control.controlProps.id}>{label}</FieldLabel>+ <FieldLabel+ htmlFor={control.controlProps.id}+ className={hideLabel ? "sr-only" : undefined}+ >+ {label}+ </FieldLabel><Input{...inputProps}{...control.controlProps}diff --git a/src/client/features/ai-mcp/AgentSetup.tsx b/src/client/features/ai-mcp/AgentSetup.tsxindex eea531d6..1654e75c 100644--- a/src/client/features/ai-mcp/AgentSetup.tsx+++ b/src/client/features/ai-mcp/AgentSetup.tsx@@ -1,8 +1,10 @@+import { 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";+import { Button } from "@/client/components/ui/button";export function AgentSetup({onComplete,@@ -32,10 +34,18 @@ export function AgentSetup({/><div className="mt-7 border-t border-border pt-5"><WizardFooter+ className="mt-0"onBack={onBack}- onContinue={onComplete}- continueLabel="Finish"- continueDisabled={disabled}+ continueAction={+ <Button+ type="button"+ variant="ghost"+ className="h-8 gap-2 px-3 text-xs font-semibold"+ onClick={onComplete}+ >+ Finish <ArrowRight className="size-4" />+ </Button>+ }/></div></fieldset>diff --git a/src/client/features/ai-mcp/AgentSetupPanel.tsx b/src/client/features/ai-mcp/AgentSetupPanel.tsxindex 0dc26c46..34840b36 100644--- a/src/client/features/ai-mcp/AgentSetupPanel.tsx+++ b/src/client/features/ai-mcp/AgentSetupPanel.tsx@@ -13,9 +13,9 @@ export function AgentSetupPanel({}) {return (<>- <div className="rounded-xl border border-border bg-muted/25 p-5">+ <div className="rounded-xl border border-border bg-background/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-border bg-background">+ <span className="flex size-10 shrink-0 items-center justify-center rounded-lg border border-border bg-card"><Package className="size-5 text-muted-foreground" /></span><div>diff --git a/src/client/features/auth/AuthPage.tsx b/src/client/features/auth/AuthPage.tsxindex d714a1c5..ef99919b 100644--- a/src/client/features/auth/AuthPage.tsx+++ b/src/client/features/auth/AuthPage.tsx@@ -1,13 +1,5 @@import { z } from "zod";import { Button } from "@/client/components/ui/button";-import {- Card,- CardContent,- CardDescription,- CardFooter,- CardHeader,- CardTitle,-} from "@/client/components/ui/card";import {getCurrentAuthRedirect,getOAuthSignedQuery,@@ -18,6 +10,13 @@ export const authRedirectSearchSchema = z.object({redirect: z.string().optional(),});+// The auth forms keep their pre-shadcn look: white inputs with 16px text, and a+// soft grey submit button.+export const authInputClassName =+ "border-foreground/20 bg-card text-base md:text-base";+export const authSubmitClassName =+ "w-full border-border bg-[color-mix(in_oklab,var(--card),var(--foreground)_8%)] font-semibold hover:bg-[color-mix(in_oklab,var(--card),var(--foreground)_12%)]";+export function useAuthPageState(redirect: string | undefined) {const redirectTo = getCurrentAuthRedirect(redirect);const oauthQuery =@@ -53,7 +52,7 @@ export function AuthMethodChooser({<Buttontype="button"variant="outline"- className="w-full !bg-white !text-neutral-900 hover:!bg-neutral-50"+ className="w-full border-black/10 !bg-white font-semibold !text-neutral-900 hover:border-black/20 hover:!bg-neutral-50"onClick={onContinueWithGoogle}disabled={disabled || isBusy}>@@ -63,8 +62,8 @@ export function AuthMethodChooser({<Buttontype="button"- variant="secondary"- className="w-full"+ variant="outline"+ className="w-full bg-card font-semibold dark:border-border dark:bg-card"onClick={onContinueWithEmail}disabled={disabled || isBusy}>@@ -109,29 +108,25 @@ export function AuthPageCard({footer?: React.ReactNode;}) {return (- <Card className="w-full max-w-xs">- <CardHeader className="text-center space-y-3">+ <div className="w-full max-w-xs space-y-6">+ <div className="space-y-3 text-center"><imgsrc="/transparent-logo.png"alt="OpenSEO"className="mx-auto size-10 rounded-lg"/><div>- <CardTitle className="text-xl">- <h1>{title}</h1>- </CardTitle>+ <h1 className="text-xl font-semibold">{title}</h1>{helperText ? (- <CardDescription className="mt-1">{helperText}</CardDescription>+ <p className="mt-1 text-sm text-muted-foreground">{helperText}</p>) : null}</div>- </CardHeader>+ </div>- <CardContent className="space-y-4">{children}</CardContent>+ <div className="space-y-4">{children}</div>- {footer ? (- <CardFooter className="justify-center text-center">{footer}</CardFooter>- ) : null}- </Card>+ {footer ? <div className="text-center">{footer}</div> : null}+ </div>);}diff --git a/src/client/features/onboarding/OnboardingCard.tsx b/src/client/features/onboarding/OnboardingCard.tsxindex b7df2517..8a6486cc 100644--- a/src/client/features/onboarding/OnboardingCard.tsx+++ b/src/client/features/onboarding/OnboardingCard.tsx@@ -1,5 +1,4 @@import type { ReactNode } from "react";-import { Card, CardContent } from "@/client/components/ui/card";export function OnboardingCard({step,@@ -16,27 +15,25 @@ export function OnboardingCard({<img src="/transparent-logo.png" alt="" className="size-7" />OpenSEO</div>- <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>+ <main className="mt-8 rounded-2xl border border-border bg-card 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-border"}`}+ />+ ))}+ </div>+ {children}+ </main></div>);}diff --git a/src/client/features/onboarding/PostSignupOnboarding.tsx b/src/client/features/onboarding/PostSignupOnboarding.tsxindex b6c5416c..4ceb6662 100644--- a/src/client/features/onboarding/PostSignupOnboarding.tsx+++ b/src/client/features/onboarding/PostSignupOnboarding.tsx@@ -57,7 +57,7 @@ export function PostSignupOnboarding({<>{accountMenu}<OnboardingCard step={step + 1} total={ONBOARDING_LAST_STEP + 1}>- <fieldset disabled={isSaving}>+ <fieldset disabled={isSaving} className="min-w-0">{step === 0 ? (<OnboardingChoiceGrouptitle="What brings you here?"@@ -181,12 +181,12 @@ function OnboardingChoiceGroup({<Togglevariant="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"}`}+ className={`h-auto min-h-11 gap-3 rounded-full px-4 py-2.5 text-left font-normal disabled:opacity-35 ${selected ? "border-primary bg-primary/5 text-primary aria-pressed:bg-primary/5" : "border-border hover:bg-background"}`}disabled={disabled}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-foreground" : "border-muted-foreground/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-foreground/30"}`}>{selected && <Check className="size-3" />}</span>@@ -204,7 +204,7 @@ function OnboardingChoiceGroup({{isOtherSelected ? (<Inputtype="text"- className="mt-4"+ className="mt-4 border-foreground/20 bg-card text-base md:text-base"aria-label={multiple ? "Other tasks" : "Other answer"}placeholder={multiple ? "Tell us what else..." : "Tell us more..."}value={otherValue}@@ -223,8 +223,8 @@ function ClientWebsiteCountPicker({onChange: (value: string) => void;}) {return (- <div className="w-full rounded-lg border border-border bg-muted/40 p-4">- <p className="text-sm text-muted-foreground">+ <div className="w-full rounded-lg border border-border bg-background/40 p-4">+ <p className="text-sm text-foreground/70">About how many client sites do you work on?</p><div className="mt-2 flex flex-wrap gap-2">@@ -236,7 +236,7 @@ function ClientWebsiteCountPicker({key={option}variant="outline"pressed={selected}- className="rounded-md"+ className={`h-auto rounded-md px-3 py-1.5 font-normal ${selected ? "border-foreground aria-pressed:bg-background" : "border-border text-foreground/75 hover:border-foreground/40 hover:bg-background/60"}`}onPressedChange={() => onChange(selected ? "" : option)}>{option}diff --git a/src/client/features/onboarding/SearchConsoleOnboardingStep.tsx b/src/client/features/onboarding/SearchConsoleOnboardingStep.tsxindex 6077f682..443cfa31 100644--- a/src/client/features/onboarding/SearchConsoleOnboardingStep.tsx+++ b/src/client/features/onboarding/SearchConsoleOnboardingStep.tsx@@ -142,7 +142,7 @@ function GscConnect({const showPicker = hasGrant && !connected;return (- <fieldset disabled={busy}>+ <fieldset disabled={busy} className="min-w-0">{connectionQuery.isLoading ? (<Spinner size="sm" label="Checking…" />) : connectionQuery.isError && !connection ? (@@ -156,9 +156,9 @@ 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-foreground/80">+ <span className="min-w-0 text-foreground/80">Connected to{" "}- <span className="font-mono">{connection?.property}</span>.+ <span className="font-mono break-all">{connection?.property}</span>.</span></div>) : (@@ -193,7 +193,7 @@ function GscConnect({<Buttontype="button"variant="outline"- size="lg"+ className="h-auto gap-2.5 bg-card px-4 py-2.5 font-semibold shadow-sm hover:bg-background hover:shadow dark:border-border dark:bg-card dark:hover:bg-background"onClick={handleConnect}disabled={linking}aria-busy={linking}diff --git a/src/client/features/onboarding/WizardFooter.tsx b/src/client/features/onboarding/WizardFooter.tsxindex 054811df..efe90865 100644--- a/src/client/features/onboarding/WizardFooter.tsx+++ b/src/client/features/onboarding/WizardFooter.tsx@@ -1,5 +1,6 @@import type { ReactNode } from "react";import { ArrowLeft, ArrowRight } from "lucide-react";+import { cn } from "cn";import { Button } from "@/client/components/ui/button";export function WizardFooter({@@ -10,6 +11,7 @@ export function WizardFooter({continueLabel = "Continue",continueDisabled = false,continueAction,+ className,}: {onBack?: () => void;onSkip?: () => void;@@ -18,31 +20,56 @@ export function WizardFooter({continueLabel?: string;continueDisabled?: boolean;continueAction?: ReactNode;+ className?: string;}) {return (- <div className="mt-8 flex items-center justify-between gap-3">+ <div+ className={cn(+ "mt-8 flex flex-wrap items-center justify-between gap-3",+ className,+ )}+ >{onBack ? (- <Button type="button" variant="ghost" onClick={onBack}>- <ArrowLeft className="size-4" /> Back+ <Button+ type="button"+ variant="ghost"+ className="gap-1.5 px-0 text-xs font-normal text-muted-foreground hover:bg-transparent"+ onClick={onBack}+ >+ <ArrowLeft className="size-3.5" /> Back</Button>) : onSkip ? (- <Button type="button" variant="ghost" onClick={onSkip}>+ <Button+ type="button"+ variant="ghost"+ className="font-semibold"+ onClick={onSkip}+ >{skipLabel}</Button>) : null}<div className="flex items-center gap-2">{onBack && onSkip ? (- <Button type="button" variant="ghost" size="sm" onClick={onSkip}>+ <Button+ type="button"+ variant="ghost"+ className="h-8 px-3 text-xs font-semibold text-foreground/55"+ onClick={onSkip}+ >{skipLabel}</Button>) : null}{continueAction ?? (<Buttontype="button"+ // Without onContinue this is a placeholder for a step that has+ // nothing to save yet, so it renders small, like the Skip beside it.+ className={`font-semibold disabled:bg-foreground/10 disabled:text-foreground/20 disabled:opacity-100 ${onContinue ? "" : "h-8 px-3 text-xs"}`}onClick={onContinue}disabled={continueDisabled || !onContinue}>- {continueLabel} <ArrowRight className="size-4" />+ {continueLabel}+ {onContinue ? <ArrowRight className="size-4" /> : null}</Button>)}</div>diff --git a/src/routes/_auth.sign-in.tsx b/src/routes/_auth.sign-in.tsxindex 8648ec44..db29869e 100644--- a/src/routes/_auth.sign-in.tsx+++ b/src/routes/_auth.sign-in.tsx@@ -1,11 +1,12 @@import { Link, createFileRoute, useNavigate } from "@tanstack/react-router";import { useState } from "react";import { useAppForm } from "@/client/components/form/useAppForm";-import { Alert, AlertDescription } from "@/client/components/ui/alert";import { Button } from "@/client/components/ui/button";import {AuthPageCard,AuthMethodChooser,+ authInputClassName,+ authSubmitClassName,authRedirectSearchSchema,useAuthPageState,} from "@/client/features/auth/AuthPage";@@ -107,8 +108,8 @@ function SignInPage() {<divclassName={showEmailForm- ? "flex w-full justify-between text-sm text-muted-foreground"- : "w-full text-sm text-muted-foreground"+ ? "flex w-full justify-between text-sm text-foreground/50"+ : "w-full text-sm text-foreground/50"}>{showEmailForm ? (@@ -146,9 +147,7 @@ function SignInPage() {}}/>{google.error ? (- <Alert variant="destructive">- <AlertDescription>{google.error}</AlertDescription>- </Alert>+ <p className="text-sm text-destructive">{google.error}</p>) : null}</>) : (@@ -158,6 +157,8 @@ function SignInPage() {{(field) => (<field.TextFieldlabel="Email address"+ hideLabel+ className={authInputClassName}type="email"placeholder="Email address..."autoComplete="email"@@ -169,6 +170,8 @@ function SignInPage() {{(field) => (<field.TextFieldlabel="Password"+ hideLabel+ className={authInputClassName}type="password"placeholder="Password..."autoComplete="current-password"@@ -188,14 +191,12 @@ function SignInPage() {return (<>{errorMessage ? (- <Alert variant="destructive">- <AlertDescription>{errorMessage}</AlertDescription>- </Alert>+ <p className="text-sm text-destructive">{errorMessage}</p>) : null}<Buttontype="submit"variant="secondary"- className="w-full"+ className={authSubmitClassName}pending={isSubmitting}>{isSubmitting ? "Signing in..." : "Sign in"}diff --git a/src/routes/_auth.sign-up.tsx b/src/routes/_auth.sign-up.tsxindex 1f24025c..574e1989 100644--- a/src/routes/_auth.sign-up.tsx+++ b/src/routes/_auth.sign-up.tsx@@ -1,11 +1,12 @@import { Link, createFileRoute, useNavigate } from "@tanstack/react-router";import { useState } from "react";import { useAppForm } from "@/client/components/form/useAppForm";-import { Alert, AlertDescription } from "@/client/components/ui/alert";import { Button } from "@/client/components/ui/button";import {AuthPageCard,AuthMethodChooser,+ authInputClassName,+ authSubmitClassName,authRedirectSearchSchema,useAuthPageState,} from "@/client/features/auth/AuthPage";@@ -136,16 +137,16 @@ function SignUpPage() {footer={isHostedMode ? (showEmailForm ? (- <Button+ <buttontype="button"- variant="link"+ className="text-sm text-foreground underline underline-offset-2 hover:text-foreground/80 transition-colors"onClick={() => {setShowEmailForm(false);google.clearError();}}>Back to signup- </Button>+ </button>) : (<div className="space-y-4"><p className="text-sm leading-relaxed text-muted-foreground">@@ -170,7 +171,7 @@ function SignUpPage() {.</p>- <p className="text-sm text-muted-foreground">+ <p className="text-sm text-foreground/50">Already have an account?{" "}<Linkto="/sign-in"@@ -200,9 +201,7 @@ function SignUpPage() {}}/>{google.error ? (- <Alert variant="destructive">- <AlertDescription>{google.error}</AlertDescription>- </Alert>+ <p className="text-sm text-destructive">{google.error}</p>) : null}</>) : (@@ -212,6 +211,8 @@ function SignUpPage() {{(field) => (<field.TextFieldlabel="Name (optional)"+ hideLabel+ className={authInputClassName}placeholder="Name (optional)..."autoComplete="name"/>@@ -221,6 +222,8 @@ function SignUpPage() {{(field) => (<field.TextFieldlabel="Email address"+ hideLabel+ className={authInputClassName}type="email"placeholder="Email address..."autoComplete="email"@@ -232,6 +235,8 @@ function SignUpPage() {{(field) => (<field.TextFieldlabel="Password"+ hideLabel+ className={authInputClassName}type="password"placeholder="Password..."autoComplete="new-password"@@ -243,6 +248,8 @@ function SignUpPage() {{(field) => (<field.TextFieldlabel="Confirm password"+ hideLabel+ className={authInputClassName}type="password"placeholder="Confirm password..."autoComplete="new-password"@@ -269,14 +276,12 @@ function SignUpPage() {return (<>{errorMessage ? (- <Alert variant="destructive">- <AlertDescription>{errorMessage}</AlertDescription>- </Alert>+ <p className="text-sm text-destructive">{errorMessage}</p>) : null}<Buttontype="submit"variant="secondary"- className="w-full"+ className={authSubmitClassName}pending={isSubmitting}disabled={isTurnstileEnabled && !captcha.hasToken}>