Page tree UX: drag-and-drop reparent, “Move to…” dialog, delete choice dialog #109
Labels
No Label
area:auth
area:docs
area:export
area:ops
area:storage
area:supply-chain
auth
backend
blocked
collab
deployment
docs
effort:L
effort:M
effort:S
frontend
plugins
qa
vs-nfd
vs-nfd:blocker
No Milestone
No project
No Assignees
1 Participants
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: stwaidele/dorfteich#109
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
Moving pages between parents and the per-case delete decision complete the tree UX. Reparent must be available both directly (drag & drop) and accessibly (dialog).
Scope
apps/web/src/layout/Sidebar.tsx,apps/web/src/layout/reorder.ts): dropping onto a page reparents (append at end of the new sibling group), dropping between siblings reorders — both viaPATCH /pages/:id/position(withparentIdfor reparent). Keep the existing gate: owner + manual sort + no filter + folder view. Screen-reader announcements like the current reorder flow.apps/web/src/pages/PageActions.tsx): dialog with an indented parent picker (root option first; the page's own subtree disabled), calls the same endpoint. Available to writers in any sort mode.window.confirmwith a dialog: when the page has children (known from the cached pages list), offer “move children up” (mode=promote) vs “delete whole subtree” (mode=subtree); childless pages keep the simple confirm.page_cycleandpage_depth_exceeded(translated via the errors namespace).Acceptance criteria
Technical notes
Dependencies
Requires #106, #107, #108.
Size
~1.5 days.
Implemented in
0308bc7. Row drop zones: edges reorder within the sibling group, the middle band nests the dragged page under the row (outline cue; server cycle/depth refusals surface as a translated banner). "Move to…" in the overflow menu opens a modal parent picker (own subtree disabled, works in any sort mode). Delete decides per case: childless pages keep the plain confirm, pages with subpages get the promote-vs-subtree dialog. The children lookup deliberately reads the cached pages query — an async fetch beforewindow.confirmbroke the click→confirm→DELETE rhythm, and a stale childless read errs toward promote, never toward a silent subtree delete.