Remove duplicate buttons
This commit is contained in:
parent
b46cf4290b
commit
1810feae96
3 changed files with 19 additions and 17 deletions
|
@ -39,30 +39,27 @@ export default {
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<template>
|
<template>
|
||||||
<div class="discussion-with-resolve-btn">
|
<div class="discussion-with-resolve-btn clearfix">
|
||||||
<reply-placeholder
|
<reply-placeholder
|
||||||
:button-text="s__('MergeRequests|Reply...')"
|
:button-text="s__('MergeRequests|Reply...')"
|
||||||
class="qa-discussion-reply"
|
class="qa-discussion-reply"
|
||||||
@onClick="$emit('showReplyForm')"
|
@onClick="$emit('showReplyForm')"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<div class="btn-group discussion-actions" role="group">
|
||||||
|
<div class="btn-group">
|
||||||
<resolve-discussion-button
|
<resolve-discussion-button
|
||||||
v-if="discussion.resolvable"
|
v-if="discussion.resolvable"
|
||||||
:is-resolving="isResolving"
|
:is-resolving="isResolving"
|
||||||
:button-title="resolveButtonTitle"
|
:button-title="resolveButtonTitle"
|
||||||
@onClick="$emit('resolve')"
|
@onClick="$emit('resolve')"
|
||||||
/>
|
/>
|
||||||
<div v-if="discussion.resolvable" class="btn-group discussion-actions ml-sm-2" role="group">
|
</div>
|
||||||
<resolve-with-issue-button v-if="resolveWithIssuePath" :url="resolveWithIssuePath" />
|
|
||||||
<jump-to-next-discussion-button
|
|
||||||
v-if="shouldShowJumpToNextDiscussion"
|
|
||||||
@onClick="$emit('jumpToNextDiscussion')"
|
|
||||||
/>
|
|
||||||
<resolve-with-issue-button
|
<resolve-with-issue-button
|
||||||
v-if="discussion.resolvable && resolveWithIssuePath"
|
v-if="discussion.resolvable && resolveWithIssuePath"
|
||||||
:url="resolveWithIssuePath"
|
:url="resolveWithIssuePath"
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div
|
<div
|
||||||
v-if="discussion.resolvable && shouldShowJumpToNextDiscussion"
|
v-if="discussion.resolvable && shouldShowJumpToNextDiscussion"
|
||||||
class="btn-group discussion-actions ml-sm-2"
|
class="btn-group discussion-actions ml-sm-2"
|
||||||
|
|
5
changelogs/unreleased/64160-fix-duplicate-buttons.yml
Normal file
5
changelogs/unreleased/64160-fix-duplicate-buttons.yml
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
---
|
||||||
|
title: Remove duplicate buttons in diff discussion
|
||||||
|
merge_request: 30757
|
||||||
|
author:
|
||||||
|
type: fixed
|
|
@ -362,14 +362,14 @@ describe 'Merge request > User resolves diff notes and threads', :js do
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'shows jump to next thread button except on last thread' do
|
it 'shows jump to next discussion button on all discussions' do
|
||||||
wait_for_requests
|
wait_for_requests
|
||||||
|
|
||||||
all_discussion_replies = page.all('.discussion-reply-holder')
|
all_discussion_replies = page.all('.discussion-reply-holder')
|
||||||
|
|
||||||
expect(all_discussion_replies.count).to eq(2)
|
expect(all_discussion_replies.count).to eq(2)
|
||||||
expect(all_discussion_replies.first.all('.discussion-next-btn').count).to eq(2)
|
expect(all_discussion_replies.first.all('.discussion-next-btn').count).to eq(1)
|
||||||
expect(all_discussion_replies.last.all('.discussion-next-btn').count).to eq(2)
|
expect(all_discussion_replies.last.all('.discussion-next-btn').count).to eq(1)
|
||||||
end
|
end
|
||||||
|
|
||||||
it 'displays next thread even if hidden' do
|
it 'displays next thread even if hidden' do
|
||||||
|
|
Loading…
Reference in a new issue