Self-Review Checklist: - [x] I have reviewed my own diff for quality, security, and reliability - [x] Unsafe blocks (if any) have justifying comments - [x] The content adheres to Zed UI standards ([UX/UI](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist) and [icon](https://github.com/zed-industries/zed/blob/main/crates/icons/README.md) guidelines) - [x] Tests cover the new/changed behavior - [x] Performance impact has been considered and is acceptable ## Summary This updates the Git Panel view controls so the panel can independently model: - whether entries are shown as a list or tree - whether flat entries are sorted by path or name - whether entries are grouped by status or shown as one combined set It also keeps the Project Diff order consistent with the Git Panel, including tree ordering, status grouping, and flat name/path sorting. ## Why This Is Useful The previous sort_by_path boolean overloaded two separate ideas: sorting and grouping. That made it hard to represent the view users actually wanted, especially a single tree where tracked and untracked files are not split into separate sections. This change replaces that boolean with explicit enum settings: - git_panel.sort_by: path or name - git_panel.group_by: none or status That keeps the settings mutually exclusive, easier to extend, and closer to the UI model. ## Implementation Notes - Adds a dedicated Git Panel View Options menu using the sliders icon. - Moves view, sort, and group controls out of the overflow actions menu. - Disables sort options in tree view because tree order is folder-first rather than pure path/name sorting. - Removes the Tracked heading when grouping is disabled. - Keeps Git Panel tree expansion state when switching view options. - Recomputes Project Diff sort prefixes from tree_view, sort_by, and group_by so diff cards follow the same top-to-bottom order as the Git Panel. - Preserves Project Diff open/closed file state across view option changes by carrying fold state by repo path instead of by synthetic sort key. - Updates settings UI renderers and docs for the new enum settings. ## Testing - [x] cargo fmt --package git_ui --package settings_ui - [x] cargo check -p git_ui - [x] Verified settings UI enum dropdown rendering for Git Panel sort/group settings Closes https://github.com/zed-industries/zed/issues/53555 Closes https://github.com/zed-industries/zed/issues/56039 Closes https://github.com/zed-industries/zed/issues/45438 Release Notes: - Improved Git Panel view options and Project Diff ordering. --------- Co-authored-by: Christopher Biscardi <chris@christopherbiscardi.com>
Zed
Welcome to Zed, a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Installation
On macOS, Linux, and Windows you can download Zed directly or install Zed via your local package manager (macOS/Linux/Windows).
Other platforms are not yet available:
- Web (tracking discussion)
Developing Zed
Contributing
See CONTRIBUTING.md for ways you can contribute to Zed.
Also... we're hiring! Check out our jobs page for open roles.
Licensing
Zed source code is licensed primarily under GPL-3.0-or-later, with Apache-2.0 components where marked.
License information for third party dependencies must be correctly provided for CI to pass.
We use cargo-about to automatically comply with open source licenses. If CI is failing, check the following:
- Is it showing a
no license specifiederror for a crate you've created? If so, addpublish = falseunder[package]in your crate's Cargo.toml. - Is the error
failed to satisfy license requirementsfor a dependency? If so, first determine what license the project has and whether this system is sufficient to comply with this license's requirements. If you're unsure, ask a lawyer. Once you've verified that this system is acceptable add the license's SPDX identifier to theacceptedarray inscript/licenses/zed-licenses.toml. - Is
cargo-aboutunable to find the license for a dependency? If so, add a clarification field at the end ofscript/licenses/zed-licenses.toml, as specified in the cargo-about book.
Sponsorship
Zed is developed by Zed Industries, Inc., a for-profit company.
If you’d like to financially support the project, you can do so via GitHub Sponsors. Sponsorships go directly to Zed Industries and are used as general company revenue. There are no perks or entitlements associated with sponsorship.