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
c3710f2f
Commit
c3710f2f
authored
Jul 24, 2020
by
Samantha Ming
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Remove jump to next unresolved button in threads
Issue:
https://gitlab.com/gitlab-org/gitlab/-/issues/199718
parent
3e436c6f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
2 deletions
+23
-2
app/assets/javascripts/notes/components/discussion_actions.vue
...ssets/javascripts/notes/components/discussion_actions.vue
+10
-1
spec/frontend/notes/components/discussion_actions_spec.js
spec/frontend/notes/components/discussion_actions_spec.js
+13
-1
No files found.
app/assets/javascripts/notes/components/discussion_actions.vue
View file @
c3710f2f
...
...
@@ -3,6 +3,7 @@ import ReplyPlaceholder from './discussion_reply_placeholder.vue';
import
ResolveDiscussionButton
from
'
./discussion_resolve_button.vue
'
;
import
ResolveWithIssueButton
from
'
./discussion_resolve_with_issue_button.vue
'
;
import
JumpToNextDiscussionButton
from
'
./discussion_jump_to_next_button.vue
'
;
import
glFeatureFlagsMixin
from
'
~/vue_shared/mixins/gl_feature_flags_mixin
'
;
export
default
{
name
:
'
DiscussionActions
'
,
...
...
@@ -12,6 +13,7 @@ export default {
ResolveWithIssueButton
,
JumpToNextDiscussionButton
,
},
mixins
:
[
glFeatureFlagsMixin
()],
props
:
{
discussion
:
{
type
:
Object
,
...
...
@@ -36,6 +38,9 @@ export default {
},
},
computed
:
{
hideJumpToNextUnresolvedInThreads
()
{
return
this
.
glFeatures
.
hideJumpToNextUnresolvedInThreads
;
},
resolvableNotes
()
{
return
this
.
discussion
.
notes
.
filter
(
x
=>
x
.
resolvable
);
},
...
...
@@ -70,7 +75,11 @@ export default {
/>
</div>
<div
v-if=
"discussion.resolvable && shouldShowJumpToNextDiscussion"
v-if=
"
!hideJumpToNextUnresolvedInThreads &&
discussion.resolvable &&
shouldShowJumpToNextDiscussion
"
class=
"btn-group discussion-actions ml-sm-2"
>
<jump-to-next-discussion-button
:from-discussion-id=
"discussion.id"
/>
...
...
spec/frontend/notes/components/discussion_actions_spec.js
View file @
c3710f2f
...
...
@@ -21,7 +21,7 @@ const createUnallowedNote = () =>
describe
(
'
DiscussionActions
'
,
()
=>
{
let
wrapper
;
const
createComponentFactory
=
(
shallow
=
true
)
=>
props
=>
{
const
createComponentFactory
=
(
shallow
=
true
)
=>
(
props
,
options
)
=>
{
const
store
=
createStore
();
const
mountFn
=
shallow
?
shallowMount
:
mount
;
...
...
@@ -35,6 +35,11 @@ describe('DiscussionActions', () => {
shouldShowJumpToNextDiscussion
:
true
,
...
props
,
},
provide
:
{
glFeatures
:
{
hideJumpToNextUnresolvedInThreads
:
options
?.
hideJumpToNextUnresolvedInThreads
,
},
},
});
};
...
...
@@ -96,6 +101,13 @@ describe('DiscussionActions', () => {
});
});
it
(
'
does not render jump to next discussion button if feature flag is enabled
'
,
()
=>
{
const
createComponent
=
createComponentFactory
();
createComponent
({},
{
hideJumpToNextUnresolvedInThreads
:
true
});
expect
(
wrapper
.
find
(
JumpToNextDiscussionButton
).
exists
()).
toBe
(
false
);
});
describe
(
'
events handling
'
,
()
=>
{
const
createComponent
=
createComponentFactory
(
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