Commit f9c103c2 authored by Filipa Lacerda's avatar Filipa Lacerda

Fix tooltip to show the all name

CSS - Changes to look like newest mockups
- Simplifies nested elements
- Divides nodes from lines

Remove is playable from left side

Remove nested elements in scss

Improve dropdown

Focus state

Fix scss linter
Remove not used css

Fix typo
parent c3c9122d
...@@ -287,15 +287,40 @@ ...@@ -287,15 +287,40 @@
} }
// Pipeline visualization // Pipeline visualization
.pipeline-actions {
border-bottom: none;
}
.toggle-pipeline-btn { .tab-pane {
background-color: $gray-dark; &.pipelines {
.ci-table {
min-width: 900px;
}
&.graph-collapsed { .content-list.pipelines {
background-color: $white-light; overflow: auto;
}
.stage {
max-width: 100px;
width: 100px;
}
.pipeline-actions {
min-width: initial;
}
}
&.builds {
.ci-table {
tr {
height: 71px;
}
}
} }
} }
// Pipeline graph
.pipeline-graph { .pipeline-graph {
width: 100%; width: 100%;
background-color: $background-color; background-color: $background-color;
...@@ -304,21 +329,21 @@ ...@@ -304,21 +329,21 @@
white-space: nowrap; white-space: nowrap;
transition: max-height 0.3s, padding 0.3s; transition: max-height 0.3s, padding 0.3s;
&.graph-collapsed { ul {
max-height: 0; padding: 0;
padding: 0 16px;
} }
}
.pipeline-visualization { a {
position: relative; text-decoration: none;
color: $gl-text-color-light;
}
ul { svg {
padding: 0; vertical-align: middle;
margin-right: 3px;
} }
}
.stage-column { .stage-column {
display: inline-block; display: inline-block;
vertical-align: top; vertical-align: top;
...@@ -352,6 +377,74 @@ ...@@ -352,6 +377,74 @@
list-style: none; list-style: none;
} }
&:last-child {
.build {
// Remove right connecting horizontal line from first build in last stage
&:first-child {
&::after {
border: none;
}
}
// Remove right curved connectors from all builds in last stage
&:not(:first-child) {
&::after {
border: none;
}
}
// Remove opposite curve
.curve {
&::before {
display: none;
}
}
}
}
&:first-child {
.build {
// Remove left curved connectors from all builds in first stage
&:not(:first-child) {
&::before {
border: none;
}
}
// Remove opposite curve
.curve {
&::after {
display: none;
}
}
}
}
// Curve first child connecting lines in opposite direction
.curve {
display: none;
&::before,
&::after {
content: '';
width: 21px;
height: 25px;
position: absolute;
top: -31px;
border-top: 2px solid $border-color;
}
&::after {
left: -44px;
border-right: 2px solid $border-color;
border-radius: 0 20px;
}
&::before {
right: -44px;
border-left: 2px solid $border-color;
border-radius: 20px 0 0;
}
}
}
.stage-name { .stage-name {
margin: 0 0 15px 10px; margin: 0 0 15px 10px;
font-weight: bold; font-weight: bold;
...@@ -365,24 +458,12 @@ ...@@ -365,24 +458,12 @@
border: 1px solid $border-color; border: 1px solid $border-color;
border-radius: 30px; border-radius: 30px;
background-color: $white-light; background-color: $white-light;
color: $gl-text-color;
position: relative; position: relative;
padding: 7px 10px 8px; padding: 8px 10px 9px;
width: 186px; width: 186px;
margin-bottom: 10px; margin-bottom: 10px;
&:hover {
background-color: $stage-hover-bg;
border: 1px solid $stage-hover-border;
.ci-status-text,
.dropdown-counter-bagde {
color: $gl-text-color;
}
}
&.playable { &.playable {
svg { svg {
height: 13px; height: 13px;
width: 20px; width: 20px;
...@@ -395,99 +476,28 @@ ...@@ -395,99 +476,28 @@
} }
} }
.build-content { &:hover {
display: -ms-flexbox; background-color: $stage-hover-bg;
display: -webkit-flex; border: 1px solid $stage-hover-border;
display: flex;
width: 164px;
.ci-status-icon {
svg {
height: 20px;
width: 20px;
}
}
.tooltip {
white-space: nowrap;
.tooltip-inner {
overflow: hidden;
text-overflow: ellipsis;
}
}
.ci-status-text {
max-width: 110px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
vertical-align: bottom;
display: inline-block;
position: relative;
font-weight: 100;
}
a {
color: $gl-text-color-light;
text-decoration: none;
}
a,
.dropdown-counter-badge,
.dropdown-menu-toggle { .dropdown-menu-toggle {
background-color: transparent; color: $gl-text-color;
border: none;
width: auto;
padding: 0;
color: $gl-text-color-light;
flex-grow: 1;
.ci-status-text {
max-width: 110px;
width: auto;
}
}
.grouped-pipeline-dropdown {
padding: 0;
width: 186px;
left: auto;
right: -197px;
top: -9px;
ul {
max-height: 245px;
overflow: auto;
li:first-child {
padding-top: 8px;
}
li:last-child {
padding-bottom: 8px;
}
} }
a { .grouped-pipeline-dropdown a {
color: $gl-text-color; color: $gl-text-color-light;
padding: 7px 8px 8px;
&:hover { &:hover {
background-color: $blue-light-transparent; color: $gl-text-color;
border-radius: 3px;
.ci-status-text {
text-decoration: none;
}
} }
} }
svg {
width: 14px;
height: 14px;
} }
.ci-status-text { .ci-status-icon svg {
width: 110px; height: 20px;
width: 20px;
} }
.arrow { .arrow {
...@@ -517,29 +527,6 @@ ...@@ -517,29 +527,6 @@
border-right-color: $white-light; border-right-color: $white-light;
} }
} }
}
.badge {
background-color: $gray-darker;
color: $gl-text-color-light;
font-weight: normal;
margin-left: $btn-xs-side-margin;
}
}
.dropdown-counter-bagde {
float: right;
color: $stage-bagde-text;
font-weight: 100;
font-size: 13px;
margin-top: 1px;
margin-right: 2px;
}
svg {
vertical-align: middle;
margin-right: 3px;
}
// Connect first build in each stage with right horizontal line // Connect first build in each stage with right horizontal line
&:first-child { &:first-child {
...@@ -595,113 +582,86 @@ ...@@ -595,113 +582,86 @@
} }
} }
&:last-child { .ci-status-text {
.build { max-width: 110px;
// Remove right connecting horizontal line from first build in last stage white-space: nowrap;
&:first-child { overflow: hidden;
&::after { text-overflow: ellipsis;
border: none; vertical-align: bottom;
} display: inline-block;
} position: relative;
// Remove right curved connectors from all builds in last stage font-weight: 100;
&:not(:first-child) {
&::after {
border: none;
}
}
// Remove opposite curve
.curve {
&::before {
display: none;
}
}
}
} }
&:first-child { .dropdown-menu-toggle {
.build { background-color: transparent;
// Remove left curved connectors from all builds in first stage
&:not(:first-child) {
&::before {
border: none; border: none;
} padding: 0;
} color: $gl-text-color-light;
// Remove opposite curve flex-grow: 1;
.curve {
&::after {
display: none;
}
}
}
}
// Curve first child connecting lines in opposite direction
.curve {
display: none;
&::before, &:focus {
&::after { outline: none;
content: '';
width: 21px;
height: 25px;
position: absolute;
top: -32px;
border-top: 2px solid $border-color;
} }
&::after { &:hover {
left: -44px; color: $gl-text-color;
border-right: 2px solid $border-color;
border-radius: 0 20px;
}
&::before { .dropdown-counter-bagde {
right: -44px; color: $gl-text-color;
border-left: 2px solid $border-color;
border-radius: 20px 0 0;
} }
} }
}
.pipeline-actions {
border-bottom: none;
}
.toggle-pipeline-btn {
.fa {
color: $dropdown-header-color;
} }
}
.tab-pane {
&.pipelines {
.ci-table { .dropdown-counter-bagde {
min-width: 900px; float: right;
color: $stage-bagde-text;
font-weight: 100;
font-size: 13px;
margin-top: 1px;
margin-right: 2px;
} }
.content-list.pipelines { .grouped-pipeline-dropdown {
padding: 0;
width: 191px;
left: auto;
right: -206px;
top: -11px;
box-shadow: 0 1px 5px $black-transparent;
ul {
max-height: 245px;
overflow: auto; overflow: auto;
li {
padding-top: 1px;
padding-bottom: 1px;
} }
.stage { li:first-child {
max-width: 100px; padding-top: 9px;
width: 100px;
} }
.pipeline-actions { li:last-child {
min-width: initial; padding-bottom: 9px;
} }
} }
&.builds { a {
color: $gl-text-color-light;
padding: 7px 8px 8px;
.ci-table { &:hover {
tr { background-color: $stage-hover-bg;
height: 71px; border-radius: 3px;
color: $gl-text-color;
}
} }
.ci-status-icon svg {
height: 18px;
width: 18px;
} }
} }
} }
- is_playable = subject.playable? && can?(current_user, :update_build, @project) - is_playable = subject.playable? && can?(current_user, :update_build, @project)
- if is_playable - if can?(current_user, :read_build, @project)
= link_to play_namespace_project_build_path(subject.project.namespace, subject.project, subject, return_to: request.original_url), method: :post, data: { toggle: 'tooltip', title: "#{subject.name} - play", container: '.pipeline-graph', placement: 'bottom' } do
= ci_icon_for_status('play')
.ci-status-text= subject.name
- elsif can?(current_user, :read_build, @project)
= link_to namespace_project_build_path(subject.project.namespace, subject.project, subject), data: { toggle: 'tooltip', title: "#{subject.name} - #{subject.status}", container: '.pipeline-graph', placement: 'bottom' } do = link_to namespace_project_build_path(subject.project.namespace, subject.project, subject), data: { toggle: 'tooltip', title: "#{subject.name} - #{subject.status}", container: '.pipeline-graph', placement: 'bottom' } do
%span{class: "ci-status-icon ci-status-icon-#{subject.status}"} %span{class: "ci-status-icon ci-status-icon-#{subject.status}"}
= ci_icon_for_status(subject.status) = ci_icon_for_status(subject.status)
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= ci_icon_for_status(group_status) = ci_icon_for_status(group_status)
%span.ci-status-text %span.ci-status-text
= name = name
%span.dropdown-counter-bagde= subject.size %span.dropdown-counter-badge= subject.size
.dropdown-menu.grouped-pipeline-dropdown .dropdown-menu.grouped-pipeline-dropdown
.arrow .arrow
%ul %ul
......
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