Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

project_panel: Add ability to hide the worktree root #25289

Open
wants to merge 26 commits into
base: main
Choose a base branch
from

Conversation

Angelk90
Copy link
Contributor

Closes #24188

Release Notes:

  • Ability to hide main root
Show root Hide root
Screenshot 2025-02-20 alle 22 35 55 Screenshot 2025-02-20 alle 22 36 11
Screenshot 2025-02-20 alle 22 56 33 Screenshot 2025-02-20 alle 22 55 53

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Feb 20, 2025
@maxdeviant maxdeviant changed the title Ability to hide the main root project: Add ability to hide the worktree root Feb 20, 2025
@maxdeviant
Copy link
Member

How does this behave when you are in a project with multiple worktrees open?

@Angelk90
Copy link
Contributor Author

Angelk90 commented Feb 20, 2025

@maxdeviant : If there is only one worktree, we respect the hide_root setting, if there is more than one, we force hide_root to false (to show the root of each worktree).

Do you think this could be a solution?

@maxdeviant maxdeviant changed the title project: Add ability to hide the worktree root project_panel: Add ability to hide the worktree root Feb 20, 2025
@mikayla-maki mikayla-maki self-assigned this Mar 14, 2025
Copy link
Member

@mikayla-maki mikayla-maki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for this contribution!

Could you add a test showing this setting functioning?

Also, I think we'll need to make sure that updating this setting will trigger a visible entry recalculation (see relevant code here:

cx.observe_global::<SettingsStore>(move |this, cx| {
)

Also, could you test how this works with the auto_fold_dirs setting?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants