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.

Restructure `ui` into just `elements` and `components` (#3023)

Marshall Bowers0697d08e5455
diff --git a/crates/ui/src/components.rs b/crates/ui/src/components.rs
index 15790fe9f80..50a680e0f71 100644
--- a/crates/ui/src/components.rs
+++ b/crates/ui/src/components.rs
@@ -1,22 +1,44 @@
mod breadcrumb;
+mod chat_panel;
+mod collab_panel;
+mod command_palette;
mod facepile;
mod follow_group;
+mod icon_button;
+mod list;
mod list_item;
mod list_section_header;
+mod palette;
mod palette_item;
+mod project_panel;
+mod status_bar;
mod tab;
+mod tab_bar;
+mod title_bar;
mod toolbar;
mod traffic_lights;
+mod workspace;
pub use breadcrumb::*;
+pub use chat_panel::*;
+pub use collab_panel::*;
+pub use command_palette::*;
pub use facepile::*;
pub use follow_group::*;
+pub use icon_button::*;
+pub use list::*;
pub use list_item::*;
pub use list_section_header::*;
+pub use palette::*;
pub use palette_item::*;
+pub use project_panel::*;
+pub use status_bar::*;
pub use tab::*;
+pub use tab_bar::*;
+pub use title_bar::*;
pub use toolbar::*;
pub use traffic_lights::*;
+pub use workspace::*;
use std::marker::PhantomData;
use std::rc::Rc;
diff --git a/crates/ui/src/templates/chat_panel.rs b/crates/ui/src/components/chat_panel.rs
similarity index 100%
rename from crates/ui/src/templates/chat_panel.rs
rename to crates/ui/src/components/chat_panel.rs
diff --git a/crates/ui/src/templates/collab_panel.rs b/crates/ui/src/components/collab_panel.rs
similarity index 100%
rename from crates/ui/src/templates/collab_panel.rs
rename to crates/ui/src/components/collab_panel.rs
diff --git a/crates/ui/src/templates/command_palette.rs b/crates/ui/src/components/command_palette.rs
similarity index 100%
rename from crates/ui/src/templates/command_palette.rs
rename to crates/ui/src/components/command_palette.rs
diff --git a/crates/ui/src/elements/icon_button.rs b/crates/ui/src/components/icon_button.rs
similarity index 100%
rename from crates/ui/src/elements/icon_button.rs
rename to crates/ui/src/components/icon_button.rs
diff --git a/crates/ui/src/modules/list.rs b/crates/ui/src/components/list.rs
similarity index 100%
rename from crates/ui/src/modules/list.rs
rename to crates/ui/src/components/list.rs
diff --git a/crates/ui/src/modules/palette.rs b/crates/ui/src/components/palette.rs
similarity index 100%
rename from crates/ui/src/modules/palette.rs
rename to crates/ui/src/components/palette.rs
diff --git a/crates/ui/src/templates/project_panel.rs b/crates/ui/src/components/project_panel.rs
similarity index 100%
rename from crates/ui/src/templates/project_panel.rs
rename to crates/ui/src/components/project_panel.rs
diff --git a/crates/ui/src/templates/status_bar.rs b/crates/ui/src/components/status_bar.rs
similarity index 100%
rename from crates/ui/src/templates/status_bar.rs
rename to crates/ui/src/components/status_bar.rs
diff --git a/crates/ui/src/templates/tab_bar.rs b/crates/ui/src/components/tab_bar.rs
similarity index 100%
rename from crates/ui/src/templates/tab_bar.rs
rename to crates/ui/src/components/tab_bar.rs
diff --git a/crates/ui/src/templates/title_bar.rs b/crates/ui/src/components/title_bar.rs
similarity index 100%
rename from crates/ui/src/templates/title_bar.rs
rename to crates/ui/src/components/title_bar.rs
diff --git a/crates/ui/src/templates/workspace.rs b/crates/ui/src/components/workspace.rs
similarity index 100%
rename from crates/ui/src/templates/workspace.rs
rename to crates/ui/src/components/workspace.rs
diff --git a/crates/ui/src/elements.rs b/crates/ui/src/elements.rs
index 3f76af0d150..0ed40e147e1 100644
--- a/crates/ui/src/elements.rs
+++ b/crates/ui/src/elements.rs
@@ -1,7 +1,6 @@
mod avatar;
mod details;
mod icon;
-mod icon_button;
mod indicator;
mod input;
mod label;
@@ -11,7 +10,6 @@ mod tool_divider;
pub use avatar::*;
pub use details::*;
pub use icon::*;
-pub use icon_button::*;
pub use indicator::*;
pub use input::*;
pub use label::*;
diff --git a/crates/ui/src/lib.rs b/crates/ui/src/lib.rs
index 0bcd9616439..ae06009238f 100644
--- a/crates/ui/src/lib.rs
+++ b/crates/ui/src/lib.rs
@@ -3,10 +3,8 @@
mod components;
mod element_ext;
mod elements;
-mod modules;
pub mod prelude;
mod static_data;
-mod templates;
mod theme;
mod tokens;
@@ -14,8 +12,6 @@ pub use crate::theme::*;
pub use components::*;
pub use element_ext::*;
pub use elements::*;
-pub use modules::*;
pub use prelude::*;
pub use static_data::*;
-pub use templates::*;
pub use tokens::*;
diff --git a/crates/ui/src/modules.rs b/crates/ui/src/modules.rs
deleted file mode 100644
index d29e31072b5..00000000000
--- a/crates/ui/src/modules.rs
+++ /dev/null
@@ -1,5 +0,0 @@
-mod list;
-mod palette;
-
-pub use list::*;
-pub use palette::*;
diff --git a/crates/ui/src/templates.rs b/crates/ui/src/templates.rs
deleted file mode 100644
index f09a8a7ea4e..00000000000
--- a/crates/ui/src/templates.rs
+++ /dev/null
@@ -1,17 +0,0 @@
-mod chat_panel;
-mod collab_panel;
-mod command_palette;
-mod project_panel;
-mod status_bar;
-mod tab_bar;
-mod title_bar;
-mod workspace;
-
-pub use chat_panel::*;
-pub use collab_panel::*;
-pub use command_palette::*;
-pub use project_panel::*;
-pub use status_bar::*;
-pub use tab_bar::*;
-pub use title_bar::*;
-pub use workspace::*;