Add an action to collapse the selected entry and its children#27703
Closed
jackTabsCode wants to merge 1 commit intozed-industries:mainfrom
Closed
Add an action to collapse the selected entry and its children#27703jackTabsCode wants to merge 1 commit intozed-industries:mainfrom
jackTabsCode wants to merge 1 commit intozed-industries:mainfrom
Conversation
Contributor
SomeoneToIgnore
left a comment
There was a problem hiding this comment.
Let's indeed unite the actions, as it's the same collapsing approach we're doing?
Also, there's project_panel_tests.rs file where we would need to add a test for the new functionality, let's do that to ensure nothing regresses in the future for this bit.
Contributor
|
Fair enough, will close this PR as stale. |
Contributor
Author
|
@SomeoneToIgnore Sorry, I haven't had the time yet to write tests for this. I should be able to at some point! |
Contributor
|
No worries and rush at all, thank you for making this PR. |
smitbarmase
added a commit
that referenced
this pull request
Feb 5, 2026
Thanks to @jackTabsCode for the original commit that I based my work off of. See: #27703 Release Notes: - Fixed clicking "Collapse All" from context menu on a project root collapsing all project roots instead of that one. - Added new `project panel: collapse selected entry and children` action that collapses the selected directory and all its subdirectories. - Added "Collapse All" option to the context menu for all directories, not just project roots. --------- Co-authored-by: Jack T <jack@jackt.space> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
rtfeldman
pushed a commit
that referenced
this pull request
Feb 5, 2026
Thanks to @jackTabsCode for the original commit that I based my work off of. See: #27703 Release Notes: - Fixed clicking "Collapse All" from context menu on a project root collapsing all project roots instead of that one. - Added new `project panel: collapse selected entry and children` action that collapses the selected directory and all its subdirectories. - Added "Collapse All" option to the context menu for all directories, not just project roots. --------- Co-authored-by: Jack T <jack@jackt.space> Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
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.
I found that I wanted to be able to collapse1 any project panel and its children. That's currently only possible on the root entry. This PR adds an action to collapse the selected entry and its children. It also replaces the implementation for
CollapseAllEntriesby checking if it's a root entry, and if so, using its old function which seems to do something special that I don't understand (feel free to let me know). Otherwise, it uses the existing code to collapse all for a given entry. If this isn't desirable, we can unify these two.Closes #21731 (I think?)
Release Notes:
Footnotes
There seems to be mixed verbiage on what "collapse" means (or maybe I'm misreading things).
CollapseSelectedEntrycollapses it, I guess, but not its children.CollapseAllEntriescollapses every entry from the root and its children. I'm not completely sold on the name for this action.. something more fitting could be in order. ↩