-
Notifications
You must be signed in to change notification settings - Fork 233
feat: onboarding wizard #3 #2732
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
comatory
merged 7 commits into
ondrej/eng-9192-onboarding-wizard-from-signup-to-live-metrics-topic
from
ondrej/eng-9192-onboarding-wizard-from-signup-to-live-metrics-03
Apr 24, 2026
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
b0624c9
feat: restrict onboarding content to max width
comatory e205f5d
feat: improve onboarding layout
comatory 4461953
feat: add stepper
comatory b4c1442
feat: onboarding navigation buttons
comatory 54e9d29
feat: common layout for the step content
comatory a551a98
feat: step 1 functionality
comatory 4cfeb58
fix: simplify argument passing
comatory File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,24 @@ | ||
| export interface OnboardingLayoutProps { | ||
| children?: React.ReactNode; | ||
| } | ||
| import { Logo } from '../logo'; | ||
| import { Card, CardContent } from '../ui/card'; | ||
| import { Stepper } from '../onboarding/stepper'; | ||
| import { ONBOARDING_STEPS } from '../onboarding/onboarding-steps'; | ||
| import { useOnboarding } from '@/hooks/use-onboarding'; | ||
|
|
||
| export const OnboardingLayout = ({ children, title }: { children?: React.ReactNode; title?: string }) => { | ||
| const { currentStep } = useOnboarding(); | ||
|
|
||
| export const OnboardingLayout = ({ children }: OnboardingLayoutProps) => { | ||
| return ( | ||
| <div className="flex min-h-screen w-full flex-col items-center justify-center bg-background font-sans antialiased"> | ||
| <main className="w-full max-w-lg px-4">{children}</main> | ||
| <div className="flex min-h-screen w-full flex-col bg-background font-sans antialiased"> | ||
| <header className="mx-auto flex w-full max-w-2xl items-center gap-3 py-6"> | ||
| <Logo width={32} height={32} /> | ||
| {title && <h1 className="text-lg font-semibold tracking-tight">{title}</h1>} | ||
| <Stepper steps={ONBOARDING_STEPS} currentStep={(currentStep ?? 1) - 1} className="ml-auto" /> | ||
| </header> | ||
| <main className="w-full flex-1 px-6 pb-4 pt-12"> | ||
| <Card className="mx-auto w-full max-w-2xl"> | ||
| <CardContent className="flex min-h-[788px] flex-col p-6">{children}</CardContent> | ||
| </Card> | ||
| </main> | ||
| </div> | ||
| ); | ||
| }; |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| export const OnboardingContainer = ({ children }: { children: React.ReactNode }) => { | ||
| return <div className="flex flex-1 flex-col items-center gap-4 text-center">{children}</div>; | ||
| }; |
71 changes: 71 additions & 0 deletions
71
studio/src/components/onboarding/onboarding-navigation.tsx
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,71 @@ | ||
| import { ArrowLeftIcon, ArrowRightIcon, InfoCircledIcon } from '@radix-ui/react-icons'; | ||
| import { Link } from '../ui/link'; | ||
| import { Button } from '../ui/button'; | ||
| import { Tooltip, TooltipContent, TooltipTrigger } from '../ui/tooltip'; | ||
|
|
||
| export const OnboardingNavigation = ({ | ||
| backHref, | ||
| forward, | ||
| forwardLabel = 'Next', | ||
| onSkip, | ||
| }: { | ||
| backHref?: string; | ||
| forward: { href: string } | { onClick: () => void; isLoading?: boolean; disabled?: boolean }; | ||
| forwardLabel?: string; | ||
| onSkip: () => void; | ||
| }) => { | ||
| return ( | ||
| <div className="mt-auto flex w-full justify-between pt-8"> | ||
| <div className="flex items-center gap-1"> | ||
| <Button asChild variant="outline" onClick={onSkip}> | ||
| <Link href="/">Skip</Link> | ||
| </Button> | ||
| <Tooltip delayDuration={0}> | ||
| <TooltipTrigger asChild> | ||
| <button | ||
| type="button" | ||
| aria-label="Open onboarding tooltip" | ||
| className="rounded-sm border-0 bg-transparent p-0 focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring" | ||
| > | ||
| <InfoCircledIcon className="ml-2 size-3.5 text-muted-foreground" /> | ||
| </button> | ||
| </TooltipTrigger> | ||
| <TooltipContent>You can always get back to this wizard from the application. Safe to skip.</TooltipContent> | ||
| </Tooltip> | ||
| </div> | ||
| <div className="flex gap-2"> | ||
| {backHref ? ( | ||
| <Button className="group" asChild variant="outline"> | ||
| <Link href={backHref}> | ||
| <ArrowLeftIcon className="mr-2 transition-transform group-hover:-translate-x-1" /> | ||
| Back | ||
| </Link> | ||
| </Button> | ||
| ) : ( | ||
| <Button variant="outline" disabled> | ||
| <ArrowLeftIcon className="mr-2" /> | ||
| Back | ||
| </Button> | ||
| )} | ||
| {'href' in forward ? ( | ||
| <Button className="group" asChild> | ||
| <Link href={forward.href}> | ||
| {forwardLabel} | ||
| <ArrowRightIcon className="ml-2 transition-transform group-hover:translate-x-1" /> | ||
| </Link> | ||
| </Button> | ||
| ) : ( | ||
| <Button | ||
| className="group" | ||
| onClick={forward.onClick} | ||
| isLoading={forward.isLoading} | ||
| disabled={forward.isLoading || forward.disabled} | ||
| > | ||
| {forwardLabel} | ||
| <ArrowRightIcon className="ml-2 transition-transform group-hover:translate-x-1" /> | ||
| </Button> | ||
| )} | ||
| </div> | ||
| </div> | ||
| ); | ||
| }; | ||
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| export interface StepperStep { | ||
| number: number; | ||
| label: string; | ||
| } | ||
|
|
||
| export const ONBOARDING_STEPS: StepperStep[] = [ | ||
| { number: 1, label: 'Get started with WunderGraph' }, | ||
| { number: 2, label: 'Create your first graph' }, | ||
| { number: 3, label: 'Run your services' }, | ||
| ]; |
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.