Repository navigation
(changes): add a list/tree toggle to the Changes list (#828) - #1129
Merged
Merged
Conversation
A long list of changed files reads better grouped by folder. The Changes toolbar gains one icon button switching between the flat list, which stays the default, and a tree with collapsible folders, folders first, single-child chains compacted into one row. The choice persists under localStorage.changesListView like the editor's changesDiffMode; folds are kept per tab and survive a refresh. Subagent groups render in the same view with folders of their own. Ported from upstream c380d18 (doctly#98, Vincenzo Favara); the tree builder moved from project-git-view.js into file-panel.js since the fork has no Git tab.
… the tree view (#828) Review of the tree view found two losses. A leaf was keyed by its name, so the two records git reports at one path after `git rm --cached f` (a staged deletion and an untracked file) collapsed into one, hiding the deletion and its diff; the leaf key now carries the record's index, so the tree shows what the flat list shows. Folds were keyed by the compacted display path, so a refresh that compacted `src` into `src/nested` lost the fold made on `src`; a compacted row now stands for every folder in its chain and is collapsed when any of them is folded, and unfolding clears the whole chain.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #828
The Changes toolbar gains a persisted list/tree toggle. Tree mode sorts folders first, compacts single-child folder chains, keeps folds per tab, and applies the same presentation to subagent groups.
git rm --cached: a staged deletion and an untracked file) keeps both rows in the tree.Ports the tree view idea from doctly#98 by Vincenzo Favara (c380d18).