git_ui: More git panel refinement (#24065)

- Removes flakey keybindings from buttons
- Moves git panel entries to use a standard ListItem
- Show a repo selector in the panel when more than one repo is present
- Remove temporary repo selector from title bar

Release Notes:

- N/A
This commit is contained in:
Nate Butler 2025-01-31 22:32:41 -05:00 committed by GitHub
parent 52a3013d73
commit 66e2028313
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 210 additions and 315 deletions

View file

@ -34,7 +34,8 @@ impl RepositorySelector {
};
let picker = cx.new(|cx| {
Picker::uniform_list(delegate, window, cx).max_height(Some(rems(20.).into()))
Picker::nonsearchable_uniform_list(delegate, window, cx)
.max_height(Some(rems(20.).into()))
});
let _subscriptions = if let Some(git_state) = git_state {
@ -236,18 +237,4 @@ impl PickerDelegate for RepositorySelectorDelegate {
.child(Label::new(display_name)),
)
}
fn render_footer(
&self,
_window: &mut Window,
cx: &mut Context<Picker<Self>>,
) -> Option<gpui::AnyElement> {
// TODO: Implement footer rendering if needed
Some(
div()
.text_ui_sm(cx)
.child("Temporary location for repo selector")
.into_any_element(),
)
}
}