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
019f1ec1
Commit
019f1ec1
authored
Mar 26, 2020
by
Florie Guibert
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move issue/apic hierarchy items to a tooltip
- Review feedback
parent
3c67673c
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
16 additions
and
14 deletions
+16
-14
ee/app/assets/javascripts/related_items_tree/components/state_tooltip.vue
...vascripts/related_items_tree/components/state_tooltip.vue
+6
-8
ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue
...ascripts/related_items_tree/components/tree_item_body.vue
+5
-2
ee/spec/frontend/related_items_tree/components/state_tooltip_spec.js
...ntend/related_items_tree/components/state_tooltip_spec.js
+3
-3
ee/spec/frontend/related_items_tree/components/tree_item_body_spec.js
...tend/related_items_tree/components/tree_item_body_spec.js
+2
-1
No files found.
ee/app/assets/javascripts/related_items_tree/components/state_tooltip.vue
View file @
019f1ec1
...
...
@@ -72,17 +72,15 @@ export default {
<
template
>
<gl-tooltip
:target=
"getTargetRef()"
>
<
span
class=
"bold"
>
<
div
ref=
"statePath"
class=
"bold"
>
{{
path
}}
</span>
<br
/>
<span
class=
"text-tertiary"
>
<span
class=
"bold"
>
</div>
<div
class=
"text-tertiary"
>
<span
ref=
"stateText"
class=
"bold"
>
{{
stateText
}}
</span>
{{
stateTimeInWords
}}
<br
/>
{{
stateTimestamp
}}
</span>
<div
ref=
"stateTimestamp"
>
{{
stateTimestamp
}}
</div>
</div>
</gl-tooltip>
</
template
>
ee/app/assets/javascripts/related_items_tree/components/tree_item_body.vue
View file @
019f1ec1
...
...
@@ -79,6 +79,9 @@ export default {
itemId
()
{
return
this
.
itemReference
.
split
(
this
.
item
.
pathIdSeparator
).
pop
();
},
itemHierarchy
()
{
return
this
.
itemPath
+
this
.
item
.
pathIdSeparator
+
this
.
itemId
;
},
computedPath
()
{
return
this
.
itemWebPath
.
length
?
this
.
itemWebPath
:
null
;
},
...
...
@@ -127,7 +130,7 @@ export default {
/>
<state-tooltip
:get-target-ref=
"() => $refs.stateIconLg"
:path=
"item
Path + item.pathIdSeparator + itemId
"
:path=
"item
Hierarchy
"
:is-open=
"isOpen"
:state=
"item.state"
:created-at=
"item.createdAt"
...
...
@@ -158,7 +161,7 @@ export default {
/>
<state-tooltip
:get-target-ref=
"() => $refs.stateIconMd"
:path=
"item
Path + item.pathIdSeparator + itemId
"
:path=
"item
Hierarchy
"
:is-open=
"isOpen"
:state=
"item.state"
:created-at=
"item.createdAt"
...
...
ee/spec/frontend/related_items_tree/components/state_tooltip_spec.js
View file @
019f1ec1
...
...
@@ -159,7 +159,7 @@ describe('RelatedItemsTree', () => {
it
(
'
renders path in bold
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
span.bold
'
)
.
find
(
{
ref
:
'
statePath
'
}
)
.
text
()
.
trim
(),
).
toBe
(
'
/foo/bar#1
'
);
...
...
@@ -168,7 +168,7 @@ describe('RelatedItemsTree', () => {
it
(
'
renders stateText in bold
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
span.text-tertiary span.bold
'
)
.
find
(
{
ref
:
'
stateText
'
}
)
.
text
()
.
trim
(),
).
toBe
(
'
Closed
'
);
...
...
@@ -181,7 +181,7 @@ describe('RelatedItemsTree', () => {
it
(
'
renders stateTimestamp in muted
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
span.text-tertiary
'
)
.
find
(
{
ref
:
'
stateTimestamp
'
}
)
.
text
()
.
trim
(),
).
toContain
(
mockClosedAtYear
);
...
...
ee/spec/frontend/related_items_tree/components/tree_item_body_spec.js
View file @
019f1ec1
...
...
@@ -291,8 +291,9 @@ describe('RelatedItemsTree', () => {
const
stateTooltip
=
wrapper
.
findAll
(
StateTooltip
).
at
(
0
);
const
{
itemPath
,
itemId
}
=
wrapper
.
vm
;
const
path
=
itemPath
+
mockItem
.
pathIdSeparator
+
itemId
;
expect
(
stateTooltip
.
props
(
'
path
'
)).
toBe
(
itemPath
+
mockItem
.
pathIdSeparator
+
itemId
);
expect
(
stateTooltip
.
props
(
'
path
'
)).
toBe
(
path
);
});
it
(
'
renders confidential icon when `item.confidential` is true
'
,
()
=>
{
...
...
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