Commit aa725dc6 authored by Natalia Tepluhina's avatar Natalia Tepluhina

Merge branch '239861-scope-graph-pipeline-show-page-css' into 'master'

Scope css pipeline graph rules to the pipelines show page

See merge request gitlab-org/gitlab!43651
parents d532a70e edb0429d
...@@ -386,271 +386,272 @@ ...@@ -386,271 +386,272 @@
} }
} }
} }
}
.pipeline-tab-content {
display: flex;
width: 100%;
min-height: $dropdown-max-height-lg;
background-color: $gray-light;
padding: $gl-padding 0;
overflow: auto;
}
// Pipeline graph
.pipeline-graph {
white-space: nowrap;
transition: max-height 0.3s, padding 0.3s;
.stage-column-list,
.builds-container > ul {
padding: 0;
}
a { .pipeline-tab-content {
text-decoration: none; display: flex;
color: $gl-text-color; width: 100%;
} min-height: $dropdown-max-height-lg;
background-color: $gray-light;
svg { padding: $gl-padding 0;
vertical-align: middle; overflow: auto;
} }
.stage-column { // Pipeline graph, used at
display: inline-block; // app/assets/javascripts/pipelines/components/graph/graph_component.vue
vertical-align: top; .pipeline-graph {
white-space: nowrap;
&.left-margin { transition: max-height 0.3s, padding 0.3s;
&:not(:first-child) {
margin-left: 44px;
.left-connector { .stage-column-list,
@include flat-connector-before; .builds-container > ul {
} padding: 0;
}
} }
&.no-margin { a {
margin: 0; text-decoration: none;
color: $gl-text-color;
} }
li { svg {
list-style: none; vertical-align: middle;
} }
// when downstream pipelines are present, the last stage isn't the last column .stage-column {
&:last-child:not(.has-downstream) { display: inline-block;
.build { vertical-align: top;
// Remove right connecting horizontal line from first build in last stage
&:first-child::after {
border: 0;
}
// Remove right curved connectors from all builds in last stage
&:not(:first-child)::after {
border: 0;
}
// Remove opposite curve
.curve::before {
display: none;
}
}
}
// when upstream pipelines are present, the first stage isn't the first column &.left-margin {
&:first-child:not(.has-upstream) { &:not(:first-child) {
.build { margin-left: 44px;
// Remove left curved connectors from all builds in first stage
&:not(:first-child)::before { .left-connector {
border: 0; @include flat-connector-before;
} }
// Remove opposite curve
.curve::after {
display: none;
} }
} }
}
// Curve first child connecting lines in opposite direction
.curve {
display: none;
&::before, &.no-margin {
&::after { margin: 0;
content: '';
width: 21px;
height: 25px;
position: absolute;
top: -31px;
border-top: 2px solid $border-color;
} }
&::after { li {
left: -44px; list-style: none;
border-right: 2px solid $border-color;
border-radius: 0 20px;
} }
&::before { // when downstream pipelines are present, the last stage isn't the last column
right: -44px; &:last-child:not(.has-downstream) {
border-left: 2px solid $border-color; .build {
border-radius: 20px 0 0; // Remove right connecting horizontal line from first build in last stage
&:first-child::after {
border: 0;
}
// Remove right curved connectors from all builds in last stage
&:not(:first-child)::after {
border: 0;
}
// Remove opposite curve
.curve::before {
display: none;
}
}
} }
}
}
.stage-name {
margin: 0 0 15px 10px;
font-weight: $gl-font-weight-bold;
width: 176px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 2.2em;
}
.build { // when upstream pipelines are present, the first stage isn't the first column
position: relative; &:first-child:not(.has-upstream) {
width: 186px; .build {
margin-bottom: 10px; // Remove left curved connectors from all builds in first stage
white-space: normal; &:not(:first-child)::before {
border: 0;
.ci-job-dropdown-container { }
// override dropdown.scss // Remove opposite curve
.dropdown-menu li button { .curve::after {
padding: 0; display: none;
text-align: center; }
}
} }
}
// ensure .build-content has hover style when action-icon is hovered // Curve first child connecting lines in opposite direction
.ci-job-dropdown-container:hover .build-content { .curve {
@extend .build-content:hover; display: none;
}
.ci-status-icon svg { &::before,
height: 24px; &::after {
width: 24px; content: '';
} width: 21px;
height: 25px;
position: absolute;
top: -31px;
border-top: 2px solid $border-color;
}
.dropdown-menu-toggle { &::after {
background-color: transparent; left: -44px;
border: 0; border-right: 2px solid $border-color;
padding: 0; border-radius: 0 20px;
}
&:focus { &::before {
outline: none; right: -44px;
border-left: 2px solid $border-color;
border-radius: 20px 0 0;
}
} }
} }
.build-content { .stage-name {
@include build-content(); margin: 0 0 15px 10px;
font-weight: $gl-font-weight-bold;
width: 176px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
line-height: 2.2em;
} }
a.build-content:hover, .build {
button.build-content:hover { position: relative;
background-color: $gray-darker; width: 186px;
border: 1px solid $dropdown-toggle-active-border-color; margin-bottom: 10px;
} white-space: normal;
// Connect first build in each stage with right horizontal line .ci-job-dropdown-container {
&:first-child { // override dropdown.scss
&::after { .dropdown-menu li button {
content: ''; padding: 0;
position: absolute; text-align: center;
top: 48%; }
right: -48px;
border-top: 2px solid $border-color;
width: 48px;
height: 1px;
} }
}
// Connect each build (except for first) with curved lines // ensure .build-content has hover style when action-icon is hovered
&:not(:first-child) { .ci-job-dropdown-container:hover .build-content {
&::after, @extend .build-content:hover;
&::before {
content: '';
top: -49px;
position: absolute;
border-bottom: 2px solid $border-color;
width: 25px;
height: 69px;
} }
// Right connecting curves .ci-status-icon svg {
&::after { height: 24px;
right: -25px; width: 24px;
border-right: 2px solid $border-color;
border-radius: 0 0 20px;
} }
// Left connecting curves .dropdown-menu-toggle {
&::before { background-color: transparent;
left: -25px; border: 0;
border-left: 2px solid $border-color; padding: 0;
border-radius: 0 0 0 20px;
&:focus {
outline: none;
}
} }
}
// Connect second build to first build with smaller curved line .build-content {
&:nth-child(2) { @include build-content();
&::after,
&::before {
height: 29px;
top: -9px;
} }
.curve { a.build-content:hover,
display: block; button.build-content:hover {
background-color: $gray-darker;
border: 1px solid $dropdown-toggle-active-border-color;
} }
}
}
.ci-action-icon-container { // Connect first build in each stage with right horizontal line
position: absolute; &:first-child {
right: 5px; &::after {
top: 50%; content: '';
transform: translateY(-50%); position: absolute;
top: 48%;
right: -48px;
border-top: 2px solid $border-color;
width: 48px;
height: 1px;
}
}
// Action Icons in big pipeline-graph nodes // Connect each build (except for first) with curved lines
&.ci-action-icon-wrapper { &:not(:first-child) {
height: 30px; &::after,
width: 30px; &::before {
border-radius: 100%; content: '';
display: block; top: -49px;
padding: 0; position: absolute;
line-height: 0; border-bottom: 2px solid $border-color;
width: 25px;
height: 69px;
}
svg { // Right connecting curves
fill: $gl-text-color-secondary; &::after {
right: -25px;
border-right: 2px solid $border-color;
border-radius: 0 0 20px;
}
// Left connecting curves
&::before {
left: -25px;
border-left: 2px solid $border-color;
border-radius: 0 0 0 20px;
}
} }
.spinner { // Connect second build to first build with smaller curved line
top: 2px; &:nth-child(2) {
&::after,
&::before {
height: 29px;
top: -9px;
}
.curve {
display: block;
}
} }
}
.ci-action-icon-container {
position: absolute;
right: 5px;
top: 50%;
transform: translateY(-50%);
// Action Icons in big pipeline-graph nodes
&.ci-action-icon-wrapper {
height: 30px;
width: 30px;
border-radius: 100%;
display: block;
padding: 0;
line-height: 0;
&.play {
svg { svg {
left: 1px; fill: $gl-text-color-secondary;
top: 1px; }
.spinner {
top: 2px;
}
&.play {
svg {
left: 1px;
top: 1px;
}
} }
} }
} }
}
.stage-action svg { .stage-action svg {
left: 1px; left: 1px;
top: -2px; top: -2px;
}
} }
}
// Triggers the dropdown in the big pipeline graph // Triggers the dropdown in the big pipeline graph
.dropdown-counter-badge { .dropdown-counter-badge {
font-weight: 100; font-weight: 100;
font-size: 15px; font-size: 15px;
position: absolute; position: absolute;
right: 13px; right: 13px;
top: 8px; top: 8px;
}
} }
.ci-build-text, .ci-build-text,
......
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