Skip to content

fix(app-headless-cms): wire dropConfirmation to FolderTree and block visual update until confirmed - #5560

Merged
Pavel910 merged 1 commit into
release/6.4.7from
fix/cms-folder-drop-confirmation
Aug 6, 2026
Merged

fix(app-headless-cms): wire dropConfirmation to FolderTree and block visual update until confirmed#5560
Pavel910 merged 1 commit into
release/6.4.7from
fix/cms-folder-drop-confirmation

Conversation

@Pavel910

@Pavel910 Pavel910 commented Aug 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Wire the dropConfirmation config prop from ContentEntryListConfig through to FolderTree in the HeadlessCMS sidebar — it was resolved but never passed
  • Fix the Tree component (admin-ui) to run onDrop before the visual tree update, so consumers can block or cancel the reorder
  • Wrap the folder move confirmation dialog in a promise so onDrop blocks until the user confirms or cancels, preventing the premature visual move
  • Add a test extension (extensions/folderDropConfirmation) demonstrating Browser.Folder.DropConfirmation

Changes

  • packages/app-headless-cms/.../SidebarContent.tsx — pass dropConfirmation prop to FolderTree
  • packages/admin-ui/src/Tree/useTree.ts — move presenter.handleDrop after onDrop; catch throws to skip the visual update on cancellation
  • packages/app-aco/.../List.tsx — wrap confirmation dialog in a blocking promise
  • packages/app-aco/.../useConfirmMoveFolderDialog.tsx — forward onClose callback to the dialog system
  • extensions/folderDropConfirmation/index.tsx + webiny.config.tsx — test extension registration

Test plan

  • Enable the test extension, drag a folder in CMS content entry list
  • Confirm dialog appears and folder does NOT move until "Move folder" is clicked
  • Clicking "Cancel" leaves the folder in its original position
  • Without the extension (dropConfirmation=false), folders drag-and-drop without a dialog as before
  • Website Builder navigator drag-and-drop still works (other Tree consumer)

…visual update until confirmed

- Pass dropConfirmation prop from ContentEntryListConfig to FolderTree in SidebarContent
- Move presenter.handleDrop after onDrop callback in Tree's useTree so the visual
  tree update only applies after the consumer's callback resolves
- Wrap confirmation dialog in a promise so onDrop blocks until user confirms or cancels
- Pass onClose callback through useConfirmMoveFolderDialog to detect cancellation
- Add test extension for Browser.Folder.DropConfirmation
@Pavel910 Pavel910 self-assigned this Aug 6, 2026
@Pavel910 Pavel910 added this to the 6.4.7 milestone Aug 6, 2026
@Pavel910
Pavel910 merged commit 47d553a into release/6.4.7 Aug 6, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant