Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Merge workspace and collab panel demos

Nate Butler23a8d8fba46f
diff --git a/crates/storybook/src/collab_panel.rs b/crates/storybook/src/collab_panel.rs
index 9e510313816..60b0131528a 100644
--- a/crates/storybook/src/collab_panel.rs
+++ b/crates/storybook/src/collab_panel.rs
@@ -23,7 +23,7 @@ impl<V: 'static> CollabPanelElement<V> {
// Panel
div()
- .full()
+ .w_96()
.flex()
.flex_col()
.font("Zed Sans Extended")
diff --git a/crates/storybook/src/workspace.rs b/crates/storybook/src/workspace.rs
index c2416976104..6f7a9b712c6 100644
--- a/crates/storybook/src/workspace.rs
+++ b/crates/storybook/src/workspace.rs
@@ -1,4 +1,4 @@
-use crate::theme::theme;
+use crate::{collab_panel::collab_panel, theme::theme};
use gpui2::{
elements::{div, svg},
geometry::pixels,
@@ -247,31 +247,38 @@ impl StatusBar {
)
// === Diagnostics === //
.child(
- div().flex().items_center().gap_2()
- .child(
- div()
- .h_full()
- .flex()
- .items_center()
- .justify_center()
- .gap_0p5()
- .px_1()
- .text_color(theme.lowest.variant.default.foreground)
- .hover()
- .fill(theme.lowest.base.hovered.background)
- .active()
- .fill(theme.lowest.base.pressed.background)
- .child(
- svg()
- .path("icons/error.svg")
- .w_4()
- .h_4()
- .fill(theme.lowest.negative.default.foreground),
- )
- .child(div().text_sm().child("2")),
- )
- .child(div().text_sm().text_color(theme.lowest.variant.default.foreground).child("Something is wrong")),
-
+ div()
+ .flex()
+ .items_center()
+ .gap_2()
+ .child(
+ div()
+ .h_full()
+ .flex()
+ .items_center()
+ .justify_center()
+ .gap_0p5()
+ .px_1()
+ .text_color(theme.lowest.variant.default.foreground)
+ .hover()
+ .fill(theme.lowest.base.hovered.background)
+ .active()
+ .fill(theme.lowest.base.pressed.background)
+ .child(
+ svg()
+ .path("icons/error.svg")
+ .w_4()
+ .h_4()
+ .fill(theme.lowest.negative.default.foreground),
+ )
+ .child(div().text_sm().child("2")),
+ )
+ .child(
+ div()
+ .text_sm()
+ .text_color(theme.lowest.variant.default.foreground)
+ .child("Something is wrong"),
+ ),
)
}
@@ -340,11 +347,12 @@ impl WorkspaceElement {
.w_full()
.flex()
.flex_col()
+ .gap_y_0()
.font("Zed Sans Extended")
.text_color(theme.lowest.base.default.foreground)
.fill(theme.middle.base.default.background)
.child(titlebar())
- .child(div().child("panes"))
+ .child(collab_panel())
.child(statusbar())
}
}