diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-21 12:09:01 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-02-21 12:09:01 +0300 |
commit | a53d2c37c4934f564caa94543dd4cf5af1703e2d (patch) | |
tree | a028dc39771a4612a9845ab700a73af2d6f3f51b /app/assets | |
parent | 18b8435318887d3fc6e9f9d305967a953cdd7d3f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets')
5 files changed, 28 insertions, 57 deletions
diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue index 12d68256598..0fc60528eb6 100644 --- a/app/assets/javascripts/boards/components/board_card.vue +++ b/app/assets/javascripts/boards/components/board_card.vue @@ -65,11 +65,12 @@ export default { }, showIssue(e) { if (e.target.classList.contains('js-no-trigger')) return; - if (this.showDetail) { - this.showDetail = false; - // If CMD or CTRL is clicked - const isMultiSelect = this.canMultiSelect && (e.ctrlKey || e.metaKey); + // If CMD or CTRL is clicked + const isMultiSelect = this.canMultiSelect && (e.ctrlKey || e.metaKey); + + if (this.showDetail || isMultiSelect) { + this.showDetail = false; if (boardsStore.detail.issue && boardsStore.detail.issue.id === this.issue.id) { eventHub.$emit('clearDetailIssue', isMultiSelect); diff --git a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue index 3276d85f1cd..c0dadedbc51 100644 --- a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue +++ b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue @@ -1,6 +1,5 @@ <script> /* eslint-disable vue/require-default-prop */ -import { isEmpty, isString } from 'lodash'; import Identicon from '~/vue_shared/components/identicon.vue'; import highlight from '~/lib/utils/highlight'; import { truncateNamespace } from '~/lib/utils/text_utility'; @@ -38,9 +37,6 @@ export default { }, }, computed: { - hasAvatar() { - return isString(this.avatarUrl) && !isEmpty(this.avatarUrl); - }, truncatedNamespace() { return truncateNamespace(this.namespace); }, @@ -54,8 +50,11 @@ export default { <template> <li class="frequent-items-list-item-container"> <a :href="webUrl" class="clearfix"> - <div class="frequent-items-item-avatar-container avatar-container rect-avatar s32"> - <img v-if="hasAvatar" :src="avatarUrl" class="avatar s32" /> + <div + ref="frequentItemsItemAvatarContainer" + class="frequent-items-item-avatar-container avatar-container rect-avatar s32" + > + <img v-if="avatarUrl" ref="frequentItemsItemAvatar" :src="avatarUrl" class="avatar s32" /> <identicon v-else :entity-id="itemId" @@ -64,16 +63,18 @@ export default { class="rect-avatar" /> </div> - <div class="frequent-items-item-metadata-container"> + <div ref="frequentItemsItemMetadataContainer" class="frequent-items-item-metadata-container"> <div + ref="frequentItemsItemTitle" :title="itemName" - class="frequent-items-item-title js-frequent-items-item-title" + class="frequent-items-item-title" v-html="highlightedItemName" ></div> <div v-if="namespace" + ref="frequentItemsItemNamespace" :title="namespace" - class="frequent-items-item-namespace js-frequent-items-item-namespace" + class="frequent-items-item-namespace" > {{ truncatedNamespace }} </div> diff --git a/app/assets/javascripts/ide/components/nav_dropdown_button.vue b/app/assets/javascripts/ide/components/nav_dropdown_button.vue index 4cd320d5d66..8dc22620eca 100644 --- a/app/assets/javascripts/ide/components/nav_dropdown_button.vue +++ b/app/assets/javascripts/ide/components/nav_dropdown_button.vue @@ -31,8 +31,8 @@ export default { <template> <dropdown-button> - <span class="row"> - <span class="col-auto text-truncate" :class="{ 'col-7': showMergeRequests }"> + <span class="row flex-nowrap"> + <span class="col-auto flex-fill text-truncate"> <icon :size="16" :aria-label="__('Current Branch')" name="branch" /> {{ branchLabel }} </span> <span v-if="showMergeRequests" class="col-5 pl-0 text-truncate"> diff --git a/app/assets/javascripts/right_sidebar.js b/app/assets/javascripts/right_sidebar.js index fa5649679d7..550ec3cb0d1 100644 --- a/app/assets/javascripts/right_sidebar.js +++ b/app/assets/javascripts/right_sidebar.js @@ -1,4 +1,4 @@ -/* eslint-disable func-names, consistent-return, no-else-return, no-param-reassign */ +/* eslint-disable func-names, consistent-return, no-param-reassign */ import $ from 'jquery'; import _ from 'underscore'; @@ -34,8 +34,6 @@ Sidebar.prototype.addEventListeners = function() { this.sidebar.on('click', '.sidebar-collapsed-icon', this, this.sidebarCollapseClicked); this.sidebar.on('hidden.gl.dropdown', this, this.onSidebarDropdownHidden); - $('.dropdown').on('loading.gl.dropdown', this.sidebarDropdownLoading); - $('.dropdown').on('loaded.gl.dropdown', this.sidebarDropdownLoaded); $document.on('click', '.js-sidebar-toggle', this.sidebarToggleClicked); return $(document) @@ -133,36 +131,6 @@ Sidebar.prototype.todoUpdateDone = function(data) { }); }; -Sidebar.prototype.sidebarDropdownLoading = function() { - const $sidebarCollapsedIcon = $(this) - .closest('.block') - .find('.sidebar-collapsed-icon'); - const img = $sidebarCollapsedIcon.find('img'); - const i = $sidebarCollapsedIcon.find('i'); - const $loading = $('<i class="fa fa-spinner fa-spin"></i>'); - if (img.length) { - img.before($loading); - return img.hide(); - } else if (i.length) { - i.before($loading); - return i.hide(); - } -}; - -Sidebar.prototype.sidebarDropdownLoaded = function() { - const $sidebarCollapsedIcon = $(this) - .closest('.block') - .find('.sidebar-collapsed-icon'); - const img = $sidebarCollapsedIcon.find('img'); - $sidebarCollapsedIcon.find('i.fa-spin').remove(); - const i = $sidebarCollapsedIcon.find('i'); - if (img.length) { - return img.show(); - } else { - return i.show(); - } -}; - Sidebar.prototype.sidebarCollapseClicked = function(e) { if ($(e.currentTarget).hasClass('dont-change-state')) { return; diff --git a/app/assets/javascripts/vue_merge_request_widget/components/deployment/deployment_view_button.vue b/app/assets/javascripts/vue_merge_request_widget/components/deployment/deployment_view_button.vue index 18d4073ecd4..e1a1b1022e3 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/deployment/deployment_view_button.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/deployment/deployment_view_button.vue @@ -1,4 +1,5 @@ <script> +import { GlLink } from '@gitlab/ui'; import FilteredSearchDropdown from '~/vue_shared/components/filtered_search_dropdown.vue'; import ReviewAppLink from '../review_app_link.vue'; @@ -6,6 +7,7 @@ export default { name: 'DeploymentViewButton', components: { FilteredSearchDropdown, + GlLink, ReviewAppLink, VisualReviewAppLink: () => import('ee_component/vue_merge_request_widget/components/visual_review_app_link.vue'), @@ -67,7 +69,7 @@ export default { </template> <template slot="result" slot-scope="slotProps"> - <a + <gl-link :href="slotProps.result.external_url" target="_blank" rel="noopener noreferrer nofollow" @@ -80,16 +82,15 @@ export default { <p class="text-secondary str-truncated-100 append-bottom-0 d-block"> {{ slotProps.result.external_url }} </p> - </a> + </gl-link> </template> </filtered-search-dropdown> - <template v-else> - <review-app-link - :display="appButtonText" - :link="deploymentExternalUrl" - css-class="js-deploy-url deploy-link btn btn-default btn-sm inline" - /> - </template> + <review-app-link + v-else + :display="appButtonText" + :link="deploymentExternalUrl" + css-class="js-deploy-url deploy-link btn btn-default btn-sm inline" + /> <visual-review-app-link v-if="showVisualReviewApp" :link="deploymentExternalUrl" |