[UX] Fix file tree sidebar: only expand current file path, O(1) tree-building #3
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/1-file-tree-expand-perf"
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?
Fixes
Expand bug: Folders now start collapsed except those on the path to
currentTreePath. UsesparentPathprop andselfPathcomputed to determine if a folder is ancestor of current file.Perf: Replaced O(n)
Array.find()with O(1)Maplookup in tree-building. IntegratedmergeChildIfOnlyOneDirinto the main pass. Changedv-showtov-iffor collapsed children.Test Results