summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-05-12 06:09:37 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-05-12 06:09:37 +0000
commit143f7be045960f8d51dea738781535d614956f84 (patch)
tree9d0a79240567a6c94f64bc7bfcfa834fce9f2ac6 /app
parent0e30d318bbe0e9e94885f865db3372e758c512bb (diff)
downloadgitlab-ce-143f7be045960f8d51dea738781535d614956f84.tar.gz
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app')
-rw-r--r--app/assets/javascripts/notes/components/comment_form.vue37
-rw-r--r--app/assets/javascripts/notes/components/note_header.vue25
-rw-r--r--app/assets/javascripts/notes/components/noteable_note.vue8
-rw-r--r--app/assets/javascripts/vue_shared/components/notes/system_note.vue2
-rw-r--r--app/assets/stylesheets/pages/notes.scss4
-rw-r--r--app/controllers/projects/issues_controller.rb1
6 files changed, 11 insertions, 66 deletions
diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue
index 2d7692fff7a..a070cf8866a 100644
--- a/app/assets/javascripts/notes/components/comment_form.vue
+++ b/app/assets/javascripts/notes/components/comment_form.vue
@@ -3,15 +3,7 @@ import $ from 'jquery';
import { mapActions, mapGetters, mapState } from 'vuex';
import { isEmpty } from 'lodash';
import Autosize from 'autosize';
-import {
- GlAlert,
- GlFormCheckbox,
- GlIcon,
- GlIntersperse,
- GlLink,
- GlSprintf,
- GlTooltipDirective,
-} from '@gitlab/ui';
+import { GlAlert, GlIntersperse, GlLink, GlSprintf } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import TimelineEntryItem from '~/vue_shared/components/notes/timeline_entry_item.vue';
import Flash from '../../flash';
@@ -32,7 +24,6 @@ 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';
-import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
export default {
name: 'CommentForm',
@@ -45,16 +36,11 @@ export default {
loadingButton,
TimelineEntryItem,
GlAlert,
- GlFormCheckbox,
- GlIcon,
GlIntersperse,
GlLink,
GlSprintf,
},
- directives: {
- GlTooltip: GlTooltipDirective,
- },
- mixins: [issuableStateMixin, glFeatureFlagsMixin()],
+ mixins: [issuableStateMixin],
props: {
noteableType: {
type: String,
@@ -65,7 +51,6 @@ export default {
return {
note: '',
noteType: constants.COMMENT,
- noteIsConfidential: false,
isSubmitting: false,
isSubmitButtonDisabled: true,
};
@@ -153,9 +138,6 @@ export default {
trackingLabel() {
return slugifyWithUnderscore(`${this.commentButtonTitle} button`);
},
- confidentialNotesEnabled() {
- return Boolean(this.glFeatures.confidentialNotes);
- },
},
watch: {
note(newNote) {
@@ -203,7 +185,6 @@ export default {
note: {
noteable_type: this.noteableType,
noteable_id: this.getNoteableData.id,
- confidential: this.noteIsConfidential,
note: this.note,
},
merge_request_diff_head_sha: this.getNoteableData.diff_head_sha,
@@ -304,7 +285,6 @@ export default {
if (shouldClear) {
this.note = '';
- this.noteIsConfidential = false;
this.resizeTextarea();
this.$refs.markdownField.previewMarkdown = false;
}
@@ -431,19 +411,6 @@ js-gfm-input js-autosize markdown-area js-vue-textarea qa-comment-input"
</p>
</gl-alert>
<div class="note-form-actions">
- <div v-if="confidentialNotesEnabled" class="js-confidential-note-toggle mb-4">
- <gl-form-checkbox v-model="noteIsConfidential">
- <gl-icon name="eye-slash" :size="12" />
- {{ __('Mark this comment as private') }}
- <gl-icon
- v-gl-tooltip:tooltipcontainer.bottom
- name="question"
- :size="12"
- :title="__('Private comments are accessible by internal staff only')"
- class="gl-text-gray-800"
- />
- </gl-form-checkbox>
- </div>
<div
class="float-left btn-group
append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"
diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue
index c6675bc0aef..74a0b69bc54 100644
--- a/app/assets/javascripts/notes/components/note_header.vue
+++ b/app/assets/javascripts/notes/components/note_header.vue
@@ -1,6 +1,5 @@
<script>
import { mapActions } from 'vuex';
-import { GlIcon, GlTooltipDirective } from '@gitlab/ui';
import timeAgoTooltip from '~/vue_shared/components/time_ago_tooltip.vue';
import GitlabTeamMemberBadge from '~/vue_shared/components/user_avatar/badges/gitlab_team_member_badge.vue';
@@ -8,10 +7,6 @@ export default {
components: {
timeAgoTooltip,
GitlabTeamMemberBadge,
- GlIcon,
- },
- directives: {
- GlTooltip: GlTooltipDirective,
},
props: {
author: {
@@ -49,11 +44,6 @@ export default {
required: false,
default: true,
},
- isConfidential: {
- type: Boolean,
- required: false,
- default: false,
- },
},
data() {
return {
@@ -170,32 +160,23 @@ export default {
</span>
</template>
<span v-else>{{ __('A deleted user') }}</span>
- <span class="note-headline-light note-headline-meta d-sm-inline-flex align-items-center">
+ <span class="note-headline-light note-headline-meta">
<span class="system-note-message"> <slot></slot> </span>
<template v-if="createdAt">
- <span ref="actionText" class="system-note-separator ml-1">
+ <span ref="actionText" class="system-note-separator">
<template v-if="actionText">{{ actionText }}</template>
</span>
<a
v-if="noteTimestampLink"
ref="noteTimestampLink"
:href="noteTimestampLink"
- class="note-timestamp system-note-separator mr-1"
+ class="note-timestamp system-note-separator"
@click="updateTargetNoteHash"
>
<time-ago-tooltip :time="createdAt" tooltip-placement="bottom" />
</a>
<time-ago-tooltip v-else ref="noteTimestamp" :time="createdAt" tooltip-placement="bottom" />
</template>
- <gl-icon
- v-if="isConfidential"
- ref="confidentialIndicator"
- v-gl-tooltip:tooltipcontainer.bottom
- name="eye-slash"
- :size="14"
- :title="__('Private comments are accessible by internal staff only')"
- class="mx-1 gl-text-gray-800"
- />
<slot name="extra-controls"></slot>
<i
v-if="showSpinner"
diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue
index 3b17ad2ada7..dea782683f2 100644
--- a/app/assets/javascripts/notes/components/noteable_note.vue
+++ b/app/assets/javascripts/notes/components/noteable_note.vue
@@ -255,13 +255,7 @@ export default {
</div>
<div class="timeline-content">
<div class="note-header">
- <note-header
- v-once
- :author="author"
- :created-at="note.created_at"
- :note-id="note.id"
- :is-confidential="note.confidential"
- >
+ <note-header v-once :author="author" :created-at="note.created_at" :note-id="note.id">
<slot slot="note-header-info" name="note-header-info"></slot>
<span v-if="commit" v-html="actionText"></span>
<span v-else class="d-none d-sm-inline">&middot;</span>
diff --git a/app/assets/javascripts/vue_shared/components/notes/system_note.vue b/app/assets/javascripts/vue_shared/components/notes/system_note.vue
index 05e1293a80e..ec7d7e94e5c 100644
--- a/app/assets/javascripts/vue_shared/components/notes/system_note.vue
+++ b/app/assets/javascripts/vue_shared/components/notes/system_note.vue
@@ -107,7 +107,7 @@ export default {
<span v-html="actionTextHtml"></span>
<template v-if="canSeeDescriptionVersion" slot="extra-controls">
&middot;
- <button type="button" class="btn-blank btn-link ml-1" @click="toggleDescriptionVersion">
+ <button type="button" class="btn-blank btn-link" @click="toggleDescriptionVersion">
{{ __('Compare with previous version') }}
<icon :name="descriptionVersionToggleIcon" :size="12" class="append-left-5" />
</button>
diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss
index e79842b646f..bed147aa3a7 100644
--- a/app/assets/stylesheets/pages/notes.scss
+++ b/app/assets/stylesheets/pages/notes.scss
@@ -660,6 +660,10 @@ $note-form-margin-left: 72px;
padding-bottom: 0;
}
+.note-headline-light {
+ display: inline;
+}
+
.note-headline-light,
.discussion-headline-light {
color: $gl-text-color-secondary;
diff --git a/app/controllers/projects/issues_controller.rb b/app/controllers/projects/issues_controller.rb
index fa4b91c5e02..47dbb800047 100644
--- a/app/controllers/projects/issues_controller.rb
+++ b/app/controllers/projects/issues_controller.rb
@@ -51,7 +51,6 @@ class Projects::IssuesController < Projects::ApplicationController
before_action only: :show do
push_frontend_feature_flag(:real_time_issue_sidebar, @project)
- push_frontend_feature_flag(:confidential_notes, @project)
end
around_action :allow_gitaly_ref_name_caching, only: [:discussions]