Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
0c8736a8
Commit
0c8736a8
authored
Aug 11, 2017
by
winh
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change pipeline dropdowns to new style
parent
6f0f65be
Changes
10
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
123 additions
and
132 deletions
+123
-132
app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
...pts/pipelines/components/graph/dropdown_job_component.vue
+1
-1
app/assets/javascripts/pipelines/components/graph/job_component.vue
.../javascripts/pipelines/components/graph/job_component.vue
+1
-1
app/assets/javascripts/pipelines/components/graph/job_name_component.vue
...scripts/pipelines/components/graph/job_name_component.vue
+1
-1
app/assets/stylesheets/framework/common.scss
app/assets/stylesheets/framework/common.scss
+1
-0
app/assets/stylesheets/framework/dropdowns.scss
app/assets/stylesheets/framework/dropdowns.scss
+2
-1
app/assets/stylesheets/framework/variables.scss
app/assets/stylesheets/framework/variables.scss
+4
-3
app/assets/stylesheets/pages/merge_requests.scss
app/assets/stylesheets/pages/merge_requests.scss
+0
-11
app/assets/stylesheets/pages/pipelines.scss
app/assets/stylesheets/pages/pipelines.scss
+108
-109
app/views/ci/status/_dropdown_graph_badge.html.haml
app/views/ci/status/_dropdown_graph_badge.html.haml
+3
-3
spec/features/merge_requests/mini_pipeline_graph_spec.rb
spec/features/merge_requests/mini_pipeline_graph_spec.rb
+2
-2
No files found.
app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
View file @
0c8736a8
...
@@ -72,7 +72,7 @@
...
@@ -72,7 +72,7 @@
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div
class=
"ci-job-dropdown-container"
>
<button
<button
v-tooltip
v-tooltip
type=
"button"
type=
"button"
...
...
app/assets/javascripts/pipelines/components/graph/job_component.vue
View file @
0c8736a8
...
@@ -75,7 +75,7 @@
...
@@ -75,7 +75,7 @@
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<div>
<div
class=
"ci-job-component"
>
<a
<a
v-tooltip
v-tooltip
v-if=
"job.status.details_path"
v-if=
"job.status.details_path"
...
...
app/assets/javascripts/pipelines/components/graph/job_name_component.vue
View file @
0c8736a8
...
@@ -26,7 +26,7 @@
...
@@ -26,7 +26,7 @@
};
};
</
script
>
</
script
>
<
template
>
<
template
>
<span>
<span
class=
"ci-job-name-component"
>
<ci-icon
<ci-icon
:status=
"status"
/>
:status=
"status"
/>
...
...
app/assets/stylesheets/framework/common.scss
View file @
0c8736a8
...
@@ -16,6 +16,7 @@
...
@@ -16,6 +16,7 @@
.prepend-left-default
{
margin-left
:
$gl-padding
;
}
.prepend-left-default
{
margin-left
:
$gl-padding
;
}
.prepend-left-20
{
margin-left
:
20px
;
}
.prepend-left-20
{
margin-left
:
20px
;
}
.append-right-5
{
margin-right
:
5px
;
}
.append-right-5
{
margin-right
:
5px
;
}
.append-right-8
{
margin-right
:
8px
;
}
.append-right-10
{
margin-right
:
10px
;
}
.append-right-10
{
margin-right
:
10px
;
}
.append-right-default
{
margin-right
:
$gl-padding
;
}
.append-right-default
{
margin-right
:
$gl-padding
;
}
.append-right-20
{
margin-right
:
20px
;
}
.append-right-20
{
margin-right
:
20px
;
}
...
...
app/assets/stylesheets/framework/dropdowns.scss
View file @
0c8736a8
...
@@ -748,7 +748,8 @@
...
@@ -748,7 +748,8 @@
}
}
a
,
a
,
button
{
button
,
.menu-item
{
border-radius
:
0
;
border-radius
:
0
;
padding
:
8px
16px
;
padding
:
8px
16px
;
...
...
app/assets/stylesheets/framework/variables.scss
View file @
0c8736a8
...
@@ -591,9 +591,10 @@ $ui-dev-kit-example-border: #ddd;
...
@@ -591,9 +591,10 @@ $ui-dev-kit-example-border: #ddd;
/*
/*
Pipeline Graph
Pipeline Graph
*/
*/
$stage-hover-bg
:
#eaf3fc
;
$stage-hover-bg
:
$gray-darker
;
$stage-hover-border
:
#d1e7fc
;
$ci-action-icon-size
:
22px
;
$action-icon-color
:
#d6d6d6
;
$pipeline-dropdown-line-height
:
20px
;
$pipeline-dropdown-status-icon-size
:
18px
;
/*
/*
Pipeline Schedules
Pipeline Schedules
...
...
app/assets/stylesheets/pages/merge_requests.scss
View file @
0c8736a8
...
@@ -174,17 +174,6 @@
...
@@ -174,17 +174,6 @@
vertical-align
:
top
;
vertical-align
:
top
;
}
}
.mini-pipeline-graph-dropdown-menu
.mini-pipeline-graph-dropdown-item
{
display
:
flex
;
align-items
:
center
;
.ci-status-text
,
.ci-status-icon
{
top
:
0
;
margin-right
:
10px
;
}
}
.normal
{
.normal
{
line-height
:
28px
;
line-height
:
28px
;
}
}
...
...
app/assets/stylesheets/pages/pipelines.scss
View file @
0c8736a8
...
@@ -40,7 +40,7 @@
...
@@ -40,7 +40,7 @@
.btn.btn-retry
:hover
,
.btn.btn-retry
:hover
,
.btn.btn-retry
:focus
{
.btn.btn-retry
:focus
{
border-color
:
$
gray-darkest
;
border-color
:
$
dropdown-toggle-active-border-color
;
background-color
:
$white-normal
;
background-color
:
$white-normal
;
}
}
...
@@ -206,8 +206,8 @@
...
@@ -206,8 +206,8 @@
.stage-cell
{
.stage-cell
{
.mini-pipeline-graph-dropdown-toggle
svg
{
.mini-pipeline-graph-dropdown-toggle
svg
{
height
:
22px
;
height
:
$ci-action-icon-size
;
width
:
22px
;
width
:
$ci-action-icon-size
;
position
:
absolute
;
position
:
absolute
;
top
:
-1px
;
top
:
-1px
;
left
:
-1px
;
left
:
-1px
;
...
@@ -219,7 +219,7 @@
...
@@ -219,7 +219,7 @@
display
:
inline-block
;
display
:
inline-block
;
position
:
relative
;
position
:
relative
;
vertical-align
:
middle
;
vertical-align
:
middle
;
height
:
22px
;
height
:
$ci-action-icon-size
;
margin
:
3px
0
;
margin
:
3px
0
;
+
.stage-container
{
+
.stage-container
{
...
@@ -308,7 +308,7 @@
...
@@ -308,7 +308,7 @@
a
{
a
{
text-decoration
:
none
;
text-decoration
:
none
;
color
:
$gl-text-color
-secondary
;
color
:
$gl-text-color
;
}
}
svg
{
svg
{
...
@@ -432,7 +432,11 @@
...
@@ -432,7 +432,11 @@
width
:
186px
;
width
:
186px
;
margin-bottom
:
10px
;
margin-bottom
:
10px
;
white-space
:
normal
;
white-space
:
normal
;
color
:
$gl-text-color-secondary
;
// ensure .build-content has hover style when action-icon is hovered
.ci-job-dropdown-container
:hover
.build-content
{
@extend
.build-content
:hover
;
}
// Action Icons in big pipeline-graph nodes
// Action Icons in big pipeline-graph nodes
.ci-action-icon-container
.ci-action-icon-wrapper
{
.ci-action-icon-container
.ci-action-icon-wrapper
{
...
@@ -445,11 +449,11 @@
...
@@ -445,11 +449,11 @@
&
:hover
{
&
:hover
{
background-color
:
$stage-hover-bg
;
background-color
:
$stage-hover-bg
;
border
:
1px
solid
$
stage-hover-bg
;
border
:
1px
solid
$
dropdown-toggle-active-border-color
;
}
}
svg
{
svg
{
fill
:
$
border-color
;
fill
:
$
gl-text-color-secondary
;
position
:
relative
;
position
:
relative
;
left
:
-1px
;
left
:
-1px
;
top
:
-1px
;
top
:
-1px
;
...
@@ -475,19 +479,10 @@
...
@@ -475,19 +479,10 @@
background-color
:
transparent
;
background-color
:
transparent
;
border
:
none
;
border
:
none
;
padding
:
0
;
padding
:
0
;
color
:
$gl-text-color-secondary
;
&
:focus
{
&
:focus
{
outline
:
none
;
outline
:
none
;
}
}
&
:hover
{
color
:
$gl-text-color
;
.dropdown-counter-badge
{
color
:
$gl-text-color
;
}
}
}
}
.build-content
{
.build-content
{
...
@@ -502,8 +497,7 @@
...
@@ -502,8 +497,7 @@
a
.build-content
:hover
,
a
.build-content
:hover
,
button
.build-content
:hover
{
button
.build-content
:hover
{
background-color
:
$stage-hover-bg
;
background-color
:
$stage-hover-bg
;
border
:
1px
solid
$stage-hover-border
;
border
:
1px
solid
$dropdown-toggle-active-border-color
;
color
:
$gl-text-color
;
}
}
...
@@ -564,7 +558,6 @@
...
@@ -564,7 +558,6 @@
// Triggers the dropdown in the big pipeline graph
// Triggers the dropdown in the big pipeline graph
.dropdown-counter-badge
{
.dropdown-counter-badge
{
color
:
$border-color
;
font-weight
:
100
;
font-weight
:
100
;
font-size
:
15px
;
font-size
:
15px
;
position
:
absolute
;
position
:
absolute
;
...
@@ -606,8 +599,8 @@ button.mini-pipeline-graph-dropdown-toggle {
...
@@ -606,8 +599,8 @@ button.mini-pipeline-graph-dropdown-toggle {
background-color
:
$white-light
;
background-color
:
$white-light
;
border-width
:
1px
;
border-width
:
1px
;
border-style
:
solid
;
border-style
:
solid
;
width
:
22px
;
width
:
$ci-action-icon-size
;
height
:
22px
;
height
:
$ci-action-icon-size
;
margin
:
0
;
margin
:
0
;
padding
:
0
;
padding
:
0
;
transition
:
all
0
.2s
linear
;
transition
:
all
0
.2s
linear
;
...
@@ -669,49 +662,57 @@ button.mini-pipeline-graph-dropdown-toggle {
...
@@ -669,49 +662,57 @@ button.mini-pipeline-graph-dropdown-toggle {
}
}
}
}
@include
new-style-dropdown
(
'.big-pipeline-graph-dropdown-menu'
);
@include
new-style-dropdown
(
'.mini-pipeline-graph-dropdown-menu'
);
// dropdown content for big and mini pipeline
// dropdown content for big and mini pipeline
.big-pipeline-graph-dropdown-menu
,
.big-pipeline-graph-dropdown-menu
,
.mini-pipeline-graph-dropdown-menu
{
.mini-pipeline-graph-dropdown-menu
{
width
:
195px
;
width
:
195px
;
max-width
:
195px
;
max-width
:
195px
;
li
{
padding
:
2px
3px
;
}
.scrollable-menu
{
.scrollable-menu
{
padding
:
0
;
padding
:
0
;
max-height
:
245px
;
max-height
:
245px
;
overflow
:
auto
;
overflow
:
auto
;
}
}
li
{
position
:
relative
;
// ensure .mini-pipeline-graph-dropdown-item has hover style when action-icon is hovered
&
:hover
>
.mini-pipeline-graph-dropdown-item
,
&
:hover
>
.ci-job-component
>
.mini-pipeline-graph-dropdown-item
{
@extend
.mini-pipeline-graph-dropdown-item
:hover
;
}
// Action icon on the right
// Action icon on the right
a
.ci-action-icon-wrapper
{
a
.ci-action-icon-wrapper
{
color
:
$action-icon-color
;
border-radius
:
50%
;
border
:
1px
solid
$action-icon-color
;
border
:
1px
solid
$border-color
;
border-radius
:
20px
;
width
:
$ci-action-icon-size
;
width
:
22px
;
height
:
$ci-action-icon-size
;
height
:
22px
;
padding
:
2px
0
0
5px
;
padding
:
2px
0
0
5px
;
cursor
:
pointer
;
float
:
right
;
margin
:
-26px
9px
0
0
;
font-size
:
12px
;
font-size
:
12px
;
background-color
:
$white-light
;
background-color
:
$white-light
;
position
:
absolute
;
top
:
50%
;
right
:
$gl-padding
;
margin-top
:
-
#{
$ci-action-icon-size
/
2
}
;
&
:hover
,
&
:hover
,
&
:focus
{
&
:focus
{
background-color
:
$stage-hover-bg
;
background-color
:
$stage-hover-bg
;
border
:
1px
solid
transparent
;
border
:
1px
solid
$dropdown-toggle-active-border-color
;
}
}
svg
{
svg
{
width
:
22px
;
fill
:
$gl-text-color-secondary
;
height
:
22px
;
width
:
$ci-action-icon-size
;
height
:
$ci-action-icon-size
;
left
:
-6px
;
left
:
-6px
;
position
:
relative
;
position
:
relative
;
top
:
-3px
;
top
:
-3px
;
fill
:
$action-icon-color
;
}
}
&
:hover
svg
,
&
:hover
svg
,
...
@@ -723,13 +724,20 @@ button.mini-pipeline-graph-dropdown-toggle {
...
@@ -723,13 +724,20 @@ button.mini-pipeline-graph-dropdown-toggle {
// link to the build
// link to the build
.mini-pipeline-graph-dropdown-item
{
.mini-pipeline-graph-dropdown-item
{
padding
:
3px
7px
4px
;
padding
:
3px
7px
4px
;
align-items
:
center
;
clear
:
both
;
clear
:
both
;
font-weight
:
$gl-font-weight-normal
;
display
:
flex
;
line-height
:
1
.428571429
;
font-weight
:
normal
;
line-height
:
$line-height-base
;
white-space
:
nowrap
;
white-space
:
nowrap
;
margin
:
0
5px
;
border-radius
:
3px
;
border-radius
:
3px
;
.ci-job-name-component
{
align-items
:
center
;
display
:
flex
;
flex
:
1
;
}
// build name
// build name
.ci-build-text
,
.ci-build-text
,
.ci-status-text
{
.ci-status-text
{
...
@@ -738,27 +746,26 @@ button.mini-pipeline-graph-dropdown-toggle {
...
@@ -738,27 +746,26 @@ button.mini-pipeline-graph-dropdown-toggle {
white-space
:
nowrap
;
white-space
:
nowrap
;
text-overflow
:
ellipsis
;
text-overflow
:
ellipsis
;
max-width
:
70%
;
max-width
:
70%
;
color
:
$gl-text-color-secondary
;
margin-left
:
2px
;
margin-left
:
2px
;
display
:
inline-block
;
display
:
inline-block
;
top
:
1px
;
vertical-align
:
text-bottom
;
position
:
relative
;
@media
(
max-width
:
$screen-xs-max
)
{
@media
(
max-width
:
$screen-xs-max
)
{
max-width
:
60%
;
max-width
:
60%
;
}
}
}
}
// status icon on the left
.ci-status-icon
{
.ci-status-icon
{
top
:
3px
;
@extend
.append-right-8
;
position
:
relative
;
position
:
relative
;
>
svg
{
>
svg
{
width
:
$pipeline-dropdown-status-icon-size
;
height
:
$pipeline-dropdown-status-icon-size
;
margin
:
3px
0
;
position
:
relative
;
overflow
:
visible
;
overflow
:
visible
;
width
:
18px
;
display
:
block
;
height
:
18px
;
}
}
}
}
...
@@ -766,26 +773,19 @@ button.mini-pipeline-graph-dropdown-toggle {
...
@@ -766,26 +773,19 @@ button.mini-pipeline-graph-dropdown-toggle {
&
:focus
{
&
:focus
{
outline
:
none
;
outline
:
none
;
text-decoration
:
none
;
text-decoration
:
none
;
color
:
$gl-text-color
;
background-color
:
$stage-hover-bg
;
background-color
:
$stage-hover-bg
;
}
}
}
}
}
}
}
// Dropdown in the big pipeline graph
// Dropdown in the big pipeline graph
.big-pipeline-graph-dropdown-menu
{
.big-pipeline-graph-dropdown-menu
{
width
:
195px
;
width
:
195px
;
min-width
:
195px
;
min-width
:
195px
;
left
:
auto
;
left
:
100%
;
right
:
-195px
;
top
:
-10px
;
top
:
-4px
;
box-shadow
:
0
1px
5px
$black-transparent
;
box-shadow
:
0
1px
5px
$black-transparent
;
.mini-pipeline-graph-dropdown-item
{
.ci-status-icon
{
top
:
-1px
;
}
}
}
}
/**
/**
...
@@ -806,15 +806,14 @@ button.mini-pipeline-graph-dropdown-toggle {
...
@@ -806,15 +806,14 @@ button.mini-pipeline-graph-dropdown-toggle {
}
}
&
:
:
before
{
&
:
:
before
{
left
:
-
5
px
;
left
:
-
6
px
;
margin-top
:
-6
px
;
margin-top
:
3
px
;
border-width
:
7px
5px
7px
0
;
border-width
:
7px
5px
7px
0
;
border-right-color
:
$border-color
;
border-right-color
:
$border-color
;
}
}
&
:
:
after
{
&
:
:
after
{
left
:
-4px
;
left
:
-5px
;
margin-top
:
-9px
;
border-width
:
10px
7px
10px
0
;
border-width
:
10px
7px
10px
0
;
border-right-color
:
$white-light
;
border-right-color
:
$white-light
;
}
}
...
...
app/views/ci/status/_dropdown_graph_badge.html.haml
View file @
0c8736a8
...
@@ -6,14 +6,14 @@
...
@@ -6,14 +6,14 @@
-
tooltip
=
"
#{
subject
.
name
}
-
#{
status
.
label
}
"
-
tooltip
=
"
#{
subject
.
name
}
-
#{
status
.
label
}
"
-
if
status
.
has_details?
-
if
status
.
has_details?
=
link_to
status
.
details_path
,
class:
'mini-pipeline-graph-dropdown-item'
,
data:
{
toggle:
'tooltip'
,
title:
tooltip
}
do
=
link_to
status
.
details_path
,
class:
'mini-pipeline-graph-dropdown-item'
,
data:
{
toggle:
'tooltip'
,
title:
tooltip
,
container:
'body'
}
do
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
%span
.ci-build-text
=
subject
.
name
%span
.ci-build-text
=
subject
.
name
-
else
-
else
.m
ini-pipeline-graph-dropdown-item
{
data:
{
toggle:
'tooltip'
,
title:
tooltip
}
}
.m
enu-item.mini-pipeline-graph-dropdown-item
{
data:
{
toggle:
'tooltip'
,
title:
tooltip
,
container:
'body'
}
}
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
%span
{
class:
klass
}=
custom_icon
(
status
.
icon
)
%span
.ci-build-text
=
subject
.
name
%span
.ci-build-text
=
subject
.
name
-
if
status
.
has_action?
-
if
status
.
has_action?
=
link_to
status
.
action_path
,
class:
'ci-action-icon-wrapper js-ci-action-icon'
,
method:
status
.
action_method
,
data:
{
toggle:
'tooltip'
,
title:
status
.
action_title
}
do
=
link_to
status
.
action_path
,
class:
'ci-action-icon-wrapper js-ci-action-icon'
,
method:
status
.
action_method
,
data:
{
toggle:
'tooltip'
,
title:
status
.
action_title
,
container:
'body'
}
do
=
custom_icon
(
status
.
action_icon
)
=
custom_icon
(
status
.
action_icon
)
spec/features/merge_requests/mini_pipeline_graph_spec.rb
View file @
0c8736a8
...
@@ -70,7 +70,7 @@ feature 'Mini Pipeline Graph', :js do
...
@@ -70,7 +70,7 @@ feature 'Mini Pipeline Graph', :js do
it
'should show tooltip when hovered'
do
it
'should show tooltip when hovered'
do
toggle
.
hover
toggle
.
hover
expect
(
toggle
.
find
(
:xpath
,
'..'
)
).
to
have_selector
(
'.tooltip'
)
expect
(
page
).
to
have_selector
(
'.tooltip'
)
end
end
end
end
...
@@ -117,7 +117,7 @@ feature 'Mini Pipeline Graph', :js do
...
@@ -117,7 +117,7 @@ feature 'Mini Pipeline Graph', :js do
it
'should show tooltip when hovered'
do
it
'should show tooltip when hovered'
do
build_item
.
hover
build_item
.
hover
expect
(
build_item
.
find
(
:xpath
,
'..'
)
).
to
have_selector
(
'.tooltip'
)
expect
(
page
).
to
have_selector
(
'.tooltip'
)
end
end
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment