Files
zed/crates/git_ui
Xin Zhao cdabdc5985 git_ui: Replace commit editor layout booleans with CommitEditorLayout (#67692)
## Summary

Currently, the commit editor in the Git panel has three mutually
exclusive states, but they are represented by two separate booleans,
which can lead to an invalid state. This PR replaces
`commit_editor_expanded` and `commit_editor_collapsed` with a dedicated
`CommitEditorLayout` enum. Existing behavior is preserved, while also
fixing a bug where running `git::ToggleFillCommitEditor` while the
commit editor is collapsed leaves the Git panel blank.

## Testing

Updated the affected tests and added a new assertion in
`test_toggle_commit_editor_collapsed` covering the fix. Before/after
screen recordings are attached below:

| Before | After |
| :--: | :--: |
|
[before.webm](https://github.com/user-attachments/assets/b26ba459-37e0-4010-ab7e-65244214a0ce)
|
[after.webm](https://github.com/user-attachments/assets/aafae902-fd03-4e7a-83cd-934805ccd788)
|


## Self-review

- [x] I've reviewed my diff for quality, security, reliability, and
performance.
- [x] UI changes follow the
[checklist](https://zed.dev/docs/development/ui-checklist).
- [x] Tests cover the new or changed behavior.

Release Notes:

- Fixed `git::ToggleFillCommitEditor` leaving the Git panel blank when
invoked while the commit editor is collapsed.
2026-12-01 13:08:07 +00:00
..
2026-11-24 12:02:03 +00:00