From 85dc423f7090da0a52c73eb66faf22ddb20efff9 Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 19 Sep 2020 01:45:44 +0000 Subject: Add latest changes from gitlab-org/gitlab@13-4-stable-ee --- .../javascripts/notes/components/comment_form.vue | 51 +++++++------- .../notes/components/diff_discussion_header.vue | 1 + .../notes/components/diff_with_note.vue | 3 +- .../notes/components/discussion_counter.vue | 13 ++-- .../notes/components/discussion_filter.vue | 6 +- .../notes/components/discussion_filter_note.vue | 8 +-- .../components/discussion_jump_to_next_button.vue | 7 +- .../notes/components/discussion_locked_widget.vue | 7 +- .../notes/components/discussion_resolve_button.vue | 9 ++- .../javascripts/notes/components/note_actions.vue | 80 ++++++++++++++++++---- .../notes/components/note_actions/reply_button.vue | 18 +++-- .../javascripts/notes/components/note_body.vue | 1 + .../javascripts/notes/components/note_form.vue | 3 +- .../javascripts/notes/components/note_header.vue | 13 ++-- .../notes/components/note_signed_out_widget.vue | 6 +- .../notes/components/noteable_discussion.vue | 5 +- .../javascripts/notes/components/noteable_note.vue | 14 ++-- .../notes/components/toggle_replies_widget.vue | 8 +-- 18 files changed, 159 insertions(+), 94 deletions(-) (limited to 'app/assets/javascripts/notes/components') diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 7cfff98e9f7..54fcf41ca50 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -3,7 +3,7 @@ import $ from 'jquery'; import { mapActions, mapGetters, mapState } from 'vuex'; import { isEmpty } from 'lodash'; import Autosize from 'autosize'; -import { GlAlert, GlIntersperse, GlLink, GlSprintf } from '@gitlab/ui'; +import { GlAlert, GlIntersperse, GlLink, GlSprintf, GlButton } from '@gitlab/ui'; import { __, sprintf } from '~/locale'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import { deprecatedCreateFlash as Flash } from '../../flash'; @@ -20,7 +20,6 @@ import eventHub from '../event_hub'; import NoteableWarning from '../../vue_shared/components/notes/noteable_warning.vue'; import markdownField from '../../vue_shared/components/markdown/field.vue'; import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; -import loadingButton from '../../vue_shared/components/loading_button.vue'; import noteSignedOutWidget from './note_signed_out_widget.vue'; import discussionLockedWidget from './discussion_locked_widget.vue'; import issuableStateMixin from '../mixins/issuable_state'; @@ -33,7 +32,7 @@ export default { discussionLockedWidget, markdownField, userAvatarLink, - loadingButton, + GlButton, TimelineEntryItem, GlAlert, GlIntersperse, @@ -102,6 +101,9 @@ export default { noteable: this.noteableDisplayName, }); }, + buttonVariant() { + return this.isOpen ? 'warning' : 'default'; + }, actionButtonClassNames() { return { 'btn-reopen': !this.isOpen, @@ -378,7 +380,7 @@ export default { dir="auto" :disabled="isSubmitting" name="note[note]" - class="note-textarea js-vue-comment-form js-note-text js-gfm-input js-autosize markdown-area js-vue-textarea qa-comment-input" + class="note-textarea js-vue-comment-form js-note-text js-gfm-input js-autosize markdown-area qa-comment-input" data-supports-quick-actions="true" :aria-label="__('Description')" :placeholder="__('Write a comment or drag your files here…')" @@ -395,7 +397,7 @@ export default { :secondary-button-text="__('Cancel')" variant="warning" :dismissible="false" - @primaryAction="forceCloseIssue" + @primaryAction="toggleBlockedIssueWarning(false) && forceCloseIssue()" @secondaryAction="toggleBlockedIssueWarning(false) && enableButton()" >

@@ -421,27 +423,28 @@ export default {

- - + />
- + >{{ issueActionButtonTitle }} diff --git a/app/assets/javascripts/notes/components/diff_discussion_header.vue b/app/assets/javascripts/notes/components/diff_discussion_header.vue index 50d224a2f08..8e6c01ba63f 100644 --- a/app/assets/javascripts/notes/components/diff_discussion_header.vue +++ b/app/assets/javascripts/notes/components/diff_discussion_header.vue @@ -1,4 +1,5 @@ diff --git a/app/assets/javascripts/notes/components/note_actions.vue b/app/assets/javascripts/notes/components/note_actions.vue index a8ae7fb48f0..a8057276f1a 100644 --- a/app/assets/javascripts/notes/components/note_actions.vue +++ b/app/assets/javascripts/notes/components/note_actions.vue @@ -1,18 +1,18 @@ diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index b4176c6063b..62ee7f30c57 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -1,10 +1,9 @@