Skip to content

Commit

Permalink
Adjust padding, adjust sizes
Browse files Browse the repository at this point in the history
  • Loading branch information
janfaracik committed Dec 1, 2021
1 parent 19a04e8 commit 62a8614
Show file tree
Hide file tree
Showing 8 changed files with 17 additions and 21 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,9 @@ THE SOFTWARE.
<?jelly escape-by-default='true'?>
<j:jelly xmlns:j="jelly:core" xmlns:f="/lib/form">
<f:section title="${%Fingerprints}">
<f:checkbox title="Disable Fingerprint Cleanup" field="fingerprintCleanupDisabled" default="${it.fingerprintCleanupDisabled}" />
<f:entry>
<f:checkbox title="Disable Fingerprint Cleanup" field="fingerprintCleanupDisabled" default="${it.fingerprintCleanupDisabled}" />
</f:entry>
<j:if test="${descriptor.fingerprintStorageDescriptors.size() gt 1}">
<f:entry>
<f:dropdownDescriptorSelector field="storage" title="Fingerprint Storage Engine" descriptors="${descriptor.fingerprintStorageDescriptors}"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ THE SOFTWARE.
</div>
</div>
<div class="behavior-loading"><l:spinner text="${%LOADING}"/></div>
<f:form method="post" name="config" action="configSubmit">
<f:form method="post" name="config" action="configSubmit" class="jenkins-form">
<j:set var="instance" value="${it}" />
<j:set var="descriptor" value="${instance.descriptor}" />

Expand Down
4 changes: 2 additions & 2 deletions core/src/main/resources/lib/hudson/newFromList/form.jelly
Original file line number Diff line number Diff line change
Expand Up @@ -61,13 +61,13 @@ THE SOFTWARE.
</div>

<s:form class="jenkins-form" method="post" id="createItemForm" action="${attrs.action?:'createItem'}" name="createItem">
<s:entry title="${attrs.nameTitle}">
<s:entry title="${attrs.nameTitle}" class="jenkins-form-item--medium">
<s:textbox id="name" name="name" checkUrl="'${h.jsStringEscape(attrs.checkUrl)}?value='+encodeURIComponent(this.value)"
onchange="updateOk(this.form)" onkeyup="updateOk(this.form)" />
<script>$('name').focus();</script>
</s:entry>

<div class="jenkins-form-item">
<div class="jenkins-form-item jenkins-form-item--medium">
<fieldset class="jenkins-fieldset">
<legend class="jenkins-form-label">
${%View type}
Expand Down
7 changes: 4 additions & 3 deletions war/src/main/less/abstracts/theme.less
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,14 @@
--task-link-bg-color--hover: var(--very-light-grey);

// Form
--section-padding: 1.85rem;
--input-color: var(--white);
--input-border: #C3CCD1;
--input-border-hover: #5C7889;
--input-hidden-password-bg-color: #f9f9f9;
--form-item-max-width: ~"min(47.5vw, 1000px)";
--form-item-max-width--medium: ~"min(33.75vw, 800px)";
--form-item-max-width--small: ~"min(20vw, 650px)";
--form-item-max-width: ~"min(56vw, 1200px)";
--form-item-max-width--medium: ~"min(41vw, 1000px)";
--form-item-max-width--small: ~"min(26vw, 850px)";
--form-label-font-weight: bold;
--form-input-padding: 8px;
--form-input-border-radius: 6px;
Expand Down
6 changes: 3 additions & 3 deletions war/src/main/less/base/style.less
Original file line number Diff line number Diff line change
Expand Up @@ -928,7 +928,7 @@ table.parameters > tbody:hover {

.comboBoxSelectedItem {
background-color: var(--primary);
color: var(--text-color);
color: var(--background);
}

.combobox-values {
Expand Down Expand Up @@ -1111,7 +1111,7 @@ table.fingerprint-in-build td {
/* ========================= Other form related CSS ========================= */

.radioBlock-container {
margin-bottom: 0.66rem;
margin-bottom: calc(var(--section-padding) / 3);

&:last-of-type {
margin-bottom: 0;
Expand Down Expand Up @@ -1145,7 +1145,7 @@ table.fingerprint-in-build td {
}

.dropdownList-container {
margin-bottom: 1.75rem;
margin-bottom: var(--section-padding);
}

.form-container--hidden {
Expand Down
9 changes: 3 additions & 6 deletions war/src/main/less/modules/form.less
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
.jenkins-form {
max-width: var(--form-item-max-width);
}

.jenkins-form-item {
max-width: var(--form-item-max-width);
margin-bottom: 1.75rem;
margin-bottom: var(--section-padding);

// Workaround for float:right button controls
// (eg Global Credentials' Verify Configuration button being hidden by the floating submit bar)
Expand All @@ -26,10 +27,6 @@
&--medium {
max-width: var(--form-item-max-width--medium);
}

&--full-width {
max-width: none;
}
}

.jenkins-fieldset {
Expand Down Expand Up @@ -278,7 +275,7 @@
margin-top: 3px;

&:not(:last-of-type) {
margin-bottom: 20px;
margin-bottom: calc(var(--section-padding) / 2);
}

&__input {
Expand Down
4 changes: 0 additions & 4 deletions war/src/main/less/modules/section.less
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
:root {
--section-padding: 1.75rem;
}

.jenkins-section {
border-top: 2px solid var(--panel-border-color);
padding: var(--section-padding) 0 0 0;
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 @@ -2349,7 +2349,7 @@ var hoverNotification = (function() {
// Decrease vertical padding for checkboxes
window.addEventListener('load', function () {
document.querySelectorAll(".jenkins-form-item").forEach(function (element) {
if (element.querySelector(":scope > .optionalBlock-container > .row-group-start input[type='checkbox'], :scope > .optional-block-start input[type='checkbox'], :scope > div > .jenkins-checkbox") != null) {
if (element.querySelector(".optionalBlock-container > .row-group-start input[type='checkbox'], .optional-block-start input[type='checkbox'], div > .jenkins-checkbox") != null) {
element.classList.add("jenkins-form-item--tight")
}
});
Expand Down

0 comments on commit 62a8614

Please sign in to comment.