feat: rework window layout around panel stack (#36)
Rust / build (macos-latest, stable) (push) Canceled after 0s
Rust / build (ubuntu-latest, stable) (push) Canceled after 0s
Rust / build (windows-latest, stable) (push) Canceled after 0s

Reviewed-on: #36
This commit was merged in pull request #36.
This commit is contained in:
2026-11-24 03:42:54 +00:00
parent 81a46abbe5
commit a2abfb2f27
99 changed files with 6145 additions and 8891 deletions
@@ -11,11 +11,13 @@ use ui::input::{Input, InputState};
use ui::layout::panel::Panel;
use ui::theme::ActiveTheme as _;
use crate::app::AppRoot;
use crate::shared::log_dropped;
use crate::shared::panels::close_detail;
use crate::shared::progress::error_row;
use crate::workspace::Workspace;
pub struct SendPatchView {
workspace: WeakEntity<Workspace>,
workspace: WeakEntity<AppRoot>,
panel_id: SharedString,
store: Entity<RepoStore>,
subject: Entity<InputState>,
@@ -27,7 +29,7 @@ pub struct SendPatchView {
impl SendPatchView {
pub fn new(
workspace: WeakEntity<Workspace>,
workspace: WeakEntity<AppRoot>,
panel_id: SharedString,
store: Entity<RepoStore>,
_window: &mut Window,
@@ -82,11 +84,7 @@ impl SendPatchView {
cx.spawn(async move |this, cx| match task.await {
Ok(()) => {
this.update(cx, |this, cx| {
let panel_id = this.panel_id.clone();
crate::shared::log_dropped(
this.workspace
.update(cx, |workspace, cx| workspace.close_detail(&panel_id, cx)),
);
close_detail(&this.workspace, &this.panel_id, cx)
})
.log_err();
}
@@ -122,7 +120,7 @@ impl SendPatchView {
.loading(self.submitting)
.disabled(!can_submit)
.on_click(move |_, _, cx| {
crate::shared::log_dropped(weak.update(cx, |this, cx| this.submit(cx)));
log_dropped(weak.update(cx, |this, cx| this.submit(cx)));
}),
)
.into_any_element()