refactor: split tree shell filetree dnd

This commit is contained in:
lix-2026
2026-05-26 03:42:03 +08:00
parent 72ffa5377d
commit 0f0e37ed54
5 changed files with 582 additions and 490 deletions
+5
View File
@@ -2397,6 +2397,8 @@ mod tests {
include_str!("../../browser/tree-shell-filetree-runtime.js");
const TREE_SHELL_FILETREE_MENU_RUNTIME_JS: &str =
include_str!("../../browser/tree-shell-filetree-menu-runtime.js");
const TREE_SHELL_FILETREE_DND_RUNTIME_JS: &str =
include_str!("../../browser/tree-shell-filetree-dnd-runtime.js");
use super::{
collect_filetree_render_rows, create_command_wire, TreeCommandEnvelopeContext,
@@ -2679,11 +2681,14 @@ mod tests {
assert!(html.contains("\"resourceMeta\""));
assert!(TREE_SHELL_RUNTIME_JS.contains("tree-shell-filetree-runtime.js"));
assert!(TREE_SHELL_RUNTIME_JS.contains("tree-shell-filetree-menu-runtime.js"));
assert!(TREE_SHELL_RUNTIME_JS.contains("tree-shell-filetree-dnd-runtime.js"));
assert!(
TREE_SHELL_FILETREE_RUNTIME_JS.contains("function getFileTreeRowOwnerDocumentId(item)")
);
assert!(TREE_SHELL_FILETREE_MENU_RUNTIME_JS
.contains("function buildFileTreeMenuTarget(context"));
assert!(TREE_SHELL_FILETREE_DND_RUNTIME_JS
.contains("function createTreeShellFileTreeDndRuntime(context)"));
assert!(TREE_SHELL_RUNTIME_JS
.contains("row.dataset.ownerDocumentId = ownerDocumentId || \"\";"));
assert!(