Remove the nested Pane from the assistant
Since we don't want tabs, I think it would be better to render the toolbar for ourselves directly and handle switching between conversations. Co-Authored-By: Julia Risley <julia@zed.dev>
This commit is contained in:
parent
7a051a0dcb
commit
23bc11f8b3
9 changed files with 189 additions and 177 deletions
|
@ -249,7 +249,7 @@ impl Dock {
|
|||
}
|
||||
}
|
||||
|
||||
pub fn add_panel<T: Panel>(&mut self, panel: ViewHandle<T>, cx: &mut ViewContext<Self>) {
|
||||
pub(crate) fn add_panel<T: Panel>(&mut self, panel: ViewHandle<T>, cx: &mut ViewContext<Self>) {
|
||||
let subscriptions = [
|
||||
cx.observe(&panel, |_, _, cx| cx.notify()),
|
||||
cx.subscribe(&panel, |this, panel, event, cx| {
|
||||
|
@ -603,6 +603,7 @@ pub mod test {
|
|||
use super::*;
|
||||
use gpui::{ViewContext, WindowContext};
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum TestPanelEvent {
|
||||
PositionChanged,
|
||||
Activated,
|
||||
|
|
|
@ -859,7 +859,10 @@ impl Workspace {
|
|||
&self.right_dock
|
||||
}
|
||||
|
||||
pub fn add_panel<T: Panel>(&mut self, panel: ViewHandle<T>, cx: &mut ViewContext<Self>) {
|
||||
pub fn add_panel<T: Panel>(&mut self, panel: ViewHandle<T>, cx: &mut ViewContext<Self>)
|
||||
where
|
||||
T::Event: std::fmt::Debug,
|
||||
{
|
||||
let dock = match panel.position(cx) {
|
||||
DockPosition::Left => &self.left_dock,
|
||||
DockPosition::Bottom => &self.bottom_dock,
|
||||
|
@ -1700,6 +1703,11 @@ impl Workspace {
|
|||
cx.notify();
|
||||
}
|
||||
|
||||
#[cfg(any(test, feature = "test-support"))]
|
||||
pub fn zoomed_view(&self, cx: &AppContext) -> Option<AnyViewHandle> {
|
||||
self.zoomed.and_then(|view| view.upgrade(cx))
|
||||
}
|
||||
|
||||
fn dismiss_zoomed_items_to_reveal(
|
||||
&mut self,
|
||||
dock_to_reveal: Option<DockPosition>,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue