Remove left side collaborator list

Julia and Max Brunsfeld created

Co-Authored-By: Max Brunsfeld <max@zed.dev>

Change summary

crates/collab_ui/src/collab_titlebar_item.rs | 72 ----------------------
crates/theme/src/theme.rs                    |  2 
styles/src/styleTree/workspace.ts            | 21 ------
3 files changed, 95 deletions(-)

Detailed changes

crates/collab_ui/src/collab_titlebar_item.rs 🔗

@@ -91,7 +91,6 @@ impl View for CollabTitlebarItem {
         );
 
         if let Some(room) = ActiveCall::global(cx).read(cx).room().cloned() {
-            left_container.add_child(self.render_toggle_collaborator_list_button(&theme, cx));
             left_container.add_child(self.render_current_user(&workspace, &theme, &user, cx));
             left_container.add_children(self.render_collaborators(&workspace, &theme, room, cx));
             left_container.add_child(self.render_toggle_contacts_button(&theme, cx));
@@ -218,77 +217,6 @@ impl CollabTitlebarItem {
         }
     }
 
-    fn render_toggle_collaborator_list_button(
-        &self,
-        theme: &Theme,
-        cx: &mut RenderContext<Self>,
-    ) -> ElementBox {
-        let titlebar = &theme.workspace.titlebar;
-
-        Stack::new()
-            .with_child(
-                MouseEventHandler::<ToggleCollaboratorList>::new(0, cx, |state, cx| {
-                    let collaborator_count_style = titlebar.collaborator_count.clone();
-                    let style = titlebar
-                        .toggle_collaborators_button
-                        .style_for(state, self.collaborator_list_popover.is_some());
-
-                    let active_call = ActiveCall::global(cx);
-                    let collaborator_count = active_call
-                        .read(cx)
-                        .room()
-                        .map_or(0, |room| room.read(cx).remote_participants().len())
-                        + 1;
-
-                    Flex::row()
-                        .with_child(
-                            Svg::new("icons/user_group_12.svg")
-                                .with_color(style.color)
-                                .constrained()
-                                .with_width(style.width)
-                                .aligned()
-                                .contained()
-                                .with_style(style.container)
-                                .boxed(),
-                        )
-                        .with_child(
-                            Label::new(
-                                format!("{collaborator_count}"),
-                                collaborator_count_style.text,
-                            )
-                            .contained()
-                            .with_style(collaborator_count_style.container)
-                            .aligned()
-                            .boxed(),
-                        )
-                        .contained()
-                        .with_style(style.container)
-                        .boxed()
-                })
-                .with_cursor_style(CursorStyle::PointingHand)
-                .on_click(MouseButton::Left, move |_, cx| {
-                    cx.dispatch_action(ToggleCollaboratorList);
-                })
-                .aligned()
-                .boxed(),
-            )
-            .with_children(self.collaborator_list_popover.as_ref().map(|popover| {
-                Overlay::new(
-                    ChildView::new(popover, cx)
-                        .contained()
-                        .with_margin_top(titlebar.height)
-                        .with_margin_left(titlebar.toggle_collaborators_button.default.width)
-                        .with_margin_right(-titlebar.toggle_collaborators_button.default.width)
-                        .boxed(),
-                )
-                .with_fit_mode(OverlayFitMode::SwitchAnchor)
-                .with_anchor_corner(AnchorCorner::BottomLeft)
-                .with_z_index(999)
-                .boxed()
-            }))
-            .boxed()
-    }
-
     pub fn toggle_collaborator_list_popover(
         &mut self,
         _: &ToggleCollaboratorList,

crates/theme/src/theme.rs 🔗

@@ -84,8 +84,6 @@ pub struct Titlebar {
     pub outdated_warning: ContainedText,
     pub share_button: Interactive<ContainedText>,
     pub call_control: Interactive<IconButton>,
-    pub toggle_collaborators_button: Interactive<Icon>,
-    pub collaborator_count: ContainedText,
     pub toggle_contacts_button: Interactive<IconButton>,
     pub toggle_contacts_badge: ContainerStyle,
 }

styles/src/styleTree/workspace.ts 🔗

@@ -157,27 +157,6 @@ export default function workspace(colorScheme: ColorScheme) {
           color: foreground(layer, "variant", "hovered"),
         },
       },
-      toggleCollaboratorsButton: {
-        margin: { left: 6 },
-        cornerRadius: 6,
-        color: foreground(layer, "variant"),
-        width: 12,
-        active: {
-          background: background(layer, "variant", "active"),
-          color: foreground(layer, "variant", "active"),
-        },
-        hover: {
-          background: background(layer, "variant", "hovered"),
-          color: foreground(layer, "variant", "hovered"),
-        },
-      },
-      collaboratorCount: {
-        ...text(layer, "mono", { size: "sm" }),
-        margin: {
-          left: 4,
-          right: 6,
-        },
-      },
       toggleContactsButton: {
         margin: { left: 6 },
         cornerRadius: 6,