jenkinsci / last-changes-plugin

https://plugins.jenkins.io/last-changes
https://plugins.jenkins.io/last-changes/
31 stars 31 forks source link

No scroll bar for View Last Changes #79

Closed dpuglielli closed 4 years ago

dpuglielli commented 4 years ago

There is no scroll bar on the View Last Change page even when the quantity of changes would necessitate it. We ae using all the defaults on the Advanced Options configuration. The problem is present on FireFox, Chrome, and Edge Chromium. Obviously changing the html from the commit.jelly template allows for scrolling, but is most likely not the correct change. from: html body { overflow:hidden!important; } to html body { overflow:auto!important; }

Also, of note is the javascript error written to the console. The prototype.js comes from the base Jenkins installation. prototype.js:892 Uncaught TypeError: this.each is not a function at NamedNodeMap.collect (prototype.js:892) at open (diff2html-ui-2.12.2.min.js:1) at render (diff2html-ui-2.12.2.min.js:1) at HighlightJS.mergeStreams (diff2html-ui-2.12.2.min.js:1) at HTMLSpanElement. (diff2html-ui-2.12.2.min.js:1) at jquery.min.js:2 at Function.map (jquery.min.js:2) at n.fn.init.map (jquery.min.js:2) at HTMLDivElement. (diff2html-ui-2.12.2.min.js:1) at jquery.min.js:2

We are using Jenkins 2.245 and v2.7.9 of the last changes plugin.

rmpestano commented 4 years ago

Hi @dpuglielli,

So which page are you talking about? commit.jelly is when user is browsing commit details. Why do you think it's wrong overriding the css on the jelly file?

Maybe we need to change both index.jelly and commit.jelly. Do you have a print?

Also, of note is the javascript error written to the console. The prototype.js comes from the base Jenkins installation.

Yes, this js error is there for a long time but seems to not impact the plugin functionality

Thanks for the feedback!

dpuglielli commented 4 years ago

I assumed since the CSS in the commit.jelly file very short and clear, that hiding the scroll bar had to be intentional. I could see vertical scrolling within the main-panel div. When I overrode the style in that div, it seemed to do the trick. Also, when the html body is changed to 'overflow:auto!important;' the Jenkins breadcrumb div floats with the scroll.

As for which css I modified overrode in the browser, it was the html body css generated from both the commit.jelly and index.jelly templates.

What do you want a print of?

intelmatt commented 4 years ago

Any plan to fix this? Also, is there an easy way to work around this in current Jenkins/plugin version?

It's kind of annoying not being able to scroll the "view last changes" page.

thanks

rmpestano commented 4 years ago

Hi guys, @dpuglielli can you send a PR with your fix?

Thanks and sorry for the delay in response

ws1088 commented 4 years ago

Changing

html body {
    overflow:hidden!important;
}

to

html body {
    overflow:auto!important;
}

will cause the breadcrumb to not work properly (it will stick in a fixed position while scrolling)

just commenting the line will work:

html body {
    # overflow:hidden!important;
}
rmpestano commented 4 years ago

Hey folks, can you try with following plugin snapshot on your jenkins installation? Just unzip and upload to Jenkins and let me know if the issue is fixed: last-changes.hpi.zip

Thanks!

intelmatt commented 4 years ago

@rmpestano Works for me

pete312 commented 4 years ago

Has this been released? the jenkins plugin manager is showing 2.7.9 is latest and that did not fix it.

rmpestano commented 4 years ago

Sorry folks, completely forgot to release. Just released and it should be on plugin center in a few hours.

pete312 commented 4 years ago

Thanks, That works now.