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
3c67673c
Commit
3c67673c
authored
Mar 25, 2020
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move issue/apic hierarchy items to a tooltip
- Move epic/issue path in tree view to tooltip
parent
f552c848
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
20 deletions
+37
-20
ee/app/assets/javascripts/related_items_tree/components/state_tooltip.vue
...vascripts/related_items_tree/components/state_tooltip.vue
+10
-2
ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue
...ascripts/related_items_tree/components/tree_item_body.vue
+2
-4
ee/changelogs/unreleased/197491-move-issue-epic-hierarchy-items-to-a-tool-tip.yml
.../197491-move-issue-epic-hierarchy-items-to-a-tool-tip.yml
+5
-0
ee/spec/frontend/related_items_tree/components/state_tooltip_spec.js
...ntend/related_items_tree/components/state_tooltip_spec.js
+12
-1
ee/spec/frontend/related_items_tree/components/tree_item_body_spec.js
...tend/related_items_tree/components/tree_item_body_spec.js
+8
-13
No files found.
ee/app/assets/javascripts/related_items_tree/components/state_tooltip.vue
View file @
3c67673c
...
...
@@ -15,6 +15,10 @@ export default {
type
:
Function
,
required
:
true
,
},
path
:
{
type
:
String
,
required
:
true
,
},
isOpen
:
{
type
:
Boolean
,
required
:
true
,
...
...
@@ -69,11 +73,15 @@ export default {
<
template
>
<gl-tooltip
:target=
"getTargetRef()"
>
<span
class=
"bold"
>
{{
stateText
}}
{{
path
}}
</span>
{{
stateTimeInWords
}}
<br
/>
<span
class=
"text-tertiary"
>
<span
class=
"bold"
>
{{
stateText
}}
</span>
{{
stateTimeInWords
}}
<br
/>
{{
stateTimestamp
}}
</span>
</gl-tooltip>
...
...
ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue
View file @
3c67673c
...
...
@@ -127,6 +127,7 @@ export default {
/>
<state-tooltip
:get-target-ref=
"() => $refs.stateIconLg"
:path=
"itemPath + item.pathIdSeparator + itemId"
:is-open=
"isOpen"
:state=
"item.state"
:created-at=
"item.createdAt"
...
...
@@ -157,15 +158,12 @@ export default {
/>
<state-tooltip
:get-target-ref=
"() => $refs.stateIconMd"
:path=
"itemPath + item.pathIdSeparator + itemId"
:is-open=
"isOpen"
:state=
"item.state"
:created-at=
"item.createdAt"
:closed-at=
"item.closedAt || ''"
/>
<span
v-gl-tooltip
:title=
"itemPath"
class=
"path-id-text d-inline-block"
>
{{
itemPath
}}
</span
>
{{
item
.
pathIdSeparator
}}{{
itemId
}}
</div>
<div
class=
"item-meta-child d-flex align-items-center order-0 flex-wrap mr-md-1 ml-md-auto ml-xl-2 mt-2 mt-md-0 flex-xl-nowrap"
...
...
ee/changelogs/unreleased/197491-move-issue-epic-hierarchy-items-to-a-tool-tip.yml
0 → 100644
View file @
3c67673c
---
title
:
Move issue/apic hierarchy items to a tooltip
merge_request
:
27969
author
:
type
:
changed
ee/spec/frontend/related_items_tree/components/state_tooltip_spec.js
View file @
3c67673c
...
...
@@ -17,6 +17,7 @@ const mockClosedAtYear = currentDate.getFullYear() - 1;
const
createComponent
=
({
getTargetRef
=
()
=>
{},
isOpen
=
false
,
path
=
'
/foo/bar#1
'
,
state
=
'
closed
'
,
createdAt
=
mockCreatedAt
,
closedAt
=
mockClosedAt
,
...
...
@@ -25,6 +26,7 @@ const createComponent = ({
propsData
:
{
getTargetRef
,
isOpen
,
path
,
state
,
createdAt
,
closedAt
,
...
...
@@ -154,12 +156,21 @@ describe('RelatedItemsTree', () => {
expect
(
wrapper
.
find
(
GlTooltip
).
isVisible
()).
toBe
(
true
);
});
it
(
'
renders
stateText
in bold
'
,
()
=>
{
it
(
'
renders
path
in bold
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
span.bold
'
)
.
text
()
.
trim
(),
).
toBe
(
'
/foo/bar#1
'
);
});
it
(
'
renders stateText in bold
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
span.text-tertiary span.bold
'
)
.
text
()
.
trim
(),
).
toBe
(
'
Closed
'
);
});
...
...
ee/spec/frontend/related_items_tree/components/tree_item_body_spec.js
View file @
3c67673c
...
...
@@ -287,6 +287,14 @@ describe('RelatedItemsTree', () => {
expect
(
stateTooltip
.
props
(
'
state
'
)).
toBe
(
mockItem
.
state
);
});
it
(
'
renders item path in tooltip for large screens
'
,
()
=>
{
const
stateTooltip
=
wrapper
.
findAll
(
StateTooltip
).
at
(
0
);
const
{
itemPath
,
itemId
}
=
wrapper
.
vm
;
expect
(
stateTooltip
.
props
(
'
path
'
)).
toBe
(
itemPath
+
mockItem
.
pathIdSeparator
+
itemId
);
});
it
(
'
renders confidential icon when `item.confidential` is true
'
,
()
=>
{
const
confidentialIcon
=
wrapper
.
findAll
(
Icon
).
at
(
1
);
...
...
@@ -313,19 +321,6 @@ describe('RelatedItemsTree', () => {
expect
(
stateTooltip
.
props
(
'
state
'
)).
toBe
(
mockItem
.
state
);
});
it
(
'
renders item path
'
,
()
=>
{
const
pathEl
=
wrapper
.
find
(
'
.path-id-text
'
);
expect
(
pathEl
.
attributes
(
'
title
'
)).
toBe
(
'
gitlab-org/gitlab-shell
'
);
expect
(
pathEl
.
text
()).
toBe
(
'
gitlab-org/gitlab-shell
'
);
});
it
(
'
renders item id with separator
'
,
()
=>
{
const
pathIdEl
=
wrapper
.
find
(
'
.item-path-id
'
);
expect
(
pathIdEl
.
text
()).
toBe
(
mockItem
.
reference
);
});
it
(
'
renders item milestone when it has milestone
'
,
()
=>
{
const
milestone
=
wrapper
.
find
(
ItemMilestone
);
...
...
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