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

Add live theme switching support #47

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

timja
Copy link
Member

@timja timja commented Feb 20, 2022

See jenkinsci/theme-manager-plugin#75

All themes are now loaded on every page, the active theme is controlled by a data attribute on the html element.

Given not many variables are overridden for the light / dark themes I just duplicated them below each other.
If that's not wanted then I can introduce some preprocessing like done in the Dark theme PR jenkinsci/dark-theme-plugin#170

FYI @janfaracik

pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
pom.xml Outdated Show resolved Hide resolved
@@ -71,7 +71,7 @@
/* --font-size-monospace */ /* not a color */
/* --font-size-sm */ /* not a color */
/* --font-size-xs */ /* not a color */
/* --header-bg-classic */
--header-bg-classic: #000;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this wasn't set before and was relying on what was set in core.

It's one of the colours used in preview so needs to be set otherwise the active theme will show it's colour there:
https://github.com/jenkinsci/theme-manager-plugin/blob/master/src/main/resources/lib/theme-manager/selector.jelly#L31-L37

@timja timja marked this pull request as ready for review February 24, 2022 08:42
@timja timja requested a review from a team as a code owner February 24, 2022 08:42
@daniel-beck daniel-beck self-requested a review February 24, 2022 10:01
Copy link
Member

@NotMyFault NotMyFault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works great so far, are there plans to ship this anytime soon?
The next LTS candidate likely includes the live theme switcher and it would be nice to have this one available as well.

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.

2 participants