Skip to content

Commit c9365d8

Browse files
committed
Init
1 parent be95267 commit c9365d8

File tree

5 files changed

+41
-26
lines changed

5 files changed

+41
-26
lines changed

core/src/main/resources/lib/form/bottomButtonBar.jelly

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,13 @@ THE SOFTWARE.
2828
Creates a button bar at the bottom of the page for things like "Submit".
2929
The actual buttons should be specified as the body of this tag.
3030
This area will always be visible at the bottom of the screen.
31+
32+
<st:attribute name="borderless">
33+
Hides the border of the bottom app bar unless its overlaying content.
34+
</st:attribute>
3135
</st:documentation>
3236

33-
<div class="jenkins-bottom-app-bar__shadow"></div>
37+
<div class="jenkins-bottom-app-bar__shadow ${attrs.borderless ? 'jenkins-bottom-app-bar__shadow--borderless' : ''}"></div>
3438
<div id="bottom-sticker">
3539
<div class="bottom-sticker-inner jenkins-buttons-row jenkins-buttons-row--equal-width">
3640
<d:invokeBody />

src/main/scss/abstracts/_theme.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ $semantics: (
7777
--header-height: 4.125rem;
7878

7979
// App bar
80+
--bottom-app-bar-padding: 0.875rem;
8081
--bottom-app-bar-shadow: color-mix(
8182
in sRGB,
8283
var(--text-color-secondary) 8%,
@@ -201,8 +202,7 @@ $semantics: (
201202
--dialog-background: var(--card-background);
202203
--dialog-box-shadow:
203204
var(--jenkins-border--subtle-shadow), 0 5px 25px rgb(0 0 10 / 0.025),
204-
0 0 1.5px color-mix(in sRGB, var(--black) 20%, transparent),
205-
inset 0 0 0 1px rgb(255 255 255 / 0.05);
205+
0 0 1.5px color-mix(in sRGB, var(--black) 20%, transparent);
206206

207207
::backdrop {
208208
--dialog-backdrop-backdrop-filter: blur(0.25px);

src/main/scss/components/_app-bar.scss

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -125,25 +125,15 @@
125125
text-overflow: ellipsis;
126126
}
127127

128-
$bottom-app-bar-padding: 0.875rem;
129-
130128
.jenkins-bottom-app-bar__shadow {
131-
--semi-translucent: color-mix(in sRGB, var(--background) 75%, transparent);
129+
--semi-translucent: color-mix(in sRGB, var(--background) 100%, transparent);
132130

133131
position: sticky;
134132
height: calc(
135-
2.375rem + ($bottom-app-bar-padding * 2) + 1px + var(--jenkins-border-width)
133+
2.375rem + (var(--bottom-app-bar-padding) * 2) + 1px + var(--jenkins-border-width)
136134
);
137135
bottom: -1px;
138-
margin-bottom: calc((2.375rem + $bottom-app-bar-padding) * -1);
139-
backdrop-filter: blur(20px);
140-
background: linear-gradient(
141-
to right,
142-
var(--background),
143-
var(--semi-translucent) 3rem,
144-
var(--semi-translucent) calc(100% - 3rem),
145-
var(--background)
146-
);
136+
margin-bottom: calc((2.375rem + calc(var(--bottom-app-bar-padding) * 2)) * -1);
147137
border-top: var(--jenkins-border-width) solid var(--jenkins-border-color);
148138
z-index: 997;
149139

@@ -167,7 +157,19 @@ $bottom-app-bar-padding: 0.875rem;
167157
opacity: 0;
168158
}
169159

160+
&--borderless:not(&--stuck) {
161+
border-top-color: transparent;
162+
}
163+
170164
&--stuck {
165+
background: linear-gradient(
166+
to right,
167+
var(--background),
168+
var(--semi-translucent) 3rem,
169+
var(--semi-translucent) calc(100% - 3rem),
170+
var(--background)
171+
);
172+
171173
&::after {
172174
opacity: 1 !important;
173175
}
@@ -183,5 +185,5 @@ $bottom-app-bar-padding: 0.875rem;
183185

184186
.bottom-sticker-inner {
185187
position: relative;
186-
padding: $bottom-app-bar-padding 0;
188+
padding: var(--bottom-app-bar-padding) 0;
187189
}

src/main/scss/components/_dialogs.scss

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@ $jenkins-dialog-padding: 1.25rem;
22

33
.jenkins-dialog {
44
--background: var(--dialog-background);
5+
--section-padding: #{$jenkins-dialog-padding};
6+
--bottom-app-bar-padding: #{$jenkins-dialog-padding};
57

68
border-radius: 1rem;
79
border: none;
@@ -13,7 +15,8 @@ $jenkins-dialog-padding: 1.25rem;
1315
display: flex;
1416
flex-direction: column;
1517
gap: $jenkins-dialog-padding;
16-
outline: none;
18+
// Thin highlight for dark themes to differentiate the dialog from its backdrop
19+
outline: 1px solid rgb(255 255 255 / 0.05);
1720

1821
&::backdrop {
1922
background: color-mix(
@@ -32,7 +35,7 @@ $jenkins-dialog-padding: 1.25rem;
3235
color: var(--text-color);
3336
overflow-wrap: anywhere;
3437
text-box: cap alphabetic;
35-
margin-top: 0.5625rem;
38+
margin-top: 0.625rem;
3639
}
3740

3841
&__contents {

war/src/main/webapp/scripts/hudson-behavior.js

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1764,19 +1764,25 @@ function rowvgStartEachRow(recursive, f) {
17641764

17651765
window.addEventListener("load", function () {
17661766
// Add a class to the bottom bar when it's stuck to the bottom of the screen
1767-
const el = document.querySelector(".jenkins-bottom-app-bar__shadow");
1768-
if (el) {
1767+
Behaviour.specify(".jenkins-bottom-app-bar__shadow", "jenkins-bottom-app-bar__shadow", 0, function (el) {
1768+
const dialog = el.closest("dialog");
1769+
17691770
const observer = new IntersectionObserver(
1770-
([e]) =>
1771-
e.target.classList.toggle(
1771+
function (entries) {
1772+
const e = entries[0];
1773+
el.classList.toggle(
17721774
"jenkins-bottom-app-bar__shadow--stuck",
17731775
e.intersectionRatio < 1,
1774-
),
1775-
{ threshold: [1] },
1776+
);
1777+
},
1778+
{
1779+
threshold: [1],
1780+
root: dialog || null,
1781+
},
17761782
);
17771783

17781784
observer.observe(el);
1779-
}
1785+
});
17801786
});
17811787

17821788
/**

0 commit comments

Comments
 (0)