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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
e64d4fd3
Commit
e64d4fd3
authored
Jun 29, 2018
by
Simon Knox
Committed by
Mike Greiling
Jun 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Tooltips scroll along the list within Pipeline jobs dropdown on MR widget"
parent
906e07fb
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
62 additions
and
22 deletions
+62
-22
app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
...pts/pipelines/components/graph/dropdown_job_component.vue
+1
-0
app/assets/javascripts/pipelines/components/graph/job_component.vue
.../javascripts/pipelines/components/graph/job_component.vue
+10
-1
app/assets/javascripts/pipelines/components/stage.vue
app/assets/javascripts/pipelines/components/stage.vue
+16
-21
changelogs/unreleased/47516-pipe-scroll.yml
changelogs/unreleased/47516-pipe-scroll.yml
+5
-0
spec/javascripts/pipelines/graph/job_component_spec.js
spec/javascripts/pipelines/graph/job_component_spec.js
+30
-0
No files found.
app/assets/javascripts/pipelines/components/graph/dropdown_job_component.vue
View file @
e64d4fd3
...
@@ -109,6 +109,7 @@ export default {
...
@@ -109,6 +109,7 @@ export default {
:key=
"i"
:key=
"i"
>
>
<job-component
<job-component
:dropdown-length=
"job.size"
:job=
"item"
:job=
"item"
css-class-job-name=
"mini-pipeline-graph-dropdown-item"
css-class-job-name=
"mini-pipeline-graph-dropdown-item"
@
pipelineActionRequestComplete=
"pipelineActionRequestComplete"
@
pipelineActionRequestComplete=
"pipelineActionRequestComplete"
...
...
app/assets/javascripts/pipelines/components/graph/job_component.vue
View file @
e64d4fd3
...
@@ -46,6 +46,11 @@ export default {
...
@@ -46,6 +46,11 @@ export default {
required
:
false
,
required
:
false
,
default
:
''
,
default
:
''
,
},
},
dropdownLength
:
{
type
:
Number
,
required
:
false
,
default
:
Infinity
,
},
},
},
computed
:
{
computed
:
{
status
()
{
status
()
{
...
@@ -70,6 +75,10 @@ export default {
...
@@ -70,6 +75,10 @@ export default {
return
textBuilder
.
join
(
'
'
);
return
textBuilder
.
join
(
'
'
);
},
},
tooltipBoundary
()
{
return
this
.
dropdownLength
<
5
?
'
viewport
'
:
null
;
},
/**
/**
* Verifies if the provided job has an action path
* Verifies if the provided job has an action path
*
*
...
@@ -94,9 +103,9 @@ export default {
...
@@ -94,9 +103,9 @@ export default {
:href=
"status.details_path"
:href=
"status.details_path"
:title=
"tooltipText"
:title=
"tooltipText"
:class=
"cssClassJobName"
:class=
"cssClassJobName"
:data-boundary=
"tooltipBoundary"
data-container=
"body"
data-container=
"body"
data-html=
"true"
data-html=
"true"
data-boundary=
"viewport"
class=
"js-pipeline-graph-job-link"
class=
"js-pipeline-graph-job-link"
>
>
...
...
app/assets/javascripts/pipelines/components/stage.vue
View file @
e64d4fd3
...
@@ -186,32 +186,27 @@ export default {
...
@@ -186,32 +186,27 @@ export default {
</i>
</i>
</button>
</button>
<
ul
<
div
class=
"dropdown-menu mini-pipeline-graph-dropdown-menu js-builds-dropdown-container"
class=
"dropdown-menu mini-pipeline-graph-dropdown-menu js-builds-dropdown-container"
aria-labelledby=
"stageDropdown"
aria-labelledby=
"stageDropdown"
>
>
<loading-icon
v-if=
"isLoading"
/>
<li
<ul
v-else
class=
"js-builds-dropdown-list scrollable-menu"
class=
"js-builds-dropdown-list scrollable-menu"
>
>
<li
<loading-icon
v-if=
"isLoading"
/>
v-for=
"job in dropdownContent"
:key=
"job.id"
<ul
v-else
>
>
<li
<job-component
v-for=
"job in dropdownContent"
:dropdown-length=
"dropdownContent.length"
:key=
"job.id"
:job=
"job"
>
css-class-job-name=
"mini-pipeline-graph-dropdown-item"
<job-component
@
pipelineActionRequestComplete=
"pipelineActionRequestComplete"
:job=
"job"
/>
css-class-job-name=
"mini-pipeline-graph-dropdown-item"
</li>
@
pipelineActionRequestComplete=
"pipelineActionRequestComplete"
</ul>
/>
</div>
</li>
</ul>
</li>
</ul>
</div>
</div>
</
template
>
</
template
>
changelogs/unreleased/47516-pipe-scroll.yml
0 → 100644
View file @
e64d4fd3
---
title
:
Prevent pipeline job tooltip from scrolling off dropdown container
merge_request
:
author
:
type
:
fixed
spec/javascripts/pipelines/graph/job_component_spec.js
View file @
e64d4fd3
...
@@ -135,4 +135,34 @@ describe('pipeline graph job component', () => {
...
@@ -135,4 +135,34 @@ describe('pipeline graph job component', () => {
expect
(
component
.
$el
.
querySelector
(
'
.js-job-component-tooltip
'
).
getAttribute
(
'
data-original-title
'
)).
toEqual
(
'
test - success
'
);
expect
(
component
.
$el
.
querySelector
(
'
.js-job-component-tooltip
'
).
getAttribute
(
'
data-original-title
'
)).
toEqual
(
'
test - success
'
);
});
});
});
});
describe
(
'
tooltip placement
'
,
()
=>
{
const
tooltipBoundary
=
'
a[data-boundary="viewport"]
'
;
it
(
'
does not set tooltip boundary by default
'
,
()
=>
{
component
=
mountComponent
(
JobComponent
,
{
job
:
mockJob
,
});
expect
(
component
.
$el
.
querySelector
(
tooltipBoundary
)).
toBeNull
();
});
it
(
'
sets tooltip boundary to viewport for small dropdowns
'
,
()
=>
{
component
=
mountComponent
(
JobComponent
,
{
job
:
mockJob
,
dropdownLength
:
1
,
});
expect
(
component
.
$el
.
querySelector
(
tooltipBoundary
)).
not
.
toBeNull
();
});
it
(
'
does not set tooltip boundary for large lists
'
,
()
=>
{
component
=
mountComponent
(
JobComponent
,
{
job
:
mockJob
,
dropdownLength
:
7
,
});
expect
(
component
.
$el
.
querySelector
(
tooltipBoundary
)).
toBeNull
();
});
});
});
});
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