diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-07 21:08:29 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-04-07 21:08:29 +0300 |
commit | c2bdb9d02768a61bee7560113f4d4c83dc91338e (patch) | |
tree | e242f8d39df80ec39a59eb73ad96ee389c8a4d41 /app/assets/javascripts/boards | |
parent | fe4751154c331e35c0e6575a3aedc02b210a1c63 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'app/assets/javascripts/boards')
4 files changed, 5 insertions, 57 deletions
diff --git a/app/assets/javascripts/boards/components/board_content.vue b/app/assets/javascripts/boards/components/board_content.vue index 27ea2e7a608..1d6a71aca47 100644 --- a/app/assets/javascripts/boards/components/board_content.vue +++ b/app/assets/javascripts/boards/components/board_content.vue @@ -4,7 +4,7 @@ import { sortBy } from 'lodash'; import Draggable from 'vuedraggable'; import { mapState, mapGetters, mapActions } from 'vuex'; import BoardAddNewColumn from 'ee_else_ce/boards/components/board_add_new_column.vue'; -import defaultSortableConfig from '~/sortable/sortable_config'; +import { defaultSortableOptions } from '~/sortable/constants'; import { DraggableItemTypes } from '../constants'; import BoardColumn from './board_column.vue'; @@ -43,7 +43,7 @@ export default { }, draggableOptions() { const options = { - ...defaultSortableConfig, + ...defaultSortableOptions, disabled: this.disabled, draggable: '.is-draggable', fallbackOnBody: false, diff --git a/app/assets/javascripts/boards/components/board_list.vue b/app/assets/javascripts/boards/components/board_list.vue index 858cd368b12..47f25f34d0c 100644 --- a/app/assets/javascripts/boards/components/board_list.vue +++ b/app/assets/javascripts/boards/components/board_list.vue @@ -2,9 +2,9 @@ import { GlLoadingIcon, GlIntersectionObserver } from '@gitlab/ui'; import Draggable from 'vuedraggable'; import { mapActions, mapGetters, mapState } from 'vuex'; -import { sortableStart, sortableEnd } from '~/boards/mixins/sortable_default_options'; import { sprintf, __ } from '~/locale'; -import defaultSortableConfig from '~/sortable/sortable_config'; +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 { toggleFormEventPrefix, DraggableItemTypes } from '../constants'; @@ -121,7 +121,7 @@ export default { }, treeRootOptions() { const options = { - ...defaultSortableConfig, + ...defaultSortableOptions, fallbackOnBody: false, group: 'board-list', tag: 'ul', diff --git a/app/assets/javascripts/boards/components/issuable_title.vue b/app/assets/javascripts/boards/components/issuable_title.vue deleted file mode 100644 index 40627a9fab8..00000000000 --- a/app/assets/javascripts/boards/components/issuable_title.vue +++ /dev/null @@ -1,21 +0,0 @@ -<script> -export default { - props: { - title: { - type: String, - required: true, - }, - refPath: { - type: String, - required: true, - }, - }, -}; -</script> - -<template> - <div data-testid="issue-title"> - <p class="gl-font-weight-bold">{{ title }}</p> - <p class="gl-mb-0">{{ refPath }}</p> - </div> -</template> diff --git a/app/assets/javascripts/boards/mixins/sortable_default_options.js b/app/assets/javascripts/boards/mixins/sortable_default_options.js deleted file mode 100644 index 1bb0ee5b7e3..00000000000 --- a/app/assets/javascripts/boards/mixins/sortable_default_options.js +++ /dev/null @@ -1,31 +0,0 @@ -/* global DocumentTouch */ - -import sortableConfig from '~/sortable/sortable_config'; - -export function sortableStart() { - document.body.classList.add('is-dragging'); -} - -export function sortableEnd() { - document.body.classList.remove('is-dragging'); -} - -export function getBoardSortableDefaultOptions(obj) { - const touchEnabled = - 'ontouchstart' in window || (window.DocumentTouch && document instanceof DocumentTouch); - - const defaultSortOptions = { - ...sortableConfig, - filter: '.no-drag', - delay: touchEnabled ? 100 : 0, - scrollSensitivity: touchEnabled ? 60 : 100, - scrollSpeed: 20, - onStart: sortableStart, - onEnd: sortableEnd, - }; - - Object.keys(obj).forEach((key) => { - defaultSortOptions[key] = obj[key]; - }); - return defaultSortOptions; -} |