Skip to content
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

[FEATURE_REQUEST] Add a dropdown list for theme in the UI config editor #65

Closed
MilesTEG1 opened this issue Jun 26, 2021 · 5 comments
Closed
Assignees
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change

Comments

@MilesTEG1
Copy link

Hello again 😄
It would be nice to have a dropdown list for the theme in the UI config editor, like the one for iconesize :
image

Because guessing the right font case for the name is tricky 😆
For example, I set manually the theme to Nord, but it didn't work, because it should be nord.

It may be great to list them in github doc 😊

Thanks again ✋🏻

@MilesTEG1 MilesTEG1 added the 🦄 Feature Request [ISSUE] Suggestion for new feature, update or change label Jun 26, 2021
@Lissy93
Copy link
Owner

Lissy93 commented Jun 26, 2021

Hey, good idea!

I'm just looking into it now, the config uses the schema defined in ConfigSchema.json, but it actually might be a bit harder than it sounds to put the themes in there, as it would mean users couldn't add there own custom theme, but I will see what I can do :)

In the meantime, here's a list of all available theme keys:
callisto, thebe, dracula, material, material-dark, colorful, nord, nord-frost, minimal-dark, minimal-light, matrix, matrix-red, hacker-girl, raspberry-jam, bee, tiger, material-original, material-dark-original, vaporware, high-contrast-dark, high-contrast-light. (the themes names are specified in defaults.js)

@MilesTEG1
Copy link
Author

I'm just looking into it now, the config uses the schema defined in ConfigSchema.json, but it actually might be a bit harder than it sounds to put the themes in there, as it would mean users couldn't add there own custom theme, but I will see what I can do :)

Maybe set a custom entry that use another line like this :

appConfig:
  theme: "custom"
  custom_theme: "myCustomTheme"

with custom_theme: "myCustomTheme" is the only one that can be whatever the user create.
With this, no need to worry about user's own themes 😃

What do you think about it ?

@Lissy93
Copy link
Owner

Lissy93 commented Jun 26, 2021

Yeah, that's one solution, but it complicates things having two properties both controlling the theme. I guess customTheme could always take precedence, but then the user wouldn't be able to switch to a built-in theme with the main dropdown.

I have made an addition in 369c6f1, which shows all the built-in themes in the tip, so when you hover over theme property you should see all the built-in options, but you can still type anything in the box. Do you think that will be enough?

image

@MilesTEG1
Copy link
Author

Yeah, that's one solution, but it complicates things having two properties both controlling the theme. I guess customTheme could always take precedence, but then the user wouldn't be able to switch to a built-in theme with the main dropdown.

I have made an addition in 369c6f1, which shows all the built-in themes in the tip, so when you hover over theme property you should see all the built-in options, but you can still type anything in the box. Do you think that will be enough?

image

That should be enough :)

If you managed to get the droplist working with another line, as I suggested, maybe with an algorythm like this

if theme = custom then
  use custom_theme value instead
else 
  use theme value as normal
endif

(I don't know the language used to code...)

@Lissy93
Copy link
Owner

Lissy93 commented Jun 26, 2021

I'll add it to my todo list - At the moment I'm going to close the issue, but I will update it in the future if a better solution is implemented 😃
Let me know if you need anything else :)

@Lissy93 Lissy93 closed this as completed Jun 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🦄 Feature Request [ISSUE] Suggestion for new feature, update or change
Projects
None yet
Development

No branches or pull requests

2 participants