Skip to content

feat(desktop): add shadcn-svelte config and Toggle/ToggleGroup components#674

Merged
skevetter merged 1 commit into
mainfrom
feat/desktop-shadcn-toggle-group
Jul 17, 2026
Merged

feat(desktop): add shadcn-svelte config and Toggle/ToggleGroup components#674
skevetter merged 1 commit into
mainfrom
feat/desktop-shadcn-toggle-group

Conversation

@skevetter

@skevetter skevetter commented Jul 17, 2026

Copy link
Copy Markdown
Contributor

Summary

Foundation for using shadcn-svelte components consistently across the desktop app.

  • Add desktop/components.json (shadcn-svelte config: zinc base color, $lib aliases, app.css location).
  • Add $lib/$shared path aliases to desktop/tsconfig.json so the shadcn-svelte CLI can resolve imports and add future components. Verified npx shadcn-svelte@latest add <component> now resolves config and aliases cleanly.
  • Add the Toggle and ToggleGroup UI primitives, wrapping the existing bits-ui dependency and matching the repo's generated-component conventions.

No behavior change to any existing screen — these are additive. The first consumer of ToggleGroup (the create-workspace source selector) follows in a subsequent PR.

Part of the UX work for #671.

Summary by CodeRabbit

  • New Features
    • Added reusable toggle and toggle-group controls with configurable styles and sizes.
    • Added support for grouped toggle items with shared settings and state.
    • Exposed toggle components through consistent import aliases.
  • Configuration
    • Added UI component configuration and TypeScript path aliases to simplify component integration.

…ents

Add components.json and tsconfig path aliases so the shadcn-svelte CLI
can resolve $lib and add future components consistently. Include the
Toggle and ToggleGroup UI primitives (wrapping the existing bits-ui
dependency), matching the repo's generated-component conventions.

No behavior change to existing screens.
@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for devsydev canceled.

Name Link
🔨 Latest commit 490bf92
🔍 Latest deploy log https://app.netlify.com/projects/devsydev/deploys/6a5a93bf967cb700083f4bdc

@netlify

netlify Bot commented Jul 17, 2026

Copy link
Copy Markdown

Deploy Preview for images-devsy-sh canceled.

Name Link
🔨 Latest commit 490bf92
🔍 Latest deploy log https://app.netlify.com/projects/images-devsy-sh/deploys/6a5a93bf9af4a50008d95324

@coderabbitai

coderabbitai Bot commented Jul 17, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7d474aa0-fc6c-4140-8c85-93ed3446fd49

📥 Commits

Reviewing files that changed from the base of the PR and between ae1696d and 490bf92.

📒 Files selected for processing (7)
  • desktop/components.json
  • desktop/src/renderer/src/lib/components/ui/toggle-group/index.ts
  • desktop/src/renderer/src/lib/components/ui/toggle-group/toggle-group-item.svelte
  • desktop/src/renderer/src/lib/components/ui/toggle-group/toggle-group.svelte
  • desktop/src/renderer/src/lib/components/ui/toggle/index.ts
  • desktop/src/renderer/src/lib/components/ui/toggle/toggle.svelte
  • desktop/tsconfig.json

📝 Walkthrough

Walkthrough

Added shadcn-svelte and TypeScript path configuration, a reusable toggle component with variants and exports, and a toggle-group root/item pair using shared Svelte context and bits-ui primitives.

Changes

Toggle UI components

Layer / File(s) Summary
Toggle component and variants
desktop/src/renderer/src/lib/components/ui/toggle/toggle.svelte, desktop/src/renderer/src/lib/components/ui/toggle/index.ts
Defines default and outline variants, default/sm/lg sizes, typed props, primitive bindings, class composition, and public aliases and types.
Toggle group context and items
desktop/src/renderer/src/lib/components/ui/toggle-group/toggle-group.svelte, desktop/src/renderer/src/lib/components/ui/toggle-group/toggle-group-item.svelte, desktop/src/renderer/src/lib/components/ui/toggle-group/index.ts
Adds a bits-ui group root and item, shares variant and size through Svelte context, forwards props, and exposes root/item aliases and context types.
Renderer aliases and component tooling
desktop/components.json, desktop/tsconfig.json
Adds shadcn-svelte settings and $lib/$shared TypeScript path mappings.

Estimated code review effort: 3 (Moderate) | ~20 minutes

Sequence Diagram(s)

sequenceDiagram
  participant Consumer
  participant ToggleGroupRoot
  participant SvelteContext
  participant ToggleGroupItem
  participant BitsToggleGroupPrimitive
  Consumer->>ToggleGroupRoot: provide variant, size, and value
  ToggleGroupRoot->>SvelteContext: set variant and size
  ToggleGroupRoot->>BitsToggleGroupPrimitive: render root with bound ref and value
  ToggleGroupItem->>SvelteContext: read variant and size
  ToggleGroupItem->>BitsToggleGroupPrimitive: render item with computed classes
Loading
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately summarizes the main desktop shadcn-svelte config and Toggle/ToggleGroup component additions.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@skevetter
skevetter merged commit fcaccf5 into main Jul 17, 2026
28 checks passed
@skevetter
skevetter deleted the feat/desktop-shadcn-toggle-group branch July 17, 2026 21:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant