feat(web): media folder tree joins the shell's tree column #110
No reviewers
Labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Cloonar/deckle!110
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "lab/20260718-0231"
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?
The file manager's folder tree was not in the same container as the page tree — it could not share the column's width and could not collapse. This unifies them, per the design agreed in the issue.
What changed
TreeColumnis now the shell's generic tree column: it keeps width (one shareddeckle:tree-widthkey, 180–560px), the resizer and its a11y surface; the pane content comes from the active module.deckle:media-tree-widthand the copy-pasted resize logic are gone.ModuleDef.tree: boolean→nav?: { label, pane }. page/view/list/edit share onePAGE_TREE_NAVentry (aPageTreeNavrenderingTreePanefrom ctx — the tree data stays shell-owned); media declaresMediaFolderNav. Nonav= no column, rail toggle hidden.deckle:tree-collapsedflag now govern whichever tree is active — the media tree collapses for the first time.providerregistry entry: the shell wraps it around the tree column and the module body. MediaProvider carries the state the two sibling subtrees share (folders/listing resources, menus, dialogs, drag-in-flight) — created per module activation, so transient state still resets on a switch.deckle:media-tree-expanded, root open on first load, and the URL folder's ancestors auto-expand so a deep link is never hidden.Verification
tsc --noEmit, full vitest suite (871 passing, incl. 5 new media-tree tests),go test ./...all green.harness serve(playwright-core): shared width across module switch and reload, rail collapse/restore on the media tree, chevron expand/collapse, deep-link ancestor expansion, tree-row context menu opening a body dialog, and a grid-tile drag onto a tree folder row — now crossing sibling render subtrees — moving the file on disk.Not included (deliberately): drag-hover auto-expand of collapsed folders during a file drag (the page tree has this; can follow up if wanted).
Closes #109
🤖 Generated with Claude Code
Landed. Verdict: PASS → merged.
Verification signal relied on: the PR's Forgejo Actions run
ci / build-and-test(success, 5m49s). Not re-run locally — nothing in the branch changed after it.What was checked
mainwith no conflicts (no resolution commit, so the green CI covers exactly the merged tree).Closes #109.deckle:media-tree-width,.media-tree-column*and the duplicated resize logic are gone from the branch.role=separator+aria-valuenow/min/max; its label is now parameterised per module (Resize ${resizeLabel}).createMediaStateruns once perMediaProvidermount, and the provider swaps viaDynamicon module change — transient state does reset on a switch, as claimed. The nav<Show keyed>is keyed on the registry entry, so page-tree modules keep one column mounted across a switch.displayFolder()and writes through a functional setter, so it cannot loop.Noted, not blocking: issue #109 item 6 specified moving the grid↔tree drag state to file-level signals; the PR uses a context provider instead. That is the better call — file-level signals would outlive a module switch, which the provider's mount/unmount avoids — and the PR body states the substitution openly.
Caveat, for the record: a second independent diff-review pass was still running when the merge was authorised, so it did not contribute to this verdict.