Skip to content

Commit 6fd7a2d

Browse files
author
Filipa Lacerda
committed
Merge branch 'backport-ee-7203-sticky-logs-topbar' into 'master'
Backport ee 7203 sticky logs topbar See merge request gitlab-org/gitlab-ce!22282
2 parents 5c6f55b + e290ebf commit 6fd7a2d

File tree

3 files changed

+100
-74
lines changed

3 files changed

+100
-74
lines changed

app/assets/stylesheets/framework/mixins.scss

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,100 @@
250250
max-width: 100%;
251251
}
252252

253+
/*
254+
* Mixin that handles the container for the job logs (CI/CD and kubernetes pod logs)
255+
*/
256+
@mixin build-trace {
257+
background: $black;
258+
color: $gray-darkest;
259+
white-space: pre;
260+
overflow-x: auto;
261+
font-size: 12px;
262+
border-radius: 0;
263+
border: 0;
264+
padding: $grid-size;
265+
266+
.bash {
267+
display: block;
268+
}
269+
270+
&.build-trace-rounded {
271+
border-radius: $border-radius-base;
272+
}
273+
}
274+
275+
@mixin build-trace-top-bar($height) {
276+
height: $height;
277+
min-height: $height;
278+
background: $gray-light;
279+
border: 1px solid $border-color;
280+
color: $gl-text-color;
281+
position: sticky;
282+
position: -webkit-sticky;
283+
top: $header-height;
284+
padding: $grid-size;
285+
286+
.with-performance-bar & {
287+
top: $header-height + $performance-bar-height;
288+
}
289+
}
290+
291+
/*
292+
* Mixin that handles the position of the controls placed on the top bar
293+
*/
294+
@mixin build-controllers($control-font-size, $flex-direction, $with-grow, $flex-grow-size) {
295+
display: flex;
296+
font-size: $control-font-size;
297+
justify-content: $flex-direction;
298+
align-items: center;
299+
align-self: baseline;
300+
@if $with-grow {
301+
flex-grow: $flex-grow-size;
302+
}
303+
304+
svg {
305+
width: 15px;
306+
height: 15px;
307+
display: block;
308+
fill: $gl-text-color;
309+
}
310+
311+
.controllers-buttons {
312+
color: $gl-text-color;
313+
margin: 0 $grid-size;
314+
315+
&:last-child {
316+
margin-right: 0;
317+
}
318+
}
319+
320+
.btn-scroll.animate {
321+
.first-triangle {
322+
animation: blinking-scroll-button 1s ease infinite;
323+
animation-delay: 0.3s;
324+
}
325+
326+
.second-triangle {
327+
animation: blinking-scroll-button 1s ease infinite;
328+
animation-delay: 0.2s;
329+
}
330+
331+
.third-triangle {
332+
animation: blinking-scroll-button 1s ease infinite;
333+
}
334+
335+
&:disabled {
336+
opacity: 1;
337+
}
338+
}
339+
340+
.btn-scroll:disabled,
341+
.btn-refresh:disabled {
342+
opacity: 0.35;
343+
cursor: not-allowed;
344+
}
345+
}
346+
253347
@mixin build-loader-animation {
254348
position: relative;
255349
white-space: initial;

app/assets/stylesheets/pages/builds.scss

Lines changed: 5 additions & 73 deletions
Original file line numberDiff line numberDiff line change
@@ -50,35 +50,13 @@
5050
position: relative;
5151
}
5252

53-
.build-trace {
54-
background: $black;
55-
color: $gray-darkest;
56-
white-space: pre;
57-
overflow-x: auto;
58-
font-size: 12px;
59-
border-radius: 0;
60-
border: 0;
61-
padding: $grid-size;
62-
63-
.bash {
64-
display: block;
65-
}
6653

67-
&.build-trace-rounded {
68-
border-radius: $border-radius-base;
69-
}
54+
.build-trace {
55+
@include build-trace();
7056
}
7157

7258
.top-bar {
73-
height: 35px;
74-
min-height: 35px;
75-
background: $gray-light;
76-
border: 1px solid $border-color;
77-
color: $gl-text-color;
78-
position: sticky;
79-
position: -webkit-sticky;
80-
top: $header-height;
81-
padding: $grid-size;
59+
@include build-trace-top-bar(35px);
8260

8361
&.affix {
8462
top: $header-height;
@@ -116,49 +94,7 @@
11694
}
11795

11896
.controllers {
119-
display: flex;
120-
justify-content: center;
121-
align-items: center;
122-
123-
svg {
124-
height: 15px;
125-
display: block;
126-
fill: $gl-text-color;
127-
}
128-
129-
.controllers-buttons {
130-
color: $gl-text-color;
131-
margin: 0 $grid-size;
132-
133-
&:last-child {
134-
margin-right: 0;
135-
}
136-
}
137-
138-
.btn-scroll.animate {
139-
.first-triangle {
140-
animation: blinking-scroll-button 1s ease infinite;
141-
animation-delay: 0.3s;
142-
}
143-
144-
.second-triangle {
145-
animation: blinking-scroll-button 1s ease infinite;
146-
animation-delay: 0.2s;
147-
}
148-
149-
.third-triangle {
150-
animation: blinking-scroll-button 1s ease infinite;
151-
}
152-
153-
&:disabled {
154-
opacity: 1;
155-
}
156-
}
157-
158-
.btn-scroll:disabled {
159-
opacity: 0.35;
160-
cursor: not-allowed;
161-
}
97+
@include build-controllers(15px, center, false, 0);
16298
}
16399
}
164100

@@ -183,12 +119,8 @@
183119
}
184120

185121
.with-performance-bar .build-page {
186-
.top-bar {
122+
.top-bar.affix {
187123
top: $header-height + $performance-bar-height;
188-
189-
&.affix {
190-
top: $header-height + $performance-bar-height;
191-
}
192124
}
193125
}
194126

app/views/layouts/header/_default.html.haml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
- else
66
- search_path_url = search_path
77

8-
%header.navbar.navbar-gitlab.qa-navbar.navbar-expand-sm
8+
%header.navbar.navbar-gitlab.qa-navbar.navbar-expand-sm.js-navbar
99
%a.sr-only.gl-accessibility{ href: "#content-body", tabindex: "1" } Skip to content
1010
.container-fluid
1111
.header-content

0 commit comments

Comments
 (0)