Skip to content

feat: Enhance theme management with custom import functionality#223

Merged
felix-schultz merged 1 commit intodevfrom
feature/219-dynamic-custom-theme
Aug 22, 2025
Merged

feat: Enhance theme management with custom import functionality#223
felix-schultz merged 1 commit intodevfrom
feature/219-dynamic-custom-theme

Conversation

@felix-schultz
Copy link
Copy Markdown
Member

This pull request adds custom theme import functionality to the profile settings page, allowing users to import CSS exports from tweakcn.com and apply them as their theme. It introduces new UI elements for importing, parses the CSS to extract theme variables, and updates the profile state accordingly. Additionally, it improves the theme selection experience and provides clear feedback for custom themes.

Custom Theme Import Feature:

  • Added parsing logic (parseTweakcnTheme, toCamel, extractBlock, parseVars) to process tweakcn.com CSS exports and extract light/dark theme variables for use as a custom theme.
  • Introduced new UI state and controls for custom theme import, including text fields for theme name and CSS, an import button, error handling, and instructional text. [1] [2]

Theme Selection Improvements:

  • Updated theme selection logic to allow choosing between predefined themes and a "Custom (import)" option, syncing selection state and displaying badges for custom themes. [1] [2] [3]

Codebase and Import Updates:

  • Refactored imports and state hooks to support new functionality and UI components, including moving useDebounce import and adding Button and Upload icon. [1] [2] [3] [4]
  • Minor code style and state management improvements for clarity and consistency. [1] [2]

@felix-schultz felix-schultz merged commit 8c67642 into dev Aug 22, 2025
1 of 4 checks passed
@felix-schultz felix-schultz deleted the feature/219-dynamic-custom-theme branch August 22, 2025 20:45
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