feat(clerk-js): add theme/preset selector and tailwind toggle to sandbox#8038
feat(clerk-js): add theme/preset selector and tailwind toggle to sandbox#8038nikosdouvlis wants to merge 3 commits intomainfrom
Conversation
…nd toggle to sandbox Why: The sandbox had no way to switch themes or apply appearance presets at runtime. Testing different themes required code changes. The Tailwind CSS dependency also couldn't be toggled off for testing components without it. What changed: - Theme selector dropdown (dark, shadesOfPurple, neobrutalism, shadcn) with sessionStorage persistence - Preset selector with empty presets map, dynamically populated from JS so other branches can register presets without touching the dropdown HTML - presetToAppearance helper to convert preset configs to appearance props - Tailwind CSS toggle with no-tailwind CSS fallback scoped to [data-sidebar] to prevent host-page styles from leaking into Clerk components
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: ea8da17 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
@clerk/agent-toolkit
@clerk/astro
@clerk/backend
@clerk/chrome-extension
@clerk/clerk-js
@clerk/dev-cli
@clerk/expo
@clerk/expo-passkeys
@clerk/express
@clerk/fastify
@clerk/hono
@clerk/localizations
@clerk/nextjs
@clerk/nuxt
@clerk/react
@clerk/react-router
@clerk/shared
@clerk/tanstack-react-start
@clerk/testing
@clerk/ui
@clerk/upgrade
@clerk/vue
commit: |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository YAML (base), Organization UI (inherited) Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds runtime theming and preset support to the Clerk JS sandbox. app.ts introduces a themes registry and a presets registry, reads initialTheme and initialPreset from sessionStorage, exposes UI handlers to switch themes and presets at runtime, and passes appearance (theme plus preset-derived values) into Clerk.load. After load it calls updateTheme and updatePreset and only applies appearance variables when no initialTheme is present. template.html adds theme and preset selects to both UI panels and a Tailwind toggle stored in localStorage that conditionally loads Tailwind or injects fallback CSS. 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Comment |
Summary
The sandbox had no way to switch themes or apply appearance presets at runtime - testing different themes required code changes. Tailwind CSS also couldn't be toggled off.
Test plan
Summary by CodeRabbit
New Features
Chores