-
Notifications
You must be signed in to change notification settings - Fork 16
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 #11
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
target/ | ||
work/ | ||
*.iml | ||
.idea/ | ||
light-theme.css |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd"> | ||
<extension> | ||
<groupId>io.jenkins.tools.incrementals</groupId> | ||
<artifactId>git-changelist-maven-extension</artifactId> | ||
<version>1.3</version> | ||
</extension> | ||
</extensions> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-Pconsume-incrementals | ||
-Pmight-produce-incrementals |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
18 changes: 18 additions & 0 deletions
18
src/main/java/io/jenkins/plugins/materialtheme/AbstractMaterialTheme.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package io.jenkins.plugins.materialtheme; | ||
|
||
import io.jenkins.plugins.thememanager.Theme; | ||
import io.jenkins.plugins.thememanager.ThemeManagerFactory; | ||
import java.util.Arrays; | ||
|
||
public class AbstractMaterialTheme extends ThemeManagerFactory { | ||
|
||
public static final String BASE_CSS = "light-theme.css"; | ||
public static final String CUSTOMISED_CSS = "material-theme.css"; | ||
|
||
@Override | ||
public Theme getTheme() { | ||
return Theme.builder().withCssUrls( | ||
Arrays.asList(toAssetUrl(BASE_CSS), getCssUrl(), toAssetUrl(CUSTOMISED_CSS))) | ||
.build(); | ||
} | ||
} |
17 changes: 17 additions & 0 deletions
17
src/main/java/io/jenkins/plugins/materialtheme/AbstractMaterialThemeDescriptor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package io.jenkins.plugins.materialtheme; | ||
|
||
import io.jenkins.plugins.thememanager.ThemeManagerFactoryDescriptor; | ||
|
||
public abstract class AbstractMaterialThemeDescriptor extends ThemeManagerFactoryDescriptor { | ||
public static final String ID = "material"; | ||
|
||
@Override | ||
public String getThemeId() { | ||
return ID; | ||
} | ||
|
||
@Override | ||
public boolean isNamespaced() { | ||
return true; | ||
} | ||
} |
49 changes: 0 additions & 49 deletions
49
src/main/java/io/jenkins/plugins/materialtheme/AbstractMaterialThemeRootAction.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 0 additions & 41 deletions
41
src/main/java/io/jenkins/plugins/materialtheme/MaterialIndigoThemeRootAction.java
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
42 changes: 0 additions & 42 deletions
42
src/main/java/io/jenkins/plugins/materialtheme/MaterialRedThemeRootAction.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
As this plugin replaces most of the older Jenkins icons This needs to be pinned for a family of releases.
0.3.x - Supports pre 2.289.1 (specifically before
Add modern icons: build status and weather. ([pull 5065](https://github.com/jenkinsci/jenkins/pull/5065), [pull 5392](https://github.com/jenkinsci/jenkins/pull/5392)
))0.4.x - supports
2.289.1
+ (unless there are significant Jenkins Icon changes).0.5.x - will support the next big UI change (possible jenkinsci/jenkins#6307).
My hope is that by doing this I can fix critical issues for users stuck on older Jenkins versions, whilst also not breaking any new icon changes (although it sounds like it's a bit broken on recent Jenkins releases?).
As such, can you leave this as
2.289.1
, so it's the minimum supported version?That said, if this version update is required to support dependencies (e.g. Theme manager) then can you change the version to 0.5.0 (and then 0.6.x will need to support the next UI change).
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.
It's required https://github.com/jenkinsci/theme-manager-plugin/blob/795dd3b2c8d2a7a89a7e86f47c231bd271fc4141/pom.xml#L17
Checkbox structure changed in 2.335 and there was an improvement in 2.336 required for theme manager.
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.
Thanks, just checking if this version change will cause issues for #13 (just to know the order of merging).
The likelihood is that someone will need to update their PR. I will prefer yours you were first (unless #13 is stuck on an older version).