Skip to content

Migrate UI to Carbon Components Svelte#5

Open
kurowski wants to merge 5 commits intomainfrom
carbon
Open

Migrate UI to Carbon Components Svelte#5
kurowski wants to merge 5 commits intomainfrom
carbon

Conversation

@kurowski
Copy link
Copy Markdown
Owner

Summary

This PR migrates the Potasko UI from custom CSS to Carbon Components Svelte, IBM's open-source design system.

Changes

Phase 1: Setup & Configuration

  • Added carbon-components-svelte, carbon-icons-svelte, and carbon-preprocess-svelte dependencies
  • Configured Vite with optimizeCss() and Svelte with optimizeImports()
  • Set up automatic light/dark theme switching based on system preference

Phase 2: Component Migration (11 components)

  • +page.svelte → Carbon Header, SideNav, Content, Breakpoint
  • Sidebar.svelte → SideNavLink, SideNavMenu, SideNavMenuItem
  • TaskListView.svelte → Accordion, AccordionItem, InlineLoading
  • TaskItem.svelte → Checkbox, Tag, Button
  • TaskForm.svelte → Form, TextInput, TextArea, DatePicker, Select, ButtonSet
  • AccountForm.svelte → Form, TextInput, PasswordInput, InlineNotification
  • DeleteListModal.svelte → ComposedModal, ModalHeader, ModalBody, ModalFooter
  • SyncLogModal.svelte → ComposedModal, DataTable, Tag
  • AccountList.svelte → Tile, Button, InlineLoading, InlineNotification
  • SyncStatus.svelte → Button, Tag, InlineLoading

Phase 3-6: Polish & Mobile Handling

  • Created carbon-overrides.css for safe area insets, bottom sheet modals, and touch targets
  • Simplified app.css by removing ~80 lines of now-unused custom CSS
  • Created ListFormModal.svelte for Carbon-idiomatic list management
  • Unified task form UX: FAB + modal on both desktop and mobile

Impact

  • Net reduction of ~1,500 lines of custom CSS
  • Consistent design language across all components
  • Automatic dark mode support via Carbon Theme
  • Better accessibility with Carbon's built-in ARIA support
  • Mobile breakpoint changed from 768px to 1056px (Carbon standard)

Remaining Work

⚠️ Note: Some UI cleanup remains to be done before merging, including visual polish and testing across different screen sizes.

Test plan

  • Test light and dark mode switching
  • Test mobile layout (< 1056px)
  • Test desktop layout (≥ 1056px)
  • Test task CRUD operations via modal
  • Test list management via sidebar
  • Test account settings and sync
  • Visual review of all components

🤖 Generated with Claude Code

kurowski and others added 5 commits January 27, 2026 18:48
Install carbon-components-svelte, carbon-icons-svelte, and
carbon-preprocess-svelte. Configure CSS and import optimization.
Set up automatic light/dark theme switching based on system preference.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace custom header and sidebar with Carbon Header, SideNav, and
Content components. Use Breakpoint for responsive behavior (1056px).
Sidebar now outputs SideNavLink/SideNavMenu items directly.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Convert TaskListView, TaskItem, TaskForm, AccountForm, DeleteListModal,
SyncLogModal, AccountList, and SyncStatus to use Carbon components.
Replace custom CSS with Carbon Checkbox, Tag, Button, Form, TextInput,
DatePicker, Select, ComposedModal, DataTable, Tile, and InlineNotification.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Add carbon-overrides.css for safe area insets, bottom sheet modals,
and touch target improvements. Simplify app.css by removing old styles.
Create ListFormModal for Carbon-idiomatic list management, replacing
inline forms in Sidebar.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Replace inline task form on desktop with the same modal-based UX
used on mobile. FAB button now appears on all screen sizes and
opens a consistent modal dialog for adding/editing tasks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
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