diff --git a/app/assets/javascripts/batch_comments/components/draft_note.vue b/app/assets/javascripts/batch_comments/components/draft_note.vue index 5564bca6df0..b480cf098f2 100644 --- a/app/assets/javascripts/batch_comments/components/draft_note.vue +++ b/app/assets/javascripts/batch_comments/components/draft_note.vue @@ -3,7 +3,6 @@ import { mapActions, mapGetters, mapState } from 'vuex'; import { GlButton } from '@gitlab/ui'; import NoteableNote from '~/notes/components/noteable_note.vue'; -import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import PublishButton from './publish_button.vue'; export default { @@ -12,7 +11,6 @@ export default { PublishButton, GlButton, }, - mixins: [glFeatureFlagsMixin()], props: { draft: { type: Object, @@ -63,14 +61,14 @@ export default { this.isEditingDraft = false; }, handleMouseEnter(draft) { - if (this.glFeatures.multilineComments && draft.position) { + if (draft.position) { this.setSelectedCommentPositionHover(draft.position.line_range); } }, handleMouseLeave(draft) { - // Even though position isn't used here we still don't want to unecessarily call a mutation + // Even though position isn't used here we still don't want to unnecessarily call a mutation // The lack of position tells us that highlighting is irrelevant in this context - if (this.glFeatures.multilineComments && draft.position) { + if (draft.position) { this.setSelectedCommentPositionHover(); } }, diff --git a/app/assets/javascripts/batch_comments/components/preview_item.vue b/app/assets/javascripts/batch_comments/components/preview_item.vue index 589734df795..7f3892ae066 100644 --- a/app/assets/javascripts/batch_comments/components/preview_item.vue +++ b/app/assets/javascripts/batch_comments/components/preview_item.vue @@ -3,7 +3,6 @@ import { mapGetters } from 'vuex'; import { GlSprintf, GlIcon } from '@gitlab/ui'; import { IMAGE_DIFF_POSITION_TYPE } from '~/diffs/constants'; import { sprintf, __ } from '~/locale'; -import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import { getStartLineNumber, getEndLineNumber, @@ -16,7 +15,7 @@ export default { GlIcon, GlSprintf, }, - mixins: [resolvedStatusMixin, glFeatureFlagsMixin()], + mixins: [resolvedStatusMixin], props: { draft: { type: Object, @@ -71,6 +70,10 @@ export default { return this.draft.position || this.discussion.position; }, startLineNumber() { + if (this.position?.position_type === IMAGE_DIFF_POSITION_TYPE) { + // eslint-disable-next-line @gitlab/require-i18n-strings + return `${this.position.x}x ${this.position.y}y`; + } return getStartLineNumber(this.position?.line_range); }, endLineNumber() { @@ -90,16 +93,12 @@ export default { - + {{ titleText }}