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
a615a75c
Commit
a615a75c
authored
Aug 27, 2020
by
Natalia Tepluhina
Committed by
Kushal Pandya
Aug 27, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Resolve "Fix 'Resolved threads' popup link and placement"
parent
26b75d37
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
33 additions
and
4 deletions
+33
-4
app/assets/javascripts/design_management/components/design_sidebar.vue
...vascripts/design_management/components/design_sidebar.vue
+19
-3
changelogs/unreleased/224649-fix-resolved-threads-popup-link-and-placement.yml
.../224649-fix-resolved-threads-popup-link-and-placement.yml
+5
-0
spec/frontend/design_management/components/design_sidebar_spec.js
...ntend/design_management/components/design_sidebar_spec.js
+8
-0
spec/frontend/design_management/pages/design/__snapshots__/index_spec.js.snap
..._management/pages/design/__snapshots__/index_spec.js.snap
+1
-1
No files found.
app/assets/javascripts/design_management/components/design_sidebar.vue
View file @
a615a75c
...
...
@@ -60,6 +60,18 @@ export default {
return
this
.
resolvedDiscussionsExpanded
?
'
chevron-down
'
:
'
chevron-right
'
;
},
},
watch
:
{
isResolvedCommentsPopoverHidden
(
newVal
)
{
if
(
!
newVal
)
{
this
.
$refs
.
resolvedComments
.
scrollIntoView
();
}
},
},
mounted
()
{
if
(
!
this
.
isResolvedCommentsPopoverHidden
&&
this
.
$refs
.
resolvedComments
)
{
this
.
$refs
.
resolvedComments
.
$el
.
scrollIntoView
();
}
},
methods
:
{
handleSidebarClick
()
{
this
.
isResolvedCommentsPopoverHidden
=
true
;
...
...
@@ -129,6 +141,7 @@ export default {
<template
v-if=
"resolvedDiscussions.length > 0"
>
<gl-button
id=
"resolved-comments"
ref=
"resolvedComments"
data-testid=
"resolved-comments"
:icon=
"resolvedCommentsToggleIcon"
variant=
"link"
...
...
@@ -151,9 +164,12 @@ export default {
)
}}
</p>
<a
href=
"#"
rel=
"noopener noreferrer"
target=
"_blank"
>
{{
s__
(
'
DesignManagement|Learn more about resolving comments
'
)
}}
</a>
<a
href=
"https://docs.gitlab.com/ee/user/project/issues/design_management.html#resolve-design-threads"
rel=
"noopener noreferrer"
target=
"_blank"
>
{{
s__
(
'
DesignManagement|Learn more about resolving comments
'
)
}}
</a
>
</gl-popover>
<gl-collapse
:visible=
"resolvedDiscussionsExpanded"
class=
"gl-mt-3"
>
<design-discussion
...
...
changelogs/unreleased/224649-fix-resolved-threads-popup-link-and-placement.yml
0 → 100644
View file @
a615a75c
---
title
:
Resolve Fix Resolved threads popup link and placement
merge_request
:
40489
author
:
type
:
fixed
spec/frontend/design_management/components/design_sidebar_spec.js
View file @
a615a75c
...
...
@@ -7,6 +7,9 @@ import DesignDiscussion from '~/design_management/components/design_notes/design
import
design
from
'
../mock_data/design
'
;
import
updateActiveDiscussionMutation
from
'
~/design_management/graphql/mutations/update_active_discussion.mutation.graphql
'
;
const
scrollIntoViewMock
=
jest
.
fn
();
HTMLElement
.
prototype
.
scrollIntoView
=
scrollIntoViewMock
;
const
updateActiveDiscussionMutationVariables
=
{
mutation
:
updateActiveDiscussionMutation
,
variables
:
{
...
...
@@ -53,6 +56,7 @@ describe('Design management design sidebar component', () => {
mutate
,
},
},
stubs
:
{
GlPopover
},
});
}
...
...
@@ -220,6 +224,10 @@ describe('Design management design sidebar component', () => {
expect
(
findPopover
().
exists
()).
toBe
(
true
);
});
it
(
'
scrolls to resolved threads link
'
,
()
=>
{
expect
(
scrollIntoViewMock
).
toHaveBeenCalled
();
});
it
(
'
dismisses a popover on the outside click
'
,
()
=>
{
wrapper
.
trigger
(
'
click
'
);
return
wrapper
.
vm
.
$nextTick
(()
=>
{
...
...
spec/frontend/design_management/pages/design/__snapshots__/index_spec.js.snap
View file @
a615a75c
...
...
@@ -92,7 +92,7 @@ exports[`Design management design index page renders design index 1`] = `
</p>
<a
href="
#
"
href="
https://docs.gitlab.com/ee/user/project/issues/design_management.html#resolve-design-threads
"
rel="noopener noreferrer"
target="_blank"
>
...
...
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