Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Merge branch 'main' into channel-changes
Max Brunsfeld95342c8c332f
diff --cc crates/client/Cargo.tomlindex d3229170133,9e371ec8bd8..c8085f807bd--- a/crates/client/Cargo.toml+++ b/crates/client/Cargo.toml@@@ -37,11 -41,8 +41,8 @@@ tempfile = "3thiserror.workspace = truetime.workspace = truetiny_http = "0.8"+uuid.workspace = trueurl = "2.2"- serde.workspace = true- serde_derive.workspace = true- tempfile = "3"-uuid = { version = "1.1.2", features = ["v4"] }[dev-dependencies]collections = { path = "../collections", features = ["test-support"] }diff --cc crates/collab_ui/src/collab_panel.rsindex 5e90d438fc1,ab6261c568f..4a0b37b2620--- a/crates/collab_ui/src/collab_panel.rs+++ b/crates/collab_ui/src/collab_panel.rs@@@ -1774,7 -1917,8 +1917,9 @@@ impl CollabPanelconst FACEPILE_LIMIT: usize = 3;enum ChannelCall {}+ enum ChannelNote {}+ enum IconTooltip {}+ enum ChannelTooltip {}let mut is_dragged_over = false;if cx@@@ -1816,21 -1960,25 +1961,28 @@@.aligned().left(),)-- .with_child(- Label::new(- channel.name.clone(),- theme- .channel_name- .in_state(channel.unseen_message_id.is_some())- .text- .clone(),- )- .contained()- .with_style(theme.channel_name.container)- .aligned()- .left()- .flex(1., true),- )- Label::new(channel.name.clone(), collab_theme.channel_name.text.clone())++ .with_child({++ let style = collab_theme++ .channel_name++ .in_state(channel.unseen_note_version.is_some());++ Label::new(channel.name.clone(), style.text.clone())+ .contained()- .with_style(collab_theme.channel_name.container)++ .with_style(style.container)+ .aligned()+ .left()+ .with_tooltip::<ChannelTooltip>(+ channel_id as usize,+ if is_active {+ "Open channel notes"+ } else {+ "Join channel"+ },+ None,+ theme.tooltip.clone(),+ cx,+ )- .flex(1., true),- )++ .flex(1., true)++ }).with_child(MouseEventHandler::new::<ChannelCall, _>(ix, cx, move |_, cx| {let participants =@@@ -1853,56 -2001,50 +2005,80 @@@.with_children((extra_count > 0).then(|| {Label::new(format!("+{}", extra_count),- theme.extra_participant_label.text.clone(),+ collab_theme.extra_participant_label.text.clone(),).contained()- .with_style(theme.extra_participant_label.container)+ .with_style(collab_theme.extra_participant_label.container)}))+ .with_tooltip::<IconTooltip>(+ channel_id as usize,+ if is_active {+ "Open Channel Notes"+ } else {+ "Join channel"+ },+ None,+ theme.tooltip.clone(),+ cx,+ ).into_any()} else if row_hovered {- Svg::new("icons/speaker-loud.svg")- .with_color(theme.channel_hash.color)+ Svg::new("icons/file.svg")+ .with_color(collab_theme.channel_hash.color).constrained()- .with_width(theme.channel_hash.width)+ .with_width(collab_theme.channel_hash.width)+ .contained()- .with_margin_right(theme.channel_hash.container.margin.left)++ .with_margin_right(collab_theme.channel_hash.container.margin.left)+ .with_tooltip::<IconTooltip>(+ channel_id as usize,+ "Open channel notes",+ None,+ theme.tooltip.clone(),+ cx,+ ).into_any()} else {Empty::new().into_any()}}).on_click(MouseButton::Left, move |_, this, cx| {- this.join_channel_call(channel_id, cx);+ let participants =+ this.channel_store.read(cx).channel_participants(channel_id);+ if is_active || participants.is_empty() {+ this.open_channel_notes(&OpenChannelNotes { channel_id }, cx);+ } else {+ this.join_channel(channel_id, cx);+ };}),)+ .with_child(+ MouseEventHandler::new::<ChannelNote, _>(ix, cx, move |_, cx| {+ let participants =+ self.channel_store.read(cx).channel_participants(channel_id);+ if participants.is_empty() {- if channel.unseen_note_version.is_some() {- Svg::new("icons/terminal.svg")- .with_color(theme.channel_note_active_color)++ if channel.unseen_message_id.is_some() {++ Svg::new("icons/conversations.svg")++ .with_color(collab_theme.channel_note_active_color)+ .constrained()- .with_width(theme.channel_hash.width)++ .with_width(collab_theme.channel_hash.width)+ .into_any()+ } else if row_hovered {- Svg::new("icons/terminal.svg")- .with_color(theme.channel_hash.color)++ Svg::new("icons/conversations.svg")++ .with_color(collab_theme.channel_hash.color)+ .constrained()- .with_width(theme.channel_hash.width)++ .with_width(collab_theme.channel_hash.width)+ .into_any()+ } else {+ Empty::new().into_any()+ }+ } else {+ Empty::new().into_any()+ }+ })+ .on_click(MouseButton::Left, move |_, this, cx| {- this.open_channel_notes(&OpenChannelNotes { channel_id }, cx);++ this.join_channel_chat(&JoinChannelChat { channel_id }, cx);+ }),+ ).align_children_center().styleable_component().disclosable(