diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 15:07:21 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-01-18 15:07:21 +0300 |
commit | ef58231bd6702495b8d2d1e7ddc2ad66d1a7dc70 (patch) | |
tree | 49d44d81aa99c000e78e692bca18fdcaa134673a /app/assets/javascripts/batch_comments | |
parent | 0a921554d8c33ccbbd1f2edcee8cd70a0ecfd1a2 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/batch_comments')
4 files changed, 4 insertions, 84 deletions
diff --git a/app/assets/javascripts/batch_comments/components/draft_note.vue b/app/assets/javascripts/batch_comments/components/draft_note.vue index 5bb310afac7..cc524c71c1e 100644 --- a/app/assets/javascripts/batch_comments/components/draft_note.vue +++ b/app/assets/javascripts/batch_comments/components/draft_note.vue @@ -1,22 +1,17 @@ <script> -import { GlButton, GlBadge } from '@gitlab/ui'; +import { GlBadge } from '@gitlab/ui'; import { mapActions, mapGetters, mapState } from 'vuex'; import SafeHtml from '~/vue_shared/directives/safe_html'; -import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import NoteableNote from '~/notes/components/noteable_note.vue'; -import PublishButton from './publish_button.vue'; export default { components: { NoteableNote, - PublishButton, - GlButton, GlBadge, }, directives: { SafeHtml, }, - mixins: [glFeatureFlagMixin()], props: { draft: { type: Object, @@ -89,8 +84,7 @@ export default { :note="draft" :line="line" :discussion-root="true" - :class="{ 'gl-mb-0!': glFeatures.mrReviewSubmitComment }" - class="draft-note-component draft-note" + class="draft-note-component draft-note gl-mb-0!" @handleEdit="handleEditing" @cancelForm="handleNotEditing" @updateSuccess="handleNotEditing" @@ -109,23 +103,6 @@ export default { v-safe-html:[$options.safeHtmlConfig]="draftCommands" class="referenced-commands draft-note-commands" ></div> - - <p v-if="!glFeatures.mrReviewSubmitComment" class="draft-note-actions d-flex"> - <publish-button - :show-count="true" - :should-publish="false" - category="secondary" - :disabled="isPublishingDraft(draft.id)" - /> - <gl-button - :disabled="isPublishing" - :loading="isPublishingDraft(draft.id)" - class="gl-ml-3" - @click="publishNow" - > - {{ __('Add comment now') }} - </gl-button> - </p> </template> </noteable-note> </template> diff --git a/app/assets/javascripts/batch_comments/components/preview_dropdown.vue b/app/assets/javascripts/batch_comments/components/preview_dropdown.vue index ba5cc0d1a76..31185e31f48 100644 --- a/app/assets/javascripts/batch_comments/components/preview_dropdown.vue +++ b/app/assets/javascripts/batch_comments/components/preview_dropdown.vue @@ -1,7 +1,6 @@ <script> import { GlDropdown, GlDropdownItem, GlIcon } from '@gitlab/ui'; import { mapActions, mapGetters, mapState } from 'vuex'; -import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { setUrlParams, visitUrl } from '~/lib/utils/url_utility'; import PreviewItem from './preview_item.vue'; import DraftsCount from './drafts_count.vue'; @@ -14,7 +13,6 @@ export default { PreviewItem, DraftsCount, }, - mixins: [glFeatureFlagMixin()], computed: { ...mapState('diffs', ['viewDiffsFileByFile']), ...mapGetters('batchComments', ['draftsCount', 'sortedDrafts']), @@ -54,7 +52,7 @@ export default { > <template #button-content> {{ __('Pending comments') }} - <drafts-count v-if="glFeatures.mrReviewSubmitComment" variant="neutral" /> + <drafts-count variant="neutral" /> <gl-icon class="dropdown-chevron" name="chevron-up" /> </template> <gl-dropdown-item diff --git a/app/assets/javascripts/batch_comments/components/publish_button.vue b/app/assets/javascripts/batch_comments/components/publish_button.vue deleted file mode 100644 index d4fc4ad744a..00000000000 --- a/app/assets/javascripts/batch_comments/components/publish_button.vue +++ /dev/null @@ -1,52 +0,0 @@ -<script> -import { GlButton } from '@gitlab/ui'; -import { mapActions, mapState } from 'vuex'; -import DraftsCount from './drafts_count.vue'; - -export default { - components: { - GlButton, - DraftsCount, - }, - props: { - showCount: { - type: Boolean, - required: false, - default: false, - }, - category: { - type: String, - required: false, - default: 'primary', - }, - variant: { - type: String, - required: false, - default: 'confirm', - }, - }, - computed: { - ...mapState('batchComments', ['isPublishing']), - }, - methods: { - ...mapActions('batchComments', ['publishReview']), - onClick() { - this.publishReview(); - }, - }, -}; -</script> - -<template> - <gl-button - :loading="isPublishing" - class="js-publish-draft-button" - data-qa-selector="submit_review_button" - :category="category" - :variant="variant" - @click="onClick" - > - {{ __('Submit review') }} - <drafts-count v-if="showCount" /> - </gl-button> -</template> diff --git a/app/assets/javascripts/batch_comments/components/review_bar.vue b/app/assets/javascripts/batch_comments/components/review_bar.vue index 3cd1a2525e9..798ab301c90 100644 --- a/app/assets/javascripts/batch_comments/components/review_bar.vue +++ b/app/assets/javascripts/batch_comments/components/review_bar.vue @@ -3,13 +3,11 @@ import { mapActions, mapGetters } from 'vuex'; import glFeatureFlagMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { REVIEW_BAR_VISIBLE_CLASS_NAME } from '../constants'; import PreviewDropdown from './preview_dropdown.vue'; -import PublishButton from './publish_button.vue'; import SubmitDropdown from './submit_dropdown.vue'; export default { components: { PreviewDropdown, - PublishButton, SubmitDropdown, }, mixins: [glFeatureFlagMixin()], @@ -42,8 +40,7 @@ export default { data-qa-selector="review_bar_content" > <preview-dropdown /> - <publish-button v-if="!glFeatures.mrReviewSubmitComment" class="gl-ml-3" show-count /> - <submit-dropdown v-else /> + <submit-dropdown /> </div> </nav> </div> |