Add branch to git panel (#24485)

This PR adds the branch selector to the git panel and fixes a few bugs
in the repository selector.

Release Notes:

- N/A

---------

Co-authored-by: ConradIrwin <conrad.irwin@gmail.com>
Co-authored-by: Conrad <conrad@zed.dev>
This commit is contained in:
Mikayla Maki
2025-02-08 03:27:58 +00:00
committed by GitHub
co-authored by ConradIrwin Conrad
parent d9183c7669
commit ca4e8043d4
18 changed files with 309 additions and 312 deletions
+16
View File
@@ -35,6 +35,22 @@ impl Tooltip {
}
}
pub fn for_action_title(
title: impl Into<SharedString>,
action: &dyn Action,
) -> impl Fn(&mut Window, &mut App) -> AnyView {
let title = title.into();
let action = action.boxed_clone();
move |window, cx| {
cx.new(|_| Self {
title: title.clone(),
meta: None,
key_binding: KeyBinding::for_action(action.as_ref(), window),
})
.into()
}
}
pub fn for_action(
title: impl Into<SharedString>,
action: &dyn Action,