-
-
Notifications
You must be signed in to change notification settings - Fork 139
Add Custom Theme and Color Customization Feature #1368
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Add Custom Theme and Color Customization Feature #1368
Conversation
|
@robertobandini @dex4er review please |
|
Please read this comment as info: |
|
Hi @Excellencedev, Sorry for the delay, I couldn’t find time over the weekend. I’ll be in the office for the next three days and will try to review your PR if I can. Could you please provide a detailed, step-by-step guide to set up and run your solution locally so I can verify it? I attempted to run it once but ran into dependency issues and I’m not very experienced with Electron app builds, so a straightforward initial setup walkthrough would be very helpful. Thanks! |
|
I like the idea of custom themes very much. However it'll go to next version v1.7.0 as it needs polishing and brings more changes, ie. to the extensions API. |
I agree |
|
Hi @gambhirsharma @Excellencedev, I suppose that we can start from the obvious fact that the tests are failed. |
dex4er
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Generally it might work someday but it was not compiled even once then it is hard to say if it is usable for us.
| "version": "1.0.0", | ||
| "main": "index.ts", | ||
| "dependencies": { | ||
| "@ogre-tools/injectable-react": "^18.1.1", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What is this dependency?
ERR_PNPM_NO_MATCHING_VERSION No matching version found for @ogre-tools/injectable-react@^18.1.1 while fetching it from https://registry.npmjs.org/
| @@ -0,0 +1,14 @@ | |||
| { | |||
| "name": "@freelensapp/color-picker", | |||
| "version": "1.0.0", | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All versions must be consistent
| "devDependencies": { | ||
| "@types/color": "^4.0.0", | ||
| "@types/react": "^18.3.5" | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A lot of dependencies are missing. Check other modules from ui-components how it works. Generally I'm not againt vibe coding but it looks like you never even compiled the code.
| const packageJson = require("./package.json"); | ||
|
|
||
| module.exports = { | ||
| name: packageJson.name, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check other packages and what is inside webpack.config.js
| @@ -0,0 +1,8 @@ | |||
| { | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Check other packages and what is inside tsconfig.json
|
I will make sure to make this work I am really busy rn so please bare with me |
|
Give me a bit of time please and I promise to make this work Drafting this for now |
|
Thanks @dex4er! @gambhirsharma Let us know if you can follow this. @Excellencedev |
Description
This PR implements a comprehensive custom theme and color customization system for Freelens, addressing issue #1280. Users can now create, edit, duplicate, delete, import, and export custom themes with full control over all UI colors.
Changes
Core Theme System Enhancements
Extended Theme Interface
isCustomflag toLensThemeinterface to distinguish user-created themes from built-in onesCustom Theme Storage
custom-themes-storage.injectable.tsfor persistent storage of custom themeslens-custom-themes.json)Theme Validation
theme-validation.tswith comprehensive validation utilitiescolorlibraryTheme Manager Service
custom-theme-manager.injectable.tsas the main API for theme operationsUser Interface Components
Color Picker Component (New Package:
@freelensapp/color-picker)Theme Editor
custom-theme-editor.tsxfor full-featured theme editingEnhanced Theme Preference UI
theme.tsxwith buttons for theme operationsImport/Export Functionality
import-export-theme.tsxfor theme sharingExtension API
registerTheme()function for extensions to provide custom themesunregisterTheme()for cleanupgetThemes()to retrieve all available themesThemenamespace in the renderer APIArchitecture Improvements
Reactive Theme System
themes.injectable.tsto combine built-in and custom themes reactivelyactive.injectable.tsto support custom themesFixed Default Theme ID
defaultThemeIdfrom"lens-dark"to"Dark"to match actual theme nameUsers can now:
Closes #1280