git_ui: Fix item heights in git panel (#25833)

- Fixes items slightly overlapping in the git panel
- Fixes commit button in the project diff not opening modal

Release Notes:

- N/A

---------

Co-authored-by: Nate Butler <iamnbutler@gmail.com>
Co-authored-by: Cole Miller <m@cole-miller.net>
This commit is contained in:
Max Brunsfeld 2025-03-03 06:39:24 -08:00 committed by GitHub
parent e0060b92cc
commit b34c0fd71b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 166 additions and 92 deletions

View file

@ -10,7 +10,8 @@ use editor::{
use feature_flags::FeatureFlagViewExt;
use futures::StreamExt;
use git::{
status::FileStatus, Commit, StageAll, StageAndNext, ToggleStaged, UnstageAll, UnstageAndNext,
status::FileStatus, ShowCommitEditor, StageAll, StageAndNext, ToggleStaged, UnstageAll,
UnstageAndNext,
};
use gpui::{
actions, Action, AnyElement, AnyView, App, AppContext as _, AsyncWindowContext, Entity,
@ -952,11 +953,11 @@ impl Render for ProjectDiffToolbar {
.disabled(!button_states.commit)
.tooltip(Tooltip::for_action_title_in(
"Commit",
&Commit,
&ShowCommitEditor,
&focus_handle,
))
.on_click(cx.listener(|this, _, window, cx| {
this.dispatch_action(&Commit, window, cx);
this.dispatch_action(&ShowCommitEditor, window, cx);
})),
),
)