mirror of
https://github.com/zed-industries/zed.git
synced 2026-12-02 13:30:26 +01:00
cdabdc5985
## 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.