-
Notifications
You must be signed in to change notification settings - Fork 12
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
Theme manager integration #107
Conversation
75dbea5
to
bb98cf6
Compare
Codecov Report
@@ Coverage Diff @@
## main #107 +/- ##
=========================================
Coverage 75.13% 75.13%
Complexity 87 87
=========================================
Files 12 12
Lines 366 366
Branches 30 30
=========================================
Hits 275 275
Misses 88 88
Partials 3 3
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
pom.xml
Outdated
<!-- </includes>--> | ||
<!-- </fileset>--> | ||
<!-- <fileset>--> | ||
<!-- <directory>node_modules</directory>--> |
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.
incredibly annoying to delete this every time, just disabled temporarily
pom.xml
Outdated
@@ -201,7 +189,7 @@ | |||
<goal>copy-resources</goal> | |||
</goals> | |||
<configuration> | |||
<outputDirectory>${project.build.directory}/${project.artifactId}/js</outputDirectory> | |||
<outputDirectory>${project.basedir}/src/main/webapp/js</outputDirectory> |
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.
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.
also note that without this change it is unusable in mvn hpi:run
.
Yes this could be better in maven-hpi-plugin
but better the plugin works in development mode than being completely broken
78b39a3
to
758e4d5
Compare
758e4d5
to
1064ebc
Compare
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, looks good to me!
I also converted the source code view to use the new approach. I'll push these changes to your branch.
The only missing thing is the missing custom-prism.css
now. I'll debug into it a little bit deeper to see if we can have a clean separation between generated (copied) files and the source code files.
.gitignore
Outdated
src/main/webapp/css/**/prism*.css | ||
src/main/webapp/js/**/prism*.js | ||
src/main/webapp/js/index.js |
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.
Maybe it makes more sense to use a subfolder for the generated files, otherwise it is hard in IntelliJ to see the difference between copied files and created files.
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.
sure
pom.xml
Outdated
<include>**/*</include> | ||
</includes> | ||
<excludes> | ||
<exclude>css/custom-prism.css</exclude> |
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.
This seems to delete the css/custom-prism.css
file. At least it is not part of the plugin anymore.
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.
doesn't this exclude it from clean?
Thanks for the fixups changes look good |
Closes #41
see jenkinsci/theme-manager-plugin#103
jenkinsci/theme-manager-plugin#171
and
jenkinsci/dark-theme-plugin#194
jenkinsci/dark-theme-plugin#385
Testing done
Tested with jenkinsci/design-library-plugin#72 in
mvn hpi:run
By going to the design library views and clicking through them
Note: Design library is quite a complex integration for this as it loads sources dynamically after Prism runs in some cases so it has some extra hardening to make it more reliable, simple integrations should be a lot easier
jenkinsci/configuration-as-code-plugin#2342 is an example of a trivial integration
Tested with:
Submitter checklist