Make repo and branch popovers extend up from their trigger buttons (#26950)
Previously, when clicking on the branch, the popover would obscure the button you just clicked, which was awkward. Release Notes: - Improved the placement of the repo and branch picker popovers in the git panel. - Added a 'SelectRepo' action that opens the repository selector in a modal.
This commit is contained in:
parent
a05066cd83
commit
2b2b9c1624
8 changed files with 59 additions and 49 deletions
|
@ -2,6 +2,7 @@ use std::any::Any;
|
|||
|
||||
use ::settings::Settings;
|
||||
use command_palette_hooks::CommandPaletteFilter;
|
||||
use commit_modal::CommitModal;
|
||||
use git::{
|
||||
repository::{Branch, Upstream, UpstreamTracking, UpstreamTrackingStatus},
|
||||
status::{FileStatus, StatusCode, UnmergedStatus, UnmergedStatusCode},
|
||||
|
@ -28,12 +29,14 @@ actions!(git, [ResetOnboarding]);
|
|||
|
||||
pub fn init(cx: &mut App) {
|
||||
GitPanelSettings::register(cx);
|
||||
branch_picker::init(cx);
|
||||
cx.observe_new(ProjectDiff::register).detach();
|
||||
commit_modal::init(cx);
|
||||
git_panel::init(cx);
|
||||
|
||||
cx.observe_new(|workspace: &mut Workspace, _, cx| {
|
||||
ProjectDiff::register(workspace, cx);
|
||||
CommitModal::register(workspace);
|
||||
git_panel::register(workspace);
|
||||
repository_selector::register(workspace);
|
||||
branch_picker::register(workspace);
|
||||
|
||||
let project = workspace.project().read(cx);
|
||||
if project.is_read_only(cx) {
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue