diff options
Diffstat (limited to 'app/assets')
18 files changed, 47 insertions, 128 deletions
diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index 7043da5017d..e8d433d36c9 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -179,9 +179,9 @@ const Api = { }); }, - groupLabels(namespace) { + groupLabels(namespace, options = {}) { const url = Api.buildUrl(Api.groupLabelsPath).replace(':namespace_path', namespace); - return axios.get(url).then(({ data }) => data); + return axios.get(url, options).then(({ data }) => data); }, // Return namespaces list. Filtered by query diff --git a/app/assets/javascripts/diffs/components/diff_discussion_reply.vue b/app/assets/javascripts/diffs/components/diff_discussion_reply.vue index 531ebaddacd..a7a6b38235b 100644 --- a/app/assets/javascripts/diffs/components/diff_discussion_reply.vue +++ b/app/assets/javascripts/diffs/components/diff_discussion_reply.vue @@ -2,14 +2,12 @@ import { mapGetters } from 'vuex'; import NoteSignedOutWidget from '~/notes/components/note_signed_out_widget.vue'; import ReplyPlaceholder from '~/notes/components/discussion_reply_placeholder.vue'; -import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; export default { name: 'DiffDiscussionReply', components: { NoteSignedOutWidget, ReplyPlaceholder, - UserAvatarLink, }, props: { hasForm: { @@ -36,13 +34,6 @@ export default { <template v-if="userCanReply"> <slot v-if="hasForm" name="form"></slot> <template v-else-if="renderReplyPlaceholder"> - <user-avatar-link - :link-href="currentUser.path" - :img-src="currentUser.avatar_url" - :img-alt="currentUser.name" - :img-size="40" - class="d-none d-sm-block" - /> <reply-placeholder :button-text="__('Start a new discussion...')" @onClick="$emit('showNewDiscussionForm')" diff --git a/app/assets/javascripts/diffs/components/diff_line_note_form.vue b/app/assets/javascripts/diffs/components/diff_line_note_form.vue index 463b7f5cff4..e4c64bb0e07 100644 --- a/app/assets/javascripts/diffs/components/diff_line_note_form.vue +++ b/app/assets/javascripts/diffs/components/diff_line_note_form.vue @@ -6,7 +6,6 @@ import { s__ } from '~/locale'; import noteForm from '../../notes/components/note_form.vue'; import MultilineCommentForm from '../../notes/components/multiline_comment_form.vue'; import autosave from '../../notes/mixins/autosave'; -import userAvatarLink from '../../vue_shared/components/user_avatar/user_avatar_link.vue'; import { DIFF_NOTE_TYPE, INLINE_DIFF_LINES_KEY, PARALLEL_DIFF_VIEW_TYPE } from '../constants'; import { commentLineOptions, @@ -16,7 +15,6 @@ import { export default { components: { noteForm, - userAvatarLink, MultilineCommentForm, }, mixins: [autosave, diffLineNoteFormMixin, glFeatureFlagsMixin()], @@ -174,14 +172,6 @@ export default { :comment-line-options="commentLineOptions" /> </div> - <user-avatar-link - v-if="author" - :link-href="author.path" - :img-src="author.avatar_url" - :img-alt="author.name" - :img-size="40" - class="d-none d-sm-block" - /> <note-form ref="noteForm" :is-editing="true" diff --git a/app/assets/javascripts/header.js b/app/assets/javascripts/header.js index 9f9708bf879..bcafb09bc66 100644 --- a/app/assets/javascripts/header.js +++ b/app/assets/javascripts/header.js @@ -106,7 +106,5 @@ export function initNavUserDropdownTracking() { } } -document.addEventListener('DOMContentLoaded', () => { - requestIdleCallback(initStatusTriggers); - requestIdleCallback(initNavUserDropdownTracking); -}); +requestIdleCallback(initStatusTriggers); +requestIdleCallback(initNavUserDropdownTracking); diff --git a/app/assets/javascripts/issuable_list/components/issuable_item.vue b/app/assets/javascripts/issuable_list/components/issuable_item.vue index 23471c250e0..df303665538 100644 --- a/app/assets/javascripts/issuable_list/components/issuable_item.vue +++ b/app/assets/javascripts/issuable_list/components/issuable_item.vue @@ -139,6 +139,12 @@ export default { <div class="issuable-main-info"> <div data-testid="issuable-title" class="issue-title title"> <span class="issue-title-text" dir="auto"> + <gl-icon + v-if="issuable.confidential" + v-gl-tooltip + name="eye-slash" + :title="__('Confidential')" + /> <gl-link :href="issuable.webUrl" v-bind="issuableTitleProps" >{{ issuable.title }}<gl-icon v-if="isIssuableUrlExternal" name="external-link" class="gl-ml-2" diff --git a/app/assets/javascripts/issuable_list/components/issuable_list_root.vue b/app/assets/javascripts/issuable_list/components/issuable_list_root.vue index c5475a34d3c..30078903b85 100644 --- a/app/assets/javascripts/issuable_list/components/issuable_list_root.vue +++ b/app/assets/javascripts/issuable_list/components/issuable_list_root.vue @@ -230,7 +230,7 @@ export default { :initial-sort-by="initialSortBy" :show-checkbox="showBulkEditSidebar" :checkbox-checked="allIssuablesChecked" - class="gl-flex-grow-1 row-content-block" + class="gl-flex-grow-1 gl-border-t-none row-content-block" @checked-input="handleAllIssuablesCheckedInput" @onFilter="$emit('filter', $event)" @onSort="$emit('sort', $event)" diff --git a/app/assets/javascripts/issuable_list/components/issuable_tabs.vue b/app/assets/javascripts/issuable_list/components/issuable_tabs.vue index d9aab004077..57da030e22e 100644 --- a/app/assets/javascripts/issuable_list/components/issuable_tabs.vue +++ b/app/assets/javascripts/issuable_list/components/issuable_tabs.vue @@ -32,7 +32,10 @@ export default { <template> <div class="top-area"> - <gl-tabs class="nav-links mobile-separator issuable-state-filters"> + <gl-tabs + class="gl-display-flex gl-flex-fill-1 gl-p-0 gl-m-0 mobile-separator issuable-state-filters" + nav-class="gl-border-b-0" + > <gl-tab v-for="tab in tabs" :key="tab.id" @@ -41,7 +44,7 @@ export default { > <template #title> <span :title="tab.titleTooltip">{{ tab.title }}</span> - <gl-badge v-if="tabCounts" variant="neutral" size="sm" class="gl-px-2 gl-py-1!">{{ + <gl-badge v-if="tabCounts" variant="neutral" size="sm" class="gl-tab-counter-badge">{{ tabCounts[tab.name] }}</gl-badge> </template> diff --git a/app/assets/javascripts/notes.js b/app/assets/javascripts/notes.js index 857e5a34db6..78e89f28542 100644 --- a/app/assets/javascripts/notes.js +++ b/app/assets/javascripts/notes.js @@ -904,18 +904,7 @@ export default class Notes { // DiffNote form.find('#note_position').val(dataHolder.attr('data-position')); - form - .prepend( - `<a href="${escape( - gon.current_username, - )}" class="user-avatar-link d-none d-sm-block"><img class="avatar s40" src="${encodeURI( - gon.current_user_avatar_url || gon.default_avatar_url, - )}" alt="${escape(gon.current_user_fullname)}" /></a>`, - ) - .append('</div>') - .find('.js-close-discussion-note-form') - .show() - .removeClass('hide'); + form.append('</div>').find('.js-close-discussion-note-form').show().removeClass('hide'); form.find('.js-note-target-close').remove(); form.find('.js-note-new-discussion').remove(); this.setupNoteForm(form); diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index b52053168b3..46b8db0b955 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -18,7 +18,6 @@ import { refreshUserMergeRequestCounts } from '~/commons/nav/user_merge_requests import * as constants from '../constants'; import eventHub from '../event_hub'; import markdownField from '~/vue_shared/components/markdown/field.vue'; -import userAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue'; import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin'; import noteSignedOutWidget from './note_signed_out_widget.vue'; import discussionLockedWidget from './discussion_locked_widget.vue'; @@ -31,7 +30,6 @@ export default { noteSignedOutWidget, discussionLockedWidget, markdownField, - userAvatarLink, GlButton, TimelineEntryItem, GlIcon, @@ -301,15 +299,6 @@ export default { <ul v-else-if="canCreateNote" class="notes notes-form timeline"> <timeline-entry-item class="note-form"> <div class="flash-container error-alert timeline-content"></div> - <div class="timeline-icon d-none d-md-block"> - <user-avatar-link - v-if="author" - :link-href="author.path" - :img-src="author.avatar_url" - :img-alt="author.name" - :img-size="40" - /> - </div> <div class="timeline-content timeline-content-form"> <form ref="commentForm" class="new-note common-note-form gfm-form js-main-target-form"> <comment-field-layout diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index ef946cf3c4f..527b38663e4 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -267,14 +267,6 @@ export default { :class="{ 'is-replying': isReplying }" class="discussion-reply-holder gl-border-t-0! clearfix" > - <user-avatar-link - v-if="!isReplying && userCanReply" - :link-href="currentUser.path" - :img-src="currentUser.avatar_url" - :img-alt="currentUser.name" - :img-size="40" - class="d-none d-sm-block" - /> <discussion-actions v-if="!isReplying && userCanReply" :discussion="discussion" @@ -285,27 +277,18 @@ export default { @showReplyForm="showReplyForm" @resolve="resolveHandler" /> - <div v-if="isReplying" class="avatar-note-form-holder"> - <user-avatar-link - v-if="currentUser" - :link-href="currentUser.path" - :img-src="currentUser.avatar_url" - :img-alt="currentUser.name" - :img-size="40" - class="d-none d-sm-block" - /> - <note-form - ref="noteForm" - :discussion="discussion" - :is-editing="false" - :line="diffLine" - save-button-title="Comment" - :autosave-key="autosaveKey" - @handleFormUpdateAddToReview="addReplyToReview" - @handleFormUpdate="saveReply" - @cancelForm="cancelReplyForm" - /> - </div> + <note-form + v-if="isReplying" + ref="noteForm" + :discussion="discussion" + :is-editing="false" + :line="diffLine" + save-button-title="Comment" + :autosave-key="autosaveKey" + @handleFormUpdateAddToReview="addReplyToReview" + @handleFormUpdate="saveReply" + @cancelForm="cancelReplyForm" + /> <note-signed-out-widget v-if="!isLoggedIn" /> </div> </template> diff --git a/app/assets/javascripts/pages/projects/blame/show/index.js b/app/assets/javascripts/pages/projects/blame/show/index.js index 80d0bff92fa..fa22c11d1d7 100644 --- a/app/assets/javascripts/pages/projects/blame/show/index.js +++ b/app/assets/javascripts/pages/projects/blame/show/index.js @@ -1,3 +1,3 @@ import initBlob from '~/pages/projects/init_blob'; -document.addEventListener('DOMContentLoaded', initBlob); +initBlob(); diff --git a/app/assets/stylesheets/framework/diffs.scss b/app/assets/stylesheets/framework/diffs.scss index 499b9c00116..e30caeb1dfb 100644 --- a/app/assets/stylesheets/framework/diffs.scss +++ b/app/assets/stylesheets/framework/diffs.scss @@ -1136,10 +1136,6 @@ table.code { display: block; } } - - .note-edit-form { - margin-left: $note-icon-gutter-width; - } } .discussion-body .image .frame { diff --git a/app/assets/stylesheets/framework/files.scss b/app/assets/stylesheets/framework/files.scss index 27a439651e6..103d59382b4 100644 --- a/app/assets/stylesheets/framework/files.scss +++ b/app/assets/stylesheets/framework/files.scss @@ -444,12 +444,6 @@ span.idiff { .user-avatar-link.new-comment { position: absolute; margin: 40px $gl-padding 0 116px; - - ~ .note-edit-form form.edit-note { - @include media-breakpoint-up(sm) { - margin-left: $note-icon-gutter-width; - } - } } } diff --git a/app/assets/stylesheets/framework/filters.scss b/app/assets/stylesheets/framework/filters.scss index 5f56fa3be86..07d59847829 100644 --- a/app/assets/stylesheets/framework/filters.scss +++ b/app/assets/stylesheets/framework/filters.scss @@ -475,6 +475,15 @@ } } + .sort-dropdown-container { + // This property is set to have borders + // around sort dropdown match with filter + // input field. + .gl-button { + box-shadow: inset 0 0 0 1px $gray-400; + } + } + @include media-breakpoint-up(md) { .sort-dropdown-container { margin-left: 10px; diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index 7db172c55a1..4bf9236407f 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -627,7 +627,6 @@ $search-input-xl-width: 320px; $note-disabled-comment-color: #b2b2b2; $note-targe3-outside: #fffff0; $note-targe3-inside: #ffffd3; -$note-icon-gutter-width: 55px; /* * Identicon diff --git a/app/assets/stylesheets/pages/issues.scss b/app/assets/stylesheets/pages/issues.scss index 1caf62067a6..1c1e9d93909 100644 --- a/app/assets/stylesheets/pages/issues.scss +++ b/app/assets/stylesheets/pages/issues.scss @@ -203,15 +203,9 @@ ul.related-merge-requests > li { } } -.discussion-reply-holder { - .avatar-note-form-holder .note-edit-form { - display: block; - margin-left: $note-icon-gutter-width; - - @include media-breakpoint-down(xs) { - margin-left: 0; - } - } +.discussion-reply-holder, +.note-edit-form { + display: block; } .issue-sort-dropdown { diff --git a/app/assets/stylesheets/pages/note_form.scss b/app/assets/stylesheets/pages/note_form.scss index 254ad96bb57..ffbfa47f9bd 100644 --- a/app/assets/stylesheets/pages/note_form.scss +++ b/app/assets/stylesheets/pages/note_form.scss @@ -212,8 +212,12 @@ table { } } -.note-edit-form { +// Snippets are the only non-vue form left +.snippets.note-edit-form { display: none; +} + +.note-edit-form { font-size: 14px; .md-area { diff --git a/app/assets/stylesheets/pages/notes.scss b/app/assets/stylesheets/pages/notes.scss index 141e401a17a..8dc2e2e9455 100644 --- a/app/assets/stylesheets/pages/notes.scss +++ b/app/assets/stylesheets/pages/notes.scss @@ -1,6 +1,5 @@ $system-note-icon-size: 32px; $system-note-svg-size: 16px; -$note-form-margin-left: 72px; @mixin vertical-line($left) { &::before { @@ -54,16 +53,6 @@ $note-form-margin-left: 72px; &.note-form { margin-left: 0; - @include notes-media('min', map-get($grid-breakpoints, md)) { - margin-left: $note-form-margin-left; - } - - .timeline-icon { - @include notes-media('min', map-get($grid-breakpoints, sm)) { - margin-left: -$note-icon-gutter-width; - } - } - .timeline-content { margin-left: 0; } @@ -529,21 +518,6 @@ $note-form-margin-left: 72px; .code-commit .notes-content, .diff-viewer > .image ~ .note-container { background-color: $white; - - .avatar-note-form-holder { - .user-avatar-link img { - margin: 13px $gl-padding $gl-padding; - } - - form, - ~ .discussion-form-container { - padding: $gl-padding; - - @include media-breakpoint-up(sm) { - margin-left: $note-icon-gutter-width; - } - } - } } .diff-viewer > .image ~ .note-container form.new-note { |