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

Ability to change menu colors #1401

Open
callmevladik opened this issue Sep 21, 2023 · 5 comments
Open

Ability to change menu colors #1401

callmevladik opened this issue Sep 21, 2023 · 5 comments
Labels
enhancement New feature or request plugins

Comments

@callmevladik
Copy link

I know it refers to bigger story like custom themes capability, but is it possible for now to at least add some identifiers that will help to change selected menu item's colors?

@joaquimrocha
Copy link
Collaborator

Hey @callmevladik ! Yes, I'd refer to the bigger theme override plans we have.
However, please let me know exactly what you need to apply a diff color to. Is it the sidebar entry (background of an entry)? Is it the icon/text? All of them?

@callmevladik
Copy link
Author

Hey @joaquimrocha, yeah, I was trying to do the same as in the screenshot hardcoding global css in a weird way which still hasn't give any results as the generated classes are different on production :))
image

image.

Also, I was thinking about theme overriding and came to some solution I guess. What about storing themes in localStorage and read them when initializing the ThemeProvider?

@joaquimrocha
Copy link
Collaborator

Hi @callmevladik . Thanks for your reply and suggestion.
You're suggesting adding it to the localStorage (as opposed, I guess, to keeping it in memory after a plugin sets it up eventually, like e.g. registerTheme(themeName: string, themeData: Theme)) is this so we have access to the theme data before the plugins are loaded? Indeed, we'd have to refrain from showing anything with distinctive visual before we load the plugins, but this would have to happen anyway the 1st time we load Headlamp, when there would be nothing in the localStorage set from the plugins.

@callmevladik
Copy link
Author

@joaquimrocha Yes, I think headlamp can set its theme into localStorage and use it when initializing ThemeProvider, so plugin devs can modify that theme through some headlamp's shipped api like setTheme, resetTheme(to reset theme object to original)

@illume illume added enhancement New feature or request plugins labels Jul 8, 2024
@illume
Copy link
Collaborator

illume commented Jul 8, 2024

Is this something you're still interested in @callmevladik ?

@illume illume mentioned this issue Jul 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request plugins
Projects
Status: Proposed
Development

No branches or pull requests

3 participants