Skip to content

Add onboarding layout to the design-system registry - #52

Merged
s3rot0n1n merged 2 commits into
mainfrom
feat/onboarding-registry-items
Nov 22, 2026
Merged

s3rot0n1n merged 2 commits into
mainfrom
feat/onboarding-registry-items

Conversation

@s3rot0n1n

Copy link
Copy Markdown
Contributor

Why

Every product needs a setup flow. CourseLit has built one, and FrontLit and SendLit need the same kind. This PR moves the parts that don't depend on the product into the design-system registry, so all three products share one layout instead of copying CourseLit's.

What

Three new registry items, installed like any other @codelit component:

Item Contents
onboarding-shell OnboardingShell (top bar with logo, step indicator, save status and "Finish later"; mobile progress bar; scrolling form pane), OnboardingFooter, OnboardingPreview (live-preview pane that becomes a sheet on phones), PreviewBrowser
onboarding-ui StepHeader, FieldBlock, Hint, Note, Seg, Tile, ProgressList, DropZone, FileRow, CopyRow, StatusBadge, Spinner, useCopy
onboarding-resume-dialog OnboardingResumeDialog, the "welcome back" dialog for a setup that is part done
  • The components are taken from CourseLit's wizard (components/onboarding/wizard/ui.tsx, resume-dialog.tsx, the layout in wizard.tsx and PreviewFrame in previews.tsx).
  • CourseLit's hard-coded green and amber oklch colours are replaced with --success and --warning tokens.
  • Badge is renamed StatusBadge so it doesn't clash with @codelit/badge.
  • The shell holds no state. Steps, saving, previews and the step logic stay in each product.
  • ADR 0021 records that split.
  • The README documents the install command and a short usage example.
  • A minor changeset is included.

Fixes made along the way:

  • In the resume dialog, the "Never show this again" link is centred under the buttons. Since the dialog changed to block layout in 0.14, it has sat left-aligned and squashed against them.
  • The preview sheet's close button uses the lucide X icon instead of the "×" character.

Testing

  • bun run verify passes; it reports registry ok: 19 items.
  • I installed the three items from the locally built public/r/*.json into a CourseLit branch with shadcn add. The @codelit/button and @codelit/dialog dependencies and the @/components/ui/codelit/... imports resolved correctly.
  • I rebuilt CourseLit's wizard on these components, deleting its local ui.tsx and resume-dialog.tsx and the layout code in the wizard. The admin tsc passes.
  • I checked it in the browser on a fresh seeded database:
    • At 1280px the layout lines up exactly with the current CourseLit wizard.
    • Moving between steps works, and the step indicator and "Saved" status update.
    • The resume dialog renders correctly.
    • At 390px the progress bar shows, the preview opens as a sheet and closes again, and there is no sideways scroll.

The CourseLit PR follows once this is released.

🤖 Generated with Claude Code

Three registry items extracted from CourseLit's setup wizard so FrontLit
and SendLit can build their onboarding on the same layout:
onboarding-shell (top bar, step indicator, form pane with footer,
live-preview pane), onboarding-ui (step building blocks) and
onboarding-resume-dialog. Colours now come from design-system tokens.
ADR 0021 records what is shared and what stays in each product.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 22, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-22T13:48:58.309680Z ecfe867 PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: ecfe867a5e

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@s3rot0n1n
s3rot0n1n merged commit cf56262 into main Nov 22, 2026
1 check passed
@s3rot0n1n
s3rot0n1n deleted the feat/onboarding-registry-items branch November 22, 2026 18:25
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