From 502cfeb9c3e3cb4e4805d1bbc325e84a7d5b1675 Mon Sep 17 00:00:00 2001
From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com>
Date: Tue, 21 Jul 2026 19:34:49 +0000
Subject: [PATCH] collab_panel: Add indentation guides and some other design
adjustements (#61397)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
This PR converts the collab panel list from a GPUI list into a uniform
list, which was a requirement for the indent guides to be displayed. I
have been wanting to add that to the channels list for a while, and
finally carved out some time. Ended up adding some more tweaks here and
there as overall improvements (e.g., using a lock icon for private
icons) and to make the indent guide fully work design-wise given we have
the chevron buttons rendering on top of them.
Here's how it looks:
Release Notes:
- N/A
---------
Co-authored-by: MrSubidubi
---
assets/icons/on_call.svg | 6 +-
crates/collab_ui/src/collab_panel.rs | 388 +++++++++++++------
crates/ui/src/components/avatar.rs | 29 +-
crates/ui/src/components/disclosure.rs | 35 +-
crates/ui/src/components/list/list_header.rs | 13 +-
5 files changed, 319 insertions(+), 152 deletions(-)
diff --git a/assets/icons/on_call.svg b/assets/icons/on_call.svg
index 66e5d71304..2e86c5d660 100644
--- a/assets/icons/on_call.svg
+++ b/assets/icons/on_call.svg
@@ -1,5 +1,5 @@
diff --git a/crates/collab_ui/src/collab_panel.rs b/crates/collab_ui/src/collab_panel.rs
index f9baa1d475..30217a1e1f 100644
--- a/crates/collab_ui/src/collab_panel.rs
+++ b/crates/collab_ui/src/collab_panel.rs
@@ -14,10 +14,10 @@ use editor::{Editor, EditorElement, EditorStyle};
use fuzzy::{StringMatch, StringMatchCandidate, match_strings};
use gpui::{
AnyElement, App, AsyncWindowContext, Bounds, ClickEvent, ClipboardItem, DismissEvent, Div,
- Empty, Entity, EventEmitter, FocusHandle, Focusable, FontStyle, KeyContext, ListOffset,
- ListState, MouseDownEvent, Pixels, Point, PromptLevel, SharedString, Subscription, Task,
- TextStyle, WeakEntity, Window, actions, anchored, canvas, deferred, div, fill, list, point,
- prelude::*, px,
+ Empty, Entity, EventEmitter, FocusHandle, Focusable, FontStyle, KeyContext, MouseButton,
+ MouseDownEvent, Pixels, Point, PromptLevel, ScrollStrategy, SharedString, Subscription, Task,
+ TextStyle, UniformListScrollHandle, WeakEntity, Window, actions, anchored, canvas, deferred,
+ div, fill, point, prelude::*, px, size, uniform_list,
};
use menu::{Cancel, Confirm, SecondaryConfirm, SelectNext, SelectPrevious};
@@ -30,13 +30,14 @@ use rpc::{
use serde::{Deserialize, Serialize};
use settings::Settings;
use smallvec::SmallVec;
-use std::{mem, sync::Arc, time::Duration};
+use std::{mem, ops::Range, sync::Arc, time::Duration};
use theme::ActiveTheme;
use theme_settings::ThemeSettings;
use ui::{
- Avatar, AvatarAvailabilityIndicator, CollabNotification, ContextMenu, CopyButton, Facepile,
- HighlightedLabel, IconButtonShape, Indicator, ListHeader, ListItem, Tab, TintColor, Tooltip,
- prelude::*, tooltip_container,
+ Avatar, AvatarAvailabilityIndicator, CollabNotification, ContextMenu, CopyButton,
+ DecoratedIcon, Disclosure, Facepile, HighlightedLabel, IconButtonShape, IconDecoration,
+ IconDecorationKind, IndentGuideColors, Indicator, ListHeader, ListItem, ScrollAxes, Scrollbars,
+ Tab, TintColor, Tooltip, WithScrollbar, prelude::*, tooltip_container,
};
use util::{ResultExt, TryFutureExt, maybe};
use workspace::{
@@ -51,6 +52,8 @@ use workspace::{
const FILTER_OCCUPIED_CHANNELS_KEY: &str = "filter_occupied_channels";
const FAVORITE_CHANNELS_KEY: &str = "favorite_channels";
+const COLLABORATION_PANEL_KEY: &str = "CollaborationPanel";
+const TOAST_DURATION: Duration = Duration::from_secs(5);
actions!(
collab_panel,
@@ -91,8 +94,10 @@ struct ChannelMoveClipboard {
channel_id: ChannelId,
}
-const COLLABORATION_PANEL_KEY: &str = "CollaborationPanel";
-const TOAST_DURATION: Duration = Duration::from_secs(5);
+struct ContactContextMenu {
+ user_id: u64,
+ via_ellipsis_button: bool,
+}
pub fn init(cx: &mut App) {
cx.observe_new(|workspace: &mut Workspace, _, _| {
@@ -257,7 +262,8 @@ pub struct CollabPanel {
pending_favorites_serialization: Task