-
Notifications
You must be signed in to change notification settings - Fork 281
UI renovation #506
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
UI renovation #506
Conversation
Adjust all UI elements to use styling consistent with current Jenkins This affects all tables, input fields, checkboxes, icons, buttons, ... Follow guidelines from the design library and remove any backlinks in the sidebar Use ionicons where possible only use Jenkins defined color names to ensure compatibility with dark theme remove blockwrapper for compatibility with old Jenkins remove some validation methods for integer values that can be covered by using f:number instead of f:textbox reimplement the gerrit-server table with modern javascript (removes the old YUI related things). This requires to disable the jslint4jvava (10 year old version) as this doesn't understand modern js (e.g. no template literals, params with default values) extract inline style definitions to separate css remove inline javascript (onClick attribute of td) by using Behaviour.specify
06eaf49
to
4e9dee7
Compare
b506c41
to
d6d0986
Compare
@mawinter69 Really nice. I found out two codestyle violation on the patcheset that I have fixed locally |
@mawinter69 the UI let me lost my server configuratoin that does not appear anymore |
Please apply those fix
|
If the server name contains special char like & then it does not get show as should be. I found this fix but I don't think that is the best way
|
Thanks for the feedback
Fixed it in the correct way by using innerHTML |
Is possible for you to squash the latest 3 commits and clean the commit message. I mean if you have some fixes on not merged patches they can go back to the initial patch |
:+1 I have deployed it and it works as far I can test |
@@ -304,7 +304,6 @@ | |||
<artifactId>maven-surefire-plugin</artifactId> | |||
<configuration> | |||
<reuseForks>false</reuseForks> | |||
<forkCount>${concurrency}</forkCount> | |||
</configuration> |
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.
Is this required?
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 prevented that the forkCount can be set by the ci and that you can set it via command line with -DforkCount ro othat the forkCount setting from line 68 was effective
<j:choose> | ||
<j:when test="${other.hasBuild()}"> |
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.
Can you point out, where this change impact?
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.
when another build is referenced but that build has already been deleted the image was missing
@@ -3,7 +3,7 @@ | |||
<l:layout title="${%Gerrit Manual trigger}" norefresh="true" permission="${it.requiredPermission}"> | |||
<l:header> | |||
<script src="${rootURL}${it.getJsUrl('gerrit-search.js')}" type="text/javascript"/> | |||
<link rel="stylesheet" href="${rootURL}/plugin/gerrit-trigger/css/gerrit.css" type="text/css"/> | |||
<link rel="stylesheet" href="${rootURL}/plugin/gerrit-trigger/css/gerrit.css" type="text/css"/> | |||
</l:header> |
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.
Is this relevant?
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 caused problems with using dark theme. Also to be conform with CSP, there should be no inline style tags
@@ -86,7 +86,7 @@ function refreshServerTable() { | |||
a.href = server.frontEndUrl; | |||
a.target = "_blank"; | |||
a.classList.add("gt-external-link"); | |||
a.appendChild(document.createTextNode(server.name)); | |||
a.innerHTML = server.name; | |||
a.appendChild(generateSVGIcon("gerrit-symbol-link")); |
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.
Any security risk for server name?
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.
No, It was using innerHTML before, the server.name is already escaped
7d85955
to
2a60fea
Compare
@@ -28,12 +28,6 @@ THE SOFTWARE. | |||
<?jelly escape-by-default='true'?> | |||
<j:jelly xmlns:j="jelly:core" xmlns:l="/lib/layout"> | |||
<l:layout norefresh="true" permission="${app.ADMINISTER}" title="${%Add New Server}"> | |||
<l:side-panel> |
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.
Why remove the side panel? It's nothing important, just curious.
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.
Following the the design library recommendations (https://weekly.ci.jenkins.io/design-library/Layouts/) hierarchical links should be avoided
<f:entry title="${%Started}" | ||
help="/plugin/gerrit-trigger/help-GerritBuildStartedVerified.html"> | ||
<f:textbox name="gerritBuildStartedVerifiedValue" | ||
value="${it.config.gerritBuildStartedVerifiedValue}" | ||
checkUrl="'${rootURL}/${serverURL}/emptyOrIntegerCheck?value='+escape(this.value)"/> | ||
clazz="number"/> |
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.
does this allow empty values?
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.
yes
help="/plugin/gerrit-trigger/help-GerritVerifiedCmdBuildSuccessful.html"> | ||
<f:textarea name="gerritVerifiedCmdBuildSuccessful" | ||
value="${it.config.gerritCmdBuildSuccessful}" | ||
default="gerrit review <CHANGE>,<PATCHSET> --message 'Build Successful <BUILDS_STATS>' --verified <VERIFIED> --code-review <CODE_REVIEW>"/> |
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 just merged a PR that added a parameter here to the defaults, so I guess there will be a merge conflict that needs to be resolved.
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.
Or maybe I didn't 🤔
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.
Thank you so much for doing this! You are awesome!
And sorry for not reviewing until now.
Adjust all UI elements to use styling consistent with current Jenkins
This affects all tables, input fields, checkboxes, icons, buttons, ...
Follow guidelines from the design library and remove any backlinks in the sidebar
Use ionicons where possible
Only use Jenkins defined color names to ensure compatibility with dark theme
remove blockwrapper for compatibility with old Jenkins
remove some validation methods for integer values that can be covered by using f:number instead of f:textbox
reimplement the gerrit-server table with modern javascript (removes the old YUI related things). This requires to disable the jslint4jvava (10 year old version) as this doesn't understand modern js (e.g. no template literals, params with default values, const and let)
extract inline style definitions to separate css
remove inline javascript (onClick attribute of td) by using Behaviour.specify
checkurl without inline js
ScreenShots After
Search:  Gerrit Management:

Gerrit Server:



Diagnostics:



Project Trigger configuration:


Testing done
Manual testing of UI