Commit 3e2f2b80 authored by Filipa Lacerda's avatar Filipa Lacerda

Adds highlight to collapsible line

In the job log adds a highlight when hovering
the collapsible line
parent c85cbc08
...@@ -603,6 +603,7 @@ $blame-blue: #254e77; ...@@ -603,6 +603,7 @@ $blame-blue: #254e77;
* Builds * Builds
*/ */
$builds-trace-bg: #111; $builds-trace-bg: #111;
$job-log-highlight-height: 18px;
/* /*
* Commit Page * Commit Page
......
...@@ -124,6 +124,26 @@ ...@@ -124,6 +124,26 @@
float: left; float: left;
padding-left: $gl-padding-8; padding-left: $gl-padding-8;
} }
.section-start {
display: inline;
}
.section-start,
.section-header {
&:hover {
cursor: pointer;
&::after {
content: '';
background-color: rgba($white-light, 0.2);
left: 0;
right: 0;
position: absolute;
height: $job-log-highlight-height;
}
}
}
} }
.build-header { .build-header {
......
---
title: Adds highlight to the collapsible section
merge_request:
author:
type: added
...@@ -218,7 +218,7 @@ module Gitlab ...@@ -218,7 +218,7 @@ module Gitlab
return if @sections.include?(section) return if @sections.include?(section)
@sections << section @sections << section
write_raw %{<div class="js-section-start fa fa-caret-down pr-2 cursor-pointer" data-timestamp="#{timestamp}" data-section="#{data_section_names}" role="button"></div>} write_raw %{<div class="js-section-start section-start fa fa-caret-down pr-2 cursor-pointer" data-timestamp="#{timestamp}" data-section="#{data_section_names}" role="button"></div>}
@lineno_in_section = 0 @lineno_in_section = 0
end end
......
...@@ -209,7 +209,7 @@ describe Gitlab::Ci::Ansi2html do ...@@ -209,7 +209,7 @@ describe Gitlab::Ci::Ansi2html do
let(:section_start) { "section_start:#{section_start_time.to_i}:#{section_name}\r\033[0K"} let(:section_start) { "section_start:#{section_start_time.to_i}:#{section_name}\r\033[0K"}
let(:section_end) { "section_end:#{section_end_time.to_i}:#{section_name}\r\033[0K"} let(:section_end) { "section_end:#{section_end_time.to_i}:#{section_name}\r\033[0K"}
let(:section_start_html) do let(:section_start_html) do
'<div class="js-section-start fa fa-caret-down pr-2 cursor-pointer"' \ '<div class="js-section-start section-start fa fa-caret-down pr-2 cursor-pointer"' \
" data-timestamp=\"#{section_start_time.to_i}\" data-section=\"#{class_name(section_name)}\"" \ " data-timestamp=\"#{section_start_time.to_i}\" data-section=\"#{class_name(section_name)}\"" \
' role="button"></div>' ' role="button"></div>'
end end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment