From 1358e42d26ab4db22e88740590f8711d800220ca Mon Sep 17 00:00:00 2001 From: Danilo Leal <67129314+danilo-leal@users.noreply.github.com> Date: Tue, 24 Mar 2026 19:29:32 -0300 Subject: [PATCH] title_bar: Display the org name in the user avatar trigger when not the personal (#52356) Follow up to https://github.com/zed-industries/zed/pull/52343 We'll be experimenting showing the org name in the avatar trigger button when that's not the personal one. Release Notes: - N/A --------- Co-authored-by: Marshall Bowers --- crates/title_bar/src/title_bar.rs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/crates/title_bar/src/title_bar.rs b/crates/title_bar/src/title_bar.rs index a393f71ec73e6b7acb2cdac38f50302410714749..b40029bf93365d2b1fbaa4902f26e2bcb24ee9af 100644 --- a/crates/title_bar/src/title_bar.rs +++ b/crates/title_bar/src/title_bar.rs @@ -1152,6 +1152,9 @@ impl TitleBar { let has_organization = user_store_read.current_organization().is_some(); let current_organization = user_store_read.current_organization(); + let business_organization = current_organization + .as_ref() + .filter(|organization| !organization.is_personal); let organizations: Vec<_> = user_store_read .organizations() .iter() @@ -1178,7 +1181,14 @@ impl TitleBar { } }); - ButtonLike::new("user-menu").children(avatar) + ButtonLike::new("user-menu").child( + h_flex() + .when_some(business_organization, |this, organization| { + this.gap_2() + .child(Label::new(&organization.name).size(LabelSize::Small)) + }) + .children(avatar), + ) } else { ButtonLike::new("user-menu") .child(Icon::new(IconName::ChevronDown).size(IconSize::Small))