# project_panel: Add \`hide_root\` when only one folder in the project \(\#25289\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/387281fa5b4e6b0f3cb629d1f889c4eae9d1b0ab)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 387281fa5b4e6b0f3cb629d1f889c4eae9d1b0ab

Requested commit: 387281fa5b4e6b0f3cb629d1f889c4eae9d1b0ab

Commit: 387281fa5b4e6b0f3cb629d1f889c4eae9d1b0ab

Tree: de88a81730774fda866fffab62c77edbc163ee49

Author: Angelk90

Committer: GitHub

## Message

```
project_panel: Add `hide_root` when only one folder in the project (#25289)

Closes #24188

Todo:
- [x] Hide root when only one worktree
- [x] Basic tests
- [x] Docs
- [x] Fix `select_first` + tests
- [x] Fix auto collapse dir + tests
- [x] Fix file / dir creation + tests
- [x] Fix root rename case

| Show root | Hide root |
|--------|--------|
| <img width="272" alt="Screenshot 2025-02-20 alle 22 35 55"
src="https://github.com/user-attachments/assets/361d93c7-e1ad-4419-a5f4-be62c9632807"
/> | <img width="269" alt="Screenshot 2025-02-20 alle 22 36 11"
src="https://github.com/user-attachments/assets/62011f76-a24b-4297-9734-f5c3b9f75760"
/> |
| <img width="275" alt="Screenshot 2025-02-20 alle 22 56 33"
src="https://github.com/user-attachments/assets/77e7e6e6-3dfe-4e88-b4b0-b620cb809d2b"
/> | <img width="267" alt="Screenshot 2025-02-20 alle 22 55 53"
src="https://github.com/user-attachments/assets/fa1099c8-7ed0-45ef-a7cf-aeb54b8283b1"
/> |


Release Notes:

- Added support to hide the root entry of the Project Panel when there’s
only one folder in the project. This can be enabled by setting
`hide_root` to `true` in the `project_panel` config.

---------

Co-authored-by: Smit Barmase <heysmitbarmase@gmail.com>
```

## Parents

- [72bcb0beb7bbfaa8d1e5fcdac6f94ba5ccc3a281](https://git.cafe/gitcafe/zed/commit/72bcb0beb7bbfaa8d1e5fcdac6f94ba5ccc3a281?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/387281fa5b4e6b0f3cb629d1f889c4eae9d1b0ab?format=markdown)
