Skip to content

Commit

Permalink
Move radius to CSS variables, rename help button to be consistent
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Oct 22, 2021
1 parent 26423de commit 1a6662c
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 6 deletions.
2 changes: 1 addition & 1 deletion core/src/main/resources/lib/form/helpLink.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ THE SOFTWARE.
<j:choose>
<j:when test="${attrs.url!=null}">
<j:set var="altText" value="${attrs.featureName != null ? '%Help for feature:' + ' ' + attrs.featureName : '%Help'}" />
<a href="#" class="help-button" tooltip="${altText}" helpURL="${rootURL}${attrs.url}">
<a href="#" class="jenkins-help-button" tooltip="${altText}" helpURL="${rootURL}${attrs.url}">
?
</a>
</j:when>
Expand Down
2 changes: 1 addition & 1 deletion test/src/test/java/hudson/model/HelpLinkTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ private void clickAllHelpLinks(JenkinsRule.WebClient webClient, AbstractProject
}

private void clickAllHelpLinks(HtmlPage p) throws Exception {
List<?> helpLinks = DomNodeUtil.selectNodes(p, "//a[@class='help-button']");
List<?> helpLinks = DomNodeUtil.selectNodes(p, "//a[@class='jenkins-help-button']");
assertTrue(helpLinks.size()>0);
System.out.println("Clicking "+helpLinks.size()+" help links");

Expand Down
1 change: 1 addition & 0 deletions war/src/main/less/abstracts/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,7 @@
--form-item-max-width--medium: 450px;
--form-label-font-weight: bold;
--form-input-padding: 8px;
--form-input-border-radius: 6px;

// Pop out menus
--menu-text-color: black;
Expand Down
6 changes: 3 additions & 3 deletions war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
background: var(--input-color);
border: 2px solid var(--input-border);
padding: var(--form-input-padding);
border-radius: 6px;
border-radius: var(--form-input-border-radius);
width: 100%;
box-shadow: 0 0 0 10px transparent;
transition: 0.2s ease;
Expand All @@ -76,7 +76,7 @@
display: block;
background: var(--input-color);
border: 2px solid var(--input-border);
border-radius: 6px;
border-radius: var(--form-input-border-radius);
width: 100%;
margin: 0;
padding: 0 4px 0 29px;
Expand Down Expand Up @@ -356,7 +356,7 @@
}
}

.help-button {
.jenkins-help-button {
position: relative;
width: 18px;
height: 18px;
Expand Down
2 changes: 1 addition & 1 deletion war/src/main/webapp/scripts/hudson-behavior.js
Original file line number Diff line number Diff line change
Expand Up @@ -1034,7 +1034,7 @@ function rowvgStartEachRow(recursive,f) {
});


Behaviour.specify("A.help-button", "a-help-button", ++p, function(e) {
Behaviour.specify("A.jenkins-help-button", "a-jenkins-help-button", ++p, function(e) {
e.onclick = helpButtonOnClick;
e.tabIndex = 9999; // make help link unnavigable from keyboard
e.parentNode.parentNode.addClassName('has-help');
Expand Down

0 comments on commit 1a6662c

Please sign in to comment.