-
-
Notifications
You must be signed in to change notification settings - Fork 8.9k
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
JENKINS-65033 Run / Project summary - tables to divs #5351
JENKINS-65033 Run / Project summary - tables to divs #5351
Conversation
@@ -304,6 +304,7 @@ public static void initPageVariables(JellyContext context) { | |||
context.setVariable("resURL",rootURL+getResourcePath()); | |||
context.setVariable("imagesURL",rootURL+getResourcePath()+"/images"); | |||
context.setVariable("divBasedFormLayout", true); | |||
context.setVariable("divBasedRunLayout", true); |
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.
used in jenkinsci/workflow-job-plugin#180 to adapt to this change without requiring a core bump
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.
Since most of those forms (summary.jelly
) start with a copy and paste operation I assume that there are a lot of additional plugins that need to be changed.
Could we hold this a bit until we've closed out the previous t2d migration? It's barely in LTS, so I expect further regression reports etc. |
I agree with Daniel, there is likely to be more regressions. Also there seems to be a failing test. |
the scale for this is far smaller, we can wait a bit but doesn't need a year like the other one
Yes aware, my IDE doesn't want to run the test without throwing nullpointers in unrelated places -.- |
@@ -25,13 +25,16 @@ THE SOFTWARE. | |||
<?jelly escape-by-default='true'?> | |||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | |||
<t:summary icon="orange-square.png"> | |||
${%Caused by} |
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.
Maybe a more explicit Build started by
or Build caused by
? Caused by
seems fine as well
Not sure whats a good wording for it is.
Personally I'm not a fan of the icon but that's outside the scope of this PR and with the new icons coming in this might be updated at some point.
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.
Looks fine to me.
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.
Code looks good. Same as above, I'd still suggest having a LTS line stable before going ahead with this.
@@ -107,9 +107,11 @@ THE SOFTWARE. | |||
|
|||
<!-- give actions a chance to contribute summary item --> | |||
<j:forEach var="a" items="${it.allActions}"> | |||
<st:include page="summary.jelly" from="${a}" optional="true" it="${a}" /> | |||
<div style="margin-top: 1em;"> |
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.
I'm guessing quite a lot more of breaking in plugins.
Ex: https://github.com/jenkinsci/build-failure-analyzer-plugin/blob/master/src/main/resources/com/sonyericsson/jenkins/plugins/bfa/model/FailureCauseBuildAction/summary.groovy
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.
Pretty sure I tested BFA and it rendered fine, can double check 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.
Job page, browser allows the table and it looks the same as before:
Run page, browser throws out the table tags, it looks fine except it's using a heading tag which is defined as a block element which moves it down a line
We could maybe set an adjacent sibling selector to make headings display inline if after an img
tag or svg, any thoughts @fqueiruga ?
Doesn't look like a blocker anyway to me, thoughts?
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.
Nah, that looks OK. Hopefully it won't break things rendered after it, though I don't think it will since it closes it's table tags.
@@ -25,13 +25,16 @@ THE SOFTWARE. | |||
<?jelly escape-by-default='true'?> | |||
<j:jelly xmlns:j="jelly:core" xmlns:st="jelly:stapler" xmlns:d="jelly:define" xmlns:l="/lib/layout" xmlns:t="/lib/hudson" xmlns:f="/lib/form"> | |||
<t:summary icon="orange-square.png"> | |||
${%Caused by} |
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.
Looks fine to me.
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 will likely lead to some UI regressions, and it is highly likely we will need upgrade guidelines for that. Besides that, I think this is ready to go.
We may merge it in 24 hours if there is no negative feedback. Please see the merge process documentation for more information about the merge process
@@ -56,7 +56,7 @@ THE SOFTWARE. | |||
<t:editableDescription permission="${it.UPDATE}" /> | |||
</div> | |||
|
|||
<table style="margin-top: 1em; margin-left:1em;"> | |||
<div> |
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.
Not sure how things are done with styling etc now in the modern times. But I think it would be nice if this div had an id
for page decorators et.al. if they need to manipulate it somehow. Themes would also have it easier to style it I guess?
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.
not really sure why you would need them.
themes should be able to use selectors and if they are finding a need for it they can add them at the time.
@@ -30,17 +30,21 @@ THE SOFTWARE. | |||
|
|||
<p:projectActionFloatingBox /> | |||
|
|||
<table style="margin-top: 1em; margin-left:1em;"> | |||
<div style="margin-top: 1em; margin-left:1em;"> |
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 this one too?
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.
A justification for a potential breaking change should be provided. None is given in this PR, or at least it's unclear: The description indicates that this fixes a plugin's UI. Was it always broken and this just makes it work (at what cost?)? Did we cause a regression (where?) and this is a regression fix?
Needs corresponding developer documentation.
I would also like to see evidence of a more exhaustive ecosystem search for incompatible plugins before this is merged, or an explanation why this would be an excessively rare occurrence.
Maybe I'm overly cautious here but we've had many regressions from config form t2d, some right here in core and in extremely popular plugins that were only discovered after merging, and I would not want to see this again.
I found a few plugins that show a |
I would expect those plugins to be troublesome already, they could already break the layout as that sounds like the scenario this PR is trying to fix. Most likely they will behave fine after this as table is a valid child of What plugins? |
https://plugins.jenkins.io/groovy-label-assignment/ and https://plugins.jenkins.io/show-build-parameters/ have https://plugins.jenkins.io/violations/ has both a If |
Markup here looks really weird, the same outcome would've been done with no table or anything =/, unless i'm missing something: https://github.com/jenkinsci/allure-plugin/blob/master/src/main/resources/ru/yandex/qatools/allure/jenkins/AllureBuildAction/summary.jelly#L3-L7, it would need checking, I can't tell from looking at it if it would render ok. the pane ones are worth checking, the title will likely be moved onto a new line rather than adjacent to the image Other than misunderstanding of html layout this will work: https://plugins.jenkins.io/appetize/, instead of |
No plans to work on this atm |
See JENKINS-65033.
This required some minor adaption in a few plugins that had a block layout (should have been inline) next to the icon, see jenkinsci/warnings-ng-plugin#841, jenkinsci/code-coverage-api-plugin#185
This is a lot safer than forms as it won't break anything, possibly minor changes in some plugins, I've tested all the ones we use on ci.jenkins.io and https://plugins.jenkins.io/sauce-ondemand which was broken without this change due to tables nesting
Proposed changelog entries
divBasedRunLayout
jelly variable available for detecting if Jenkins uses divs for run summary pageProposed upgrade guidelines
N/A
Submitter checklist
Proposed changelog entries
section only if there are breaking changes or other changes which may require extra steps from users during the upgradeDesired reviewers
@mention
Maintainer checklist
Before the changes are marked as
ready-for-merge
:Proposed changelog entries
are correctupgrade-guide-needed
label is set and there is aProposed upgrade guidelines
section in the PR title. (example)lts-candidate
to be considered (see query).