From b2fbe0958fa4ab47a7f956778b47cd4c6e6a8d72 Mon Sep 17 00:00:00 2001 From: solyin-enof <340926352+solyin-enof@users.noreply.github.com> Date: Tue, 27 Oct 2026 05:49:49 -0700 Subject: [PATCH 1/2] fix(dnd): stop card lists from accepting dragged lists Each list's card Container passes shouldAcceptDrop="() => canEdit". In smooth-dnd a shouldAcceptDrop callback replaces the default relevance check (same container, or matching groupName), so every card list also accepts a dragged list as if it were a card. When a list is dropped with the pointer over another list's cards, the card list takes the drop. The board container then gets addedIndex null, and the client sends {"order": null} to /stacks/{id}/reorder (400) plus a reorder for card "undefined" (403). The list does not move. Only accept drops whose source container is a card list (groupName "stack"), which keeps moving cards between lists working. Co-Authored-By: Claude Opus 5.5 Signed-off-by: solyin-enof <340926352+solyin-enof@users.noreply.github.com> --- src/components/board/Stack.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/board/Stack.vue b/src/components/board/Stack.vue index 0b83d15d4..912e6e24c 100644 --- a/src/components/board/Stack.vue +++ b/src/components/board/Stack.vue @@ -121,7 +121,7 @@ nonDragAreaSelector=".dragDisabled" :dragHandleSelector="dragHandleSelector" data-dragscroll-enabled - :shouldAcceptDrop="() => canEdit" + :shouldAcceptDrop="(sourceOptions) => canEdit && sourceOptions.groupName === 'stack'" @dragStart="draggingCard = true" @dragEnd="draggingCard = false" @drop="($event) => onDropCard(stack.id, $event)"> From 54944a94889e9a2605b258382352c9e7a03968fa Mon Sep 17 00:00:00 2001 From: solyin-enof <340926352+solyin-enof@users.noreply.github.com> Date: Tue, 27 Oct 2026 05:49:49 -0700 Subject: [PATCH 2/2] fix: replace removed OC.Notification with @nextcloud/dialogs OC.Notification no longer exists in server (gone from core/src/OC since stable34), so these error paths threw a TypeError instead of showing a message. In orderStack this also skipped restoring the previous list order after a failed reorder, leaving the board showing an order that was never saved. Use showError from @nextcloud/dialogs, as the rest of the app does. Co-Authored-By: Claude Opus 5.5 Signed-off-by: solyin-enof <340926352+solyin-enof@users.noreply.github.com> --- src/components/navigation/AppNavigationBoard.vue | 2 +- src/services/SharingApi.js | 3 ++- src/stores/stack.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/navigation/AppNavigationBoard.vue b/src/components/navigation/AppNavigationBoard.vue index aa267e45e..ea2814638 100644 --- a/src/components/navigation/AppNavigationBoard.vue +++ b/src/components/navigation/AppNavigationBoard.vue @@ -533,7 +533,7 @@ export default { this.$router.push({ name: 'board', params: { id: newBoard.id } }) } catch (e) { logger.error('Failed to clone board', { error: e }) - OC.Notification.showTemporary(t('deck', 'An error occurred')) + showError(t('deck', 'An error occurred')) } } }, diff --git a/src/services/SharingApi.js b/src/services/SharingApi.js index d2121191e..225879fc0 100644 --- a/src/services/SharingApi.js +++ b/src/services/SharingApi.js @@ -4,6 +4,7 @@ */ import axios from '@nextcloud/axios' +import { showError } from '@nextcloud/dialogs' import { generateOcsUrl } from '@nextcloud/router' import logger from '../logger.js' @@ -18,7 +19,7 @@ async function createShare({ path, permissions, shareType, shareWith, publicUplo return request } catch (error) { logger.error('Error while creating share', { error }) - OC.Notification.showTemporary(t('files_sharing', 'Error creating the share'), { type: 'error' }) + showError(t('files_sharing', 'Error creating the share')) throw error } } diff --git a/src/stores/stack.js b/src/stores/stack.js index 918c86c8c..3a6bd9c70 100644 --- a/src/stores/stack.js +++ b/src/stores/stack.js @@ -3,6 +3,7 @@ * SPDX-License-Identifier: AGPL-3.0-or-later */ +import { showError } from '@nextcloud/dialogs' import { defineStore } from 'pinia' import applyOrderToArray from '../helpers/applyOrderToArray.js' import logger from '../logger.js' @@ -42,7 +43,7 @@ export const useStackStore = defineStore('stack', { } apiClient.reorderStack(stack.id, addedIndex, stack.boardId) .catch((err) => { - OC.Notification.showTemporary('Failed to change order') + showError('Failed to change order') logger.error('Failed to reorder stack', { error: err }) // restore old order