History

Add drag-and-drop to move files and folders in the sidebar

Drag items in the Everything tree to re-parent them: drop on a folder to move inside it, on a file to move into that file's folder, or on empty space to move to the workspace root. A Cmd/Shift multi-selection moves as one batch. Open tabs, pinned files, and expanded-folder state follow the move, and name collisions are reported instead of overwriting. Implemented with pointer events (not HTML5 DnD) so it coexists with the existing Finder-drop-to-open window handler, which otherwise suppresses HTML5 drag events in the webview. No Rust changes -- rename_entry is the move primitive and the watcher syncs both affected directories. Selection is settled on pointer-down (mousedown model) so drag and click never act on a stale selection; inline rename and drag-move share one write path (use-move-entry). The drop target highlights as a single container block, and the ghost is a 1:1 copy of the grabbed row. See SPECs/sidebar-drag-and-drop-move-spec.md.

Joel committed 4 months ago

Commit 2355b691 parent 4011bf514 files · +1016 −132Browse files

Showing the changes to TODOS.md (1 of 14 files). Show all

Unified · Split

TODOS.md+1−0
@@ -6,6 +6,7 @@ · 5 unmodified lines
66
77 ## Done
88
9+- Sidebar drag-and-drop move: [`SPECs/sidebar-drag-and-drop-move-spec.md`](SPECs/sidebar-drag-and-drop-move-spec.md) — drag files/folders in the `Everything` tree to re-parent them (drop on folder → inside, on file → its folder, on empty space → workspace root), with multi-select batches, open-tab/pin/expanded-state rewrites, and collision reporting. Pointer-event based so it coexists with the existing Finder-drop-to-open; inline rename and drag-move now share one write path (`use-move-entry`).
910 - Compact picker recents polish — add a plain non-hovering Recents label using sidebar section styling, remove the search field, per-row opened time, Open other file row, and active file entry, then keep the row remove affordance small so the picker is a direct global recents list.
1011 - Global-scoped compact mode: [`SPECs/global-compact-mode-spec.md`](SPECs/global-compact-mode-spec.md) — compact windows are fully workspace-free (no root, no indexing, parent-dir single-file watcher), the picker shows a persisted global recent-files list, and the workspace-scoped compact setting is replaced by an "Open File in Compact Window" command.
1112 - Compact picker trigger hit area — scope the closed trigger surface hover/focus state to the pill instead of the full picker-width wrapper.