diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-09-20 14:18:08 +0300 |
commit | 5afcbe03ead9ada87621888a31a62652b10a7e4f (patch) | |
tree | 9918b67a0d0f0bafa6542e839a8be37adf73102d /app/assets/javascripts/notes/components | |
parent | c97c0201564848c1f53226fe19d71fdcc472f7d0 (diff) |
Add latest changes from gitlab-org/gitlab@16-4-stable-eev16.4.0-rc42
Diffstat (limited to 'app/assets/javascripts/notes/components')
6 files changed, 19 insertions, 18 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index a009f2975bb..144cfa4295b 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -5,7 +5,6 @@ import $ from 'jquery'; import { mapActions, mapGetters, mapState } from 'vuex'; import { refreshUserMergeRequestCounts } from '~/commons/nav/user_merge_requests'; import { createAlert } from '~/alert'; -import { badgeState } from '~/issuable/components/status_box.vue'; import { STATUS_CLOSED, STATUS_MERGED, STATUS_OPEN, STATUS_REOPENED } from '~/issues/constants'; import { containsSensitiveToken, confirmSensitiveAction } from '~/lib/utils/secret_detection'; import { @@ -14,6 +13,7 @@ import { slugifyWithUnderscore, } from '~/lib/utils/text_utility'; import { sprintf } from '~/locale'; +import { badgeState } from '~/merge_requests/components/merge_request_status_badge.vue'; import MarkdownEditor from '~/vue_shared/components/markdown/markdown_editor.vue'; import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; @@ -210,8 +210,6 @@ export default { methods: { ...mapActions([ 'saveNote', - 'stopPolling', - 'restartPolling', 'removePlaceholderNotes', 'closeIssuable', 'reopenIssuable', @@ -253,7 +251,6 @@ export default { } this.note = ''; // Empty textarea while being requested. Repopulate in catch - this.stopPolling(); this.isSubmitting = true; @@ -264,7 +261,6 @@ export default { this.saveNote(noteData) .then(() => { - this.restartPolling(); this.discard(); if (withIssueAction) { @@ -381,7 +377,10 @@ export default { @input="onInput" /> </comment-field-layout> - <div class="note-form-actions"> + <div + class="note-form-actions gl-font-size-0" + :class="{ 'gl-display-flex gl-gap-3': hasDrafts }" + > <template v-if="hasDrafts"> <gl-button :disabled="disableSubmitButton" @@ -404,7 +403,7 @@ export default { <gl-form-checkbox v-if="canSetInternalNote" v-model="noteIsInternal" - class="gl-mb-2" + class="gl-mb-2 gl-flex-basis-full" data-testid="internal-note-checkbox" > {{ $options.i18n.internal }} diff --git a/app/assets/javascripts/notes/components/discussion_filter.vue b/app/assets/javascripts/notes/components/discussion_filter.vue index 7266cdb6405..90f7a6862f0 100644 --- a/app/assets/javascripts/notes/components/discussion_filter.vue +++ b/app/assets/javascripts/notes/components/discussion_filter.vue @@ -137,7 +137,8 @@ export default { filterType(value) { if (value === 0) { return DISCUSSION_FILTER_TYPES.ALL; - } else if (value === 1) { + } + if (value === 1) { return DISCUSSION_FILTER_TYPES.COMMENTS; } return DISCUSSION_FILTER_TYPES.HISTORY; diff --git a/app/assets/javascripts/notes/components/mr_discussion_filter.vue b/app/assets/javascripts/notes/components/mr_discussion_filter.vue index 08d3670ae6a..c2ac95ca56e 100644 --- a/app/assets/javascripts/notes/components/mr_discussion_filter.vue +++ b/app/assets/javascripts/notes/components/mr_discussion_filter.vue @@ -36,7 +36,8 @@ export default { if (length === MR_FILTER_OPTIONS.length) { return __('All activity'); - } else if (length > 1) { + } + if (length > 1) { return `%{strongStart}${firstSelected.text}%{strongEnd} +${length - 1} more`; } diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue index 8b43f068f11..363383fd7ad 100644 --- a/app/assets/javascripts/notes/components/note_form.vue +++ b/app/assets/javascripts/notes/components/note_form.vue @@ -160,12 +160,14 @@ export default { filePath: this.diffFile.file_path, refs: this.diffFile.diff_refs, }; - } else if (this.note && this.note.position) { + } + if (this.note && this.note.position) { return { filePath: this.note.position.new_path, refs: this.note.position, }; - } else if (this.discussion && this.discussion.diff_file) { + } + if (this.discussion && this.discussion.diff_file) { return { filePath: this.discussion.diff_file.file_path, refs: this.discussion.diff_file.diff_refs, @@ -381,8 +383,8 @@ export default { @handleSuggestDismissed="() => $emit('handleSuggestDismissed')" /> </comment-field-layout> - <div class="note-form-actions"> - <p v-if="showResolveDiscussionToggle"> + <div class="note-form-actions gl-font-size-0"> + <template v-if="showResolveDiscussionToggle"> <label> <template v-if="discussionResolved"> <gl-form-checkbox v-model="isUnresolving" class="js-unresolve-checkbox"> @@ -395,7 +397,7 @@ export default { </gl-form-checkbox> </template> </label> - </p> + </template> <template v-if="showBatchCommentsActions"> <div class="gl-display-flex gl-flex-wrap gl-mb-n3"> @@ -432,7 +434,7 @@ export default { </div> </template> <template v-else> - <div class="gl-display-sm-flex gl-flex-wrap"> + <div class="gl-display-sm-flex gl-flex-wrap gl-font-size-0"> <gl-button :disabled="isDisabled" category="primary" diff --git a/app/assets/javascripts/notes/components/notes_app.vue b/app/assets/javascripts/notes/components/notes_app.vue index 6fb958e810b..2524b9efdb6 100644 --- a/app/assets/javascripts/notes/components/notes_app.vue +++ b/app/assets/javascripts/notes/components/notes_app.vue @@ -169,7 +169,6 @@ export default { }); }, beforeDestroy() { - this.stopPolling(); window.removeEventListener('hashchange', this.handleHashChanged); eventHub.$off('notesApp.updateIssuableConfidentiality', this.setConfidentiality); }, @@ -182,7 +181,6 @@ export default { 'expandDiscussion', 'startTaskList', 'convertToDiscussion', - 'stopPolling', 'setConfidentiality', 'fetchNotes', ]), diff --git a/app/assets/javascripts/notes/components/sidebar_subscription.vue b/app/assets/javascripts/notes/components/sidebar_subscription.vue index f60a17eb36b..c02c7a57dfa 100644 --- a/app/assets/javascripts/notes/components/sidebar_subscription.vue +++ b/app/assets/javascripts/notes/components/sidebar_subscription.vue @@ -3,7 +3,7 @@ import { mapActions } from 'vuex'; import { TYPE_EPIC, TYPE_ISSUE } from '~/issues/constants'; import { fetchPolicies } from '~/lib/graphql'; -import { confidentialityQueries } from '~/sidebar/constants'; +import { confidentialityQueries } from '~/sidebar/queries/constants'; import { defaultClient as gqlClient } from '~/graphql_shared/issuable_client'; export default { |