Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-11-08 18:09:34 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-11-08 18:09:34 +0300
commitb5bdf6e5219b3b57107aee49ba7c103affb65dd9 (patch)
tree54c1ea8b3140d60af9a6c64867edc0a484ef7735 /app/assets/javascripts/boards
parent81f062b841f6062601662061850934a51e77ceea (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/boards')
-rw-r--r--app/assets/javascripts/boards/components/board_card.vue4
-rw-r--r--app/assets/javascripts/boards/components/board_card_inner.vue5
-rw-r--r--app/assets/javascripts/boards/components/board_card_move_to_position.vue15
-rw-r--r--app/assets/javascripts/boards/components/board_list.vue13
4 files changed, 22 insertions, 15 deletions
diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue
index 44c16324950..f3307977be9 100644
--- a/app/assets/javascripts/boards/components/board_card.vue
+++ b/app/assets/javascripts/boards/components/board_card.vue
@@ -109,6 +109,8 @@ export default {
:update-filters="true"
:index="index"
:show-work-item-type-icon="showWorkItemTypeIcon"
- />
+ >
+ <slot></slot>
+ </board-card-inner>
</li>
</template>
diff --git a/app/assets/javascripts/boards/components/board_card_inner.vue b/app/assets/javascripts/boards/components/board_card_inner.vue
index 3a2b11a649d..1c67a2d9f7f 100644
--- a/app/assets/javascripts/boards/components/board_card_inner.vue
+++ b/app/assets/javascripts/boards/components/board_card_inner.vue
@@ -15,7 +15,6 @@ import { updateHistory } from '~/lib/utils/url_utility';
import { sprintf, __, n__ } from '~/locale';
import TooltipOnTruncate from '~/vue_shared/components/tooltip_on_truncate/tooltip_on_truncate.vue';
import UserAvatarLink from '~/vue_shared/components/user_avatar/user_avatar_link.vue';
-import BoardCardMoveToPosition from '~/boards/components/board_card_move_to_position.vue';
import WorkItemTypeIcon from '~/work_items/components/work_item_type_icon.vue';
import IssuableBlockedIcon from '~/vue_shared/components/issuable_blocked_icon/issuable_blocked_icon.vue';
import { ListType } from '../constants';
@@ -36,7 +35,6 @@ export default {
IssueCardWeight: () => import('ee_component/boards/components/issue_card_weight.vue'),
IssuableBlockedIcon,
GlSprintf,
- BoardCardMoveToPosition,
WorkItemTypeIcon,
IssueHealthStatus: () =>
import('ee_component/related_items_tree/components/issue_health_status.vue'),
@@ -250,8 +248,7 @@ export default {
>{{ item.title }}</a
>
</h4>
- <!-- TODO: remove the condition when https://gitlab.com/gitlab-org/gitlab/-/issues/377862 is resolved -->
- <board-card-move-to-position v-if="!isEpicBoard" :item="item" :list="list" :index="index" />
+ <slot></slot>
</div>
<div v-if="showLabelFooter" class="board-card-labels gl-mt-2 gl-display-flex gl-flex-wrap">
<template v-for="label in orderedLabels">
diff --git a/app/assets/javascripts/boards/components/board_card_move_to_position.vue b/app/assets/javascripts/boards/components/board_card_move_to_position.vue
index ff938219475..706b453e868 100644
--- a/app/assets/javascripts/boards/components/board_card_move_to_position.vue
+++ b/app/assets/javascripts/boards/components/board_card_move_to_position.vue
@@ -1,6 +1,6 @@
<script>
import { GlDropdown, GlDropdownItem } from '@gitlab/ui';
-import { mapActions, mapGetters, mapState } from 'vuex';
+import { mapActions, mapState } from 'vuex';
import { s__ } from '~/locale';
import Tracking from '~/tracking';
@@ -31,10 +31,13 @@ export default {
type: Number,
required: true,
},
+ listItemsLength: {
+ type: Number,
+ required: true,
+ },
},
computed: {
...mapState(['pageInfoByListId']),
- ...mapGetters(['getBoardItemsByList']),
tracking() {
return {
category: 'boards:list',
@@ -42,15 +45,9 @@ export default {
property: `type_card`,
};
},
- listItems() {
- return this.getBoardItemsByList(this.list.id);
- },
listHasNextPage() {
return this.pageInfoByListId[this.list.id]?.hasNextPage;
},
- lengthOfListItemsInBoard() {
- return this.listItems?.length;
- },
itemIdentifier() {
return `${this.item.id}-${this.item.iid}-${this.index}`;
},
@@ -58,7 +55,7 @@ export default {
return this.index === 0;
},
isLastItemInList() {
- return this.index === this.lengthOfListItemsInBoard - 1;
+ return this.index === this.listItemsLength - 1;
},
},
methods: {
diff --git a/app/assets/javascripts/boards/components/board_list.vue b/app/assets/javascripts/boards/components/board_list.vue
index edf1a5ee7e6..ebf19c32e5e 100644
--- a/app/assets/javascripts/boards/components/board_list.vue
+++ b/app/assets/javascripts/boards/components/board_list.vue
@@ -7,6 +7,7 @@ import { defaultSortableOptions } from '~/sortable/constants';
import { sortableStart, sortableEnd } from '~/sortable/utils';
import Tracking from '~/tracking';
import listQuery from 'ee_else_ce/boards/graphql/board_lists_deferred.query.graphql';
+import BoardCardMoveToPosition from '~/boards/components/board_card_move_to_position.vue';
import { toggleFormEventPrefix, DraggableItemTypes } from '../constants';
import eventHub from '../eventhub';
import BoardCard from './board_card.vue';
@@ -27,6 +28,7 @@ export default {
BoardNewEpic: () => import('ee_component/boards/components/board_new_epic.vue'),
GlLoadingIcon,
GlIntersectionObserver,
+ BoardCardMoveToPosition,
},
mixins: [Tracking.mixin()],
props: {
@@ -309,7 +311,16 @@ export default {
:data-draggable-item-type="$options.draggableItemTypes.card"
:disabled="disabled"
:show-work-item-type-icon="!isEpicBoard"
- />
+ >
+ <!-- TODO: remove the condition when https://gitlab.com/gitlab-org/gitlab/-/issues/377862 is resolved -->
+ <board-card-move-to-position
+ v-if="!isEpicBoard"
+ :item="item"
+ :index="index"
+ :list="list"
+ :list-items-length="boardItems.length"
+ />
+ </board-card>
<gl-intersection-observer @appear="onReachingListBottom">
<li
v-if="showCount"