Skip to content

Commit

Permalink
Git UI papercuts (#26316)
Browse files Browse the repository at this point in the history
Release Notes:

- Git Beta: added `git:Add` as an alias for the existing `git::Diff`
- Git Beta: Fixed a bug where the 'generate commit message' keybinding
wasn't working.
- Git Beta: Made the empty project diff state a little more helpful with
a button to push, and a button to close the item.
  • Loading branch information
mikayla-maki authored Mar 8, 2025
1 parent 450d727 commit cb543f9
Show file tree
Hide file tree
Showing 4 changed files with 460 additions and 373 deletions.
7 changes: 6 additions & 1 deletion crates/git_ui/src/commit_modal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

use crate::branch_picker::{self, BranchList};
use crate::git_panel::{commit_message_editor, GitPanel};
use git::Commit;
use git::{Commit, GenerateCommitMessage};
use panel::{panel_button, panel_editor_style, panel_filled_button};
use ui::{prelude::*, KeybindingHint, PopoverMenu, Tooltip};

Expand Down Expand Up @@ -372,6 +372,11 @@ impl Render for CommitModal {
.key_context("GitCommit")
.on_action(cx.listener(Self::dismiss))
.on_action(cx.listener(Self::commit))
.on_action(cx.listener(|this, _: &GenerateCommitMessage, _, cx| {
this.git_panel.update(cx, |panel, cx| {
panel.generate_commit_message(cx);
})
}))
.on_action(
cx.listener(|this, _: &zed_actions::git::Branch, window, cx| {
toggle_branch_picker(this, window, cx);
Expand Down
Loading

0 comments on commit cb543f9

Please sign in to comment.