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
7aa88030
Commit
7aa88030
authored
Dec 04, 2018
by
Phil Hughes
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Updated variable name to forceExpanded
parent
b8ee8c27
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
7 additions
and
7 deletions
+7
-7
app/assets/javascripts/diffs/components/diff_gutter_avatars.vue
...sets/javascripts/diffs/components/diff_gutter_avatars.vue
+2
-2
app/assets/javascripts/notes/stores/mutations.js
app/assets/javascripts/notes/stores/mutations.js
+2
-2
spec/javascripts/diffs/components/diff_gutter_avatars_spec.js
.../javascripts/diffs/components/diff_gutter_avatars_spec.js
+2
-2
spec/javascripts/notes/stores/mutation_spec.js
spec/javascripts/notes/stores/mutation_spec.js
+1
-1
No files found.
app/assets/javascripts/diffs/components/diff_gutter_avatars.vue
View file @
7aa88030
...
...
@@ -56,12 +56,12 @@ export default {
return
`
${
noteData
.
author
.
name
}
:
${
note
}
`
;
},
toggleDiscussions
()
{
const
shouldExpan
d
=
this
.
discussions
.
some
(
discussion
=>
!
discussion
.
expanded
);
const
forceExpande
d
=
this
.
discussions
.
some
(
discussion
=>
!
discussion
.
expanded
);
this
.
discussions
.
forEach
(
discussion
=>
{
this
.
toggleDiscussion
({
discussionId
:
discussion
.
id
,
shouldExpan
d
,
forceExpande
d
,
});
});
},
...
...
app/assets/javascripts/notes/stores/mutations.js
View file @
7aa88030
...
...
@@ -178,10 +178,10 @@ export default {
}
},
[
types
.
TOGGLE_DISCUSSION
](
state
,
{
discussionId
,
shouldExpan
d
=
null
})
{
[
types
.
TOGGLE_DISCUSSION
](
state
,
{
discussionId
,
forceExpande
d
=
null
})
{
const
discussion
=
utils
.
findNoteObjectById
(
state
.
discussions
,
discussionId
);
Object
.
assign
(
discussion
,
{
expanded
:
shouldExpand
===
null
?
!
discussion
.
expanded
:
shouldExpan
d
,
expanded
:
forceExpanded
===
null
?
!
discussion
.
expanded
:
forceExpande
d
,
});
},
...
...
spec/javascripts/diffs/components/diff_gutter_avatars_spec.js
View file @
7aa88030
...
...
@@ -106,7 +106,7 @@ describe('DiffGutterAvatars', () => {
'
toggleDiscussion
'
,
{
discussionId
:
component
.
discussions
[
0
].
id
,
shouldExpan
d
:
true
,
forceExpande
d
:
true
,
},
]);
...
...
@@ -114,7 +114,7 @@ describe('DiffGutterAvatars', () => {
'
toggleDiscussion
'
,
{
discussionId
:
component
.
discussions
[
1
].
id
,
shouldExpan
d
:
true
,
forceExpande
d
:
true
,
},
]);
});
...
...
spec/javascripts/notes/stores/mutation_spec.js
View file @
7aa88030
...
...
@@ -303,7 +303,7 @@ describe('Notes Store mutations', () => {
discussions
:
[{
...
discussionMock
,
expanded
:
false
}],
};
mutations
.
TOGGLE_DISCUSSION
(
state
,
{
discussionId
:
discussionMock
.
id
,
shouldExpan
d
:
true
});
mutations
.
TOGGLE_DISCUSSION
(
state
,
{
discussionId
:
discussionMock
.
id
,
forceExpande
d
:
true
});
expect
(
state
.
discussions
[
0
].
expanded
).
toEqual
(
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