diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-02-18 13:34:06 +0300 |
commit | 859a6fb938bb9ee2a317c46dfa4fcc1af49608f0 (patch) | |
tree | d7f2700abe6b4ffcb2dcfc80631b2d87d0609239 /app/assets/javascripts/boards/components/board_list_header_deprecated.vue | |
parent | 446d496a6d000c73a304be52587cd9bbc7493136 (diff) |
Add latest changes from gitlab-org/gitlab@13-9-stable-eev13.9.0-rc42
Diffstat (limited to 'app/assets/javascripts/boards/components/board_list_header_deprecated.vue')
-rw-r--r-- | app/assets/javascripts/boards/components/board_list_header_deprecated.vue | 41 |
1 files changed, 28 insertions, 13 deletions
diff --git a/app/assets/javascripts/boards/components/board_list_header_deprecated.vue b/app/assets/javascripts/boards/components/board_list_header_deprecated.vue index 21147f1616c..ff043d3aa01 100644 --- a/app/assets/javascripts/boards/components/board_list_header_deprecated.vue +++ b/app/assets/javascripts/boards/components/board_list_header_deprecated.vue @@ -1,5 +1,4 @@ <script> -import { mapActions, mapState } from 'vuex'; import { GlButton, GlButtonGroup, @@ -9,14 +8,16 @@ import { GlSprintf, GlTooltipDirective, } from '@gitlab/ui'; +import { mapActions, mapState } from 'vuex'; +import { isScopedLabel } from '~/lib/utils/common_utils'; +import { BV_HIDE_TOOLTIP } from '~/lib/utils/constants'; import { n__, s__ } from '~/locale'; -import AccessorUtilities from '../../lib/utils/accessor'; -import IssueCount from './issue_count.vue'; -import boardsStore from '../stores/boards_store'; -import eventHub from '../eventhub'; import sidebarEventHub from '~/sidebar/event_hub'; +import AccessorUtilities from '../../lib/utils/accessor'; import { inactiveId, LIST, ListType } from '../constants'; -import { isScopedLabel } from '~/lib/utils/common_utils'; +import eventHub from '../eventhub'; +import boardsStore from '../stores/boards_store'; +import IssueCount from './issue_count.vue'; // This component is being replaced in favor of './board_list_header.vue' for GraphQL boards @@ -77,14 +78,16 @@ export default { return !this.disabled && this.listType !== ListType.closed; }, showMilestoneListDetails() { - return ( - this.list.type === 'milestone' && - this.list.milestone && - (this.list.isExpanded || !this.isSwimlanesHeader) - ); + return this.list.type === 'milestone' && this.list.milestone && this.showListDetails; }, showAssigneeListDetails() { - return this.list.type === 'assignee' && (this.list.isExpanded || !this.isSwimlanesHeader); + return this.list.type === 'assignee' && this.showListDetails; + }, + showIterationListDetails() { + return this.listType === ListType.iteration && this.showListDetails; + }, + showListDetails() { + return this.list.isExpanded || !this.isSwimlanesHeader; }, issuesCount() { return this.list.issuesSize; @@ -131,6 +134,7 @@ export default { eventHub.$emit(`toggle-issue-form-${this.list.id}`); }, toggleExpanded() { + // eslint-disable-next-line vue/no-mutating-props this.list.isExpanded = !this.list.isExpanded; if (!this.isLoggedIn) { @@ -141,7 +145,7 @@ export default { // When expanding/collapsing, the tooltip on the caret button sometimes stays open. // Close all tooltips manually to prevent dangling tooltips. - this.$root.$emit('bv::hide::tooltip'); + this.$root.$emit(BV_HIDE_TOOLTIP); }, addToLocalStorage() { if (AccessorUtilities.isLocalStorageAccessSafe()) { @@ -201,6 +205,17 @@ export default { <gl-icon name="timer" /> </span> + <span + v-if="showIterationListDetails" + aria-hidden="true" + :class="{ + 'gl-mt-3 gl-rotate-90': !list.isExpanded, + 'gl-mr-2': list.isExpanded, + }" + > + <gl-icon name="iteration" /> + </span> + <a v-if="showAssigneeListDetails" :href="list.assignee.path" |