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
bf0b712e
Commit
bf0b712e
authored
Aug 18, 2020
by
Phil Hughes
Committed by
Kushal Pandya
Aug 18, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Expand collapsed discussion when replying
Closes
https://gitlab.com/gitlab-org/gitlab/-/issues/235529
parent
c4f7ce7d
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
0 deletions
+27
-0
app/assets/javascripts/notes/components/noteable_discussion.vue
...sets/javascripts/notes/components/noteable_discussion.vue
+5
-0
changelogs/unreleased/ph-235529-replyExpandsCollapsedDiscussion.yml
.../unreleased/ph-235529-replyExpandsCollapsedDiscussion.yml
+5
-0
spec/frontend/notes/components/noteable_discussion_spec.js
spec/frontend/notes/components/noteable_discussion_spec.js
+17
-0
No files found.
app/assets/javascripts/notes/components/noteable_discussion.vue
View file @
bf0b712e
...
@@ -149,9 +149,14 @@ export default {
...
@@ -149,9 +149,14 @@ export default {
'
removePlaceholderNotes
'
,
'
removePlaceholderNotes
'
,
'
toggleResolveNote
'
,
'
toggleResolveNote
'
,
'
removeConvertedDiscussion
'
,
'
removeConvertedDiscussion
'
,
'
expandDiscussion
'
,
]),
]),
showReplyForm
()
{
showReplyForm
()
{
this
.
isReplying
=
true
;
this
.
isReplying
=
true
;
if
(
!
this
.
discussion
.
expanded
)
{
this
.
expandDiscussion
({
discussionId
:
this
.
discussion
.
id
});
}
},
},
cancelReplyForm
(
shouldConfirm
,
isDirty
)
{
cancelReplyForm
(
shouldConfirm
,
isDirty
)
{
if
(
shouldConfirm
&&
isDirty
)
{
if
(
shouldConfirm
&&
isDirty
)
{
...
...
changelogs/unreleased/ph-235529-replyExpandsCollapsedDiscussion.yml
0 → 100644
View file @
bf0b712e
---
title
:
Fixed discussion not expanding when replying to a collapsed discussion
merge_request
:
39571
author
:
type
:
fixed
spec/frontend/notes/components/noteable_discussion_spec.js
View file @
bf0b712e
...
@@ -89,6 +89,23 @@ describe('noteable_discussion component', () => {
...
@@ -89,6 +89,23 @@ describe('noteable_discussion component', () => {
});
});
});
});
it
(
'
should expand discussion
'
,
async
()
=>
{
const
expandDiscussion
=
jest
.
fn
();
const
discussion
=
{
...
discussionMock
};
discussion
.
expanded
=
false
;
wrapper
.
setProps
({
discussion
});
wrapper
.
setMethods
({
expandDiscussion
});
await
wrapper
.
vm
.
$nextTick
();
wrapper
.
vm
.
showReplyForm
();
await
wrapper
.
vm
.
$nextTick
();
expect
(
expandDiscussion
).
toHaveBeenCalledWith
({
discussionId
:
discussion
.
id
});
});
it
(
'
does not render jump to thread button
'
,
()
=>
{
it
(
'
does not render jump to thread button
'
,
()
=>
{
expect
(
wrapper
.
find
(
'
*[data-original-title="Jump to next unresolved thread"]
'
).
exists
()).
toBe
(
expect
(
wrapper
.
find
(
'
*[data-original-title="Jump to next unresolved thread"]
'
).
exists
()).
toBe
(
false
,
false
,
...
...
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