refactor(dnd): remove drag-and-drop reorder for stories and tasks
- Remove reorderStoriesAction, reorderTasksAction, reorderSprintStoriesAction - Delete REST route app/api/stories/[id]/tasks/reorder/route.ts - Remove DnD from backlog story-panel and task-panel (flat list) - Remove reorder-within-sprint branch from sprint-board-client handleDragEnd - Switch SortableSprintRow to plain SprintRow using useDraggable (membership drag kept) - Remove all DnD from task-list (status toggle + edit kept) - Remove story-order/task-order/sprint-story-order/sprint-task-order mutation types and store handlers - Remove related tests for deleted reorder route; fix sprint store tests
This commit is contained in:
parent
b816cbe710
commit
f68d985c2c
16 changed files with 52 additions and 816 deletions
|
|
@ -557,10 +557,6 @@ export const useProductWorkspaceStore = create<ProductWorkspaceStore>()(
|
|||
case 'pbi-order':
|
||||
// store-call passes new order via separate set, snapshot is prevPbiIds
|
||||
break
|
||||
case 'story-order':
|
||||
break
|
||||
case 'task-order':
|
||||
break
|
||||
case 'entity-patch':
|
||||
break
|
||||
}
|
||||
|
|
@ -577,12 +573,6 @@ export const useProductWorkspaceStore = create<ProductWorkspaceStore>()(
|
|||
case 'pbi-order':
|
||||
s.relations.pbiIds = [...mutation.prevPbiIds]
|
||||
break
|
||||
case 'story-order':
|
||||
s.relations.storyIdsByPbi[mutation.pbiId] = [...mutation.prevStoryIds]
|
||||
break
|
||||
case 'task-order':
|
||||
s.relations.taskIdsByStory[mutation.storyId] = [...mutation.prevTaskIds]
|
||||
break
|
||||
case 'entity-patch': {
|
||||
const { entity, id, prev } = mutation
|
||||
if (prev) {
|
||||
|
|
|
|||
|
|
@ -109,18 +109,6 @@ export interface OptimisticPbiOrderMutation {
|
|||
prevPbiIds: string[]
|
||||
}
|
||||
|
||||
export interface OptimisticStoryOrderMutation {
|
||||
kind: 'story-order'
|
||||
pbiId: string
|
||||
prevStoryIds: string[]
|
||||
}
|
||||
|
||||
export interface OptimisticTaskOrderMutation {
|
||||
kind: 'task-order'
|
||||
storyId: string
|
||||
prevTaskIds: string[]
|
||||
}
|
||||
|
||||
export interface OptimisticEntityPatchMutation {
|
||||
kind: 'entity-patch'
|
||||
entity: 'pbi' | 'story' | 'task'
|
||||
|
|
@ -130,8 +118,6 @@ export interface OptimisticEntityPatchMutation {
|
|||
|
||||
export type OptimisticMutation =
|
||||
| OptimisticPbiOrderMutation
|
||||
| OptimisticStoryOrderMutation
|
||||
| OptimisticTaskOrderMutation
|
||||
| OptimisticEntityPatchMutation
|
||||
|
||||
export interface PendingOptimisticMutation {
|
||||
|
|
|
|||
|
|
@ -519,12 +519,6 @@ export const useSprintWorkspaceStore = create<SprintWorkspaceStore>()(
|
|||
const { mutation } = pending
|
||||
set((s) => {
|
||||
switch (mutation.kind) {
|
||||
case 'sprint-story-order':
|
||||
s.relations.storyIdsBySprint[mutation.sprintId] = [...mutation.prevStoryIds]
|
||||
break
|
||||
case 'sprint-task-order':
|
||||
s.relations.taskIdsByStory[mutation.storyId] = [...mutation.prevTaskIds]
|
||||
break
|
||||
case 'entity-patch': {
|
||||
const { entity, id, prev } = mutation
|
||||
if (prev) {
|
||||
|
|
|
|||
|
|
@ -122,18 +122,6 @@ export type ResyncReason =
|
|||
|
||||
export type RealtimeStatus = 'connecting' | 'open' | 'disconnected'
|
||||
|
||||
export interface OptimisticSprintStoryOrderMutation {
|
||||
kind: 'sprint-story-order'
|
||||
sprintId: string
|
||||
prevStoryIds: string[]
|
||||
}
|
||||
|
||||
export interface OptimisticSprintTaskOrderMutation {
|
||||
kind: 'sprint-task-order'
|
||||
storyId: string
|
||||
prevTaskIds: string[]
|
||||
}
|
||||
|
||||
export interface OptimisticEntityPatchMutation {
|
||||
kind: 'entity-patch'
|
||||
entity: 'sprint' | 'story' | 'task'
|
||||
|
|
@ -147,8 +135,6 @@ export interface OptimisticEntityPatchMutation {
|
|||
}
|
||||
|
||||
export type OptimisticMutation =
|
||||
| OptimisticSprintStoryOrderMutation
|
||||
| OptimisticSprintTaskOrderMutation
|
||||
| OptimisticEntityPatchMutation
|
||||
|
||||
export interface PendingOptimisticMutation {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue