build-monitor-plugin icon indicating copy to clipboard operation
build-monitor-plugin copied to clipboard

Bad interaction between build-monitor and simple-theme

Open TobiX opened this issue 7 years ago • 1 comments

Hi,

I recently took over the maintainership of the simple-theme-plugin, which is implemented as a PageDecorator injecting CSS and JavaScript into the page header. Since you collect the headers of all PageDecorators here https://github.com/jan-molak/jenkins-build-monitor-plugin/blob/1a4afa96c43c2fa2b7d472aab8fd82dbd406d3a7/build-monitor-plugin/src/main/resources/com/smartcodeltd/jenkinsci/plugins/buildmonitor/BuildMonitorView/index.jelly#L35-L37 - you also collect the "theme" of the simple-theme-plugin. Unfortunately, most theme authors probably didn't have your build monitor in mind and applying random CSS makes the build monitor a little bit ugly.

I see 2 solutions to this:

  1. I find some indicator to detect the build monitor (maybe you can define some "opt-out" variable?) and don't apply the theme then
  2. You don't include the pageDecorator headers at all. Looking at https://jenkins.io/doc/developer/extensions/jenkins-core/#pagedecorator this might not loose much, except maybe analytics plugins, but they may already be broken, since you don't include the footers...

What do you think?

TobiX avatar Feb 08 '18 23:02 TobiX

Just FYI, I used a very simple workaround for now: https://github.com/jenkinsci/simple-theme-plugin/commit/cc68d1a82909f6e1fa1f9b4ec2a85b05d738383b

TobiX avatar Feb 13 '18 13:02 TobiX