From 8fa2301ab734f2019156212740c20ef75a3dcc2d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ahmet=20Kaan=20G=C3=BCm=C3=BC=C5=9F?= Date: Sat, 28 Nov 2026 22:33:26 +0300 Subject: [PATCH] =?UTF-8?q?=F0=9F=92=84=20style:=20drop=20the=20top=20voic?= =?UTF-8?q?e=20strip=20(In=20call=20margin=20carries=20it);=20screen=20pil?= =?UTF-8?q?l=20draws=20share=20audio;=20right=20margin=20widened=20to=20si?= =?UTF-8?q?ze::MARGIN=20280?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- crates/client/design/tokens.toml | 1 + crates/client/src/gui/camera_view.rs | 89 +++++++--------------------- crates/client/src/gui/chat.rs | 5 +- crates/client/src/gui/sidebar.rs | 11 ++++ 4 files changed, 38 insertions(+), 68 deletions(-) diff --git a/crates/client/design/tokens.toml b/crates/client/design/tokens.toml index 937c247..0153778 100644 --- a/crates/client/design/tokens.toml +++ b/crates/client/design/tokens.toml @@ -69,6 +69,7 @@ rail = 56 avatar_lg = 64 thumb = 120 sidebar = 230 +margin = 280 index = 200 talk = 300 popover = 300 diff --git a/crates/client/src/gui/camera_view.rs b/crates/client/src/gui/camera_view.rs index 342879b..70f6280 100644 --- a/crates/client/src/gui/camera_view.rs +++ b/crates/client/src/gui/camera_view.rs @@ -214,7 +214,7 @@ impl Yumush { ) -> Option { let shown = match self.chat.stage { Stage::Strip => true, - Stage::Grid => self.chat.viewer.is_some() || self.stage_sources().is_empty(), + Stage::Grid => self.chat.viewer.is_some(), Stage::Hidden => false, }; if !shown || !self.in_stage_chat() { @@ -239,24 +239,7 @@ impl Yumush { .children((more > 0).then(|| more_tile(entity, more, palette).into_any_element())) }); - Some( - div() - .flex() - .flex_col() - .flex_shrink_0() - .child(self.voices(palette)) - .children(strip), - ) - } - - fn voices(&self, palette: Palette) -> Div { - let ids = self - .chat - .voice_community() - .map(|community_id| self.chat.voice_ids(community_id).to_vec()) - .unwrap_or_default(); - let others: Vec = ids.into_iter().filter(|id| !self.is_me(*id)).collect(); - self.voices_of(&others, palette) + strip } fn slots(&self, ids: &[Id]) -> (Vec, usize) { @@ -318,21 +301,6 @@ impl Yumush { .collect() } - fn voices_of(&self, ids: &[Id], palette: Palette) -> Div { - div() - .flex() - .flex_col() - .flex_shrink_0() - .gap(px(space::MD)) - .px(px(space::XL)) - .py(px(space::XL)) - .children( - self.voice_captions(ids, palette) - .into_iter() - .map(|caption| caption.w_full()), - ) - } - pub(super) fn voice_band(&self, palette: Palette) -> Div { let ids = self .chat @@ -367,18 +335,11 @@ impl Yumush { { return None; } - let community_id = self.chat.voice_community()?; + self.chat.voice_community()?; let sources = self.stage_sources(); if sources.is_empty() { return None; } - let quiet: Vec = self - .chat - .voice_ids(community_id) - .iter() - .filter(|id| !sources.contains(&(**id, Kind::Camera)) && !self.is_me(**id)) - .copied() - .collect(); let columns = ((sources.len() as f32).sqrt().ceil() as usize).max(1); let rows = sources.len().div_ceil(columns); let mut cells = sources @@ -386,31 +347,25 @@ impl Yumush { .map(|source| grid_cell(entity, self, palette, source)); Some( - div() - .flex_1() - .min_h_0() - .flex() - .flex_col() - .child( - div() - .flex_1() - .min_h_0() - .px(px(space::XL)) - .pt(px(space::XL)) - .flex() - .flex_col() - .gap(px(space::LG)) - .children((0..rows).map(|_| { - div().flex_1().min_h_0().flex().gap(px(space::LG)).children( - (0..columns).map(|_| { - cells - .next() - .unwrap_or_else(|| div().flex_1().into_any_element()) - }), - ) - })), - ) - .child(self.voices_of(&quiet, palette)), + div().flex_1().min_h_0().flex().flex_col().child( + div() + .flex_1() + .min_h_0() + .px(px(space::XL)) + .pt(px(space::XL)) + .flex() + .flex_col() + .gap(px(space::LG)) + .children((0..rows).map(|_| { + div().flex_1().min_h_0().flex().gap(px(space::LG)).children( + (0..columns).map(|_| { + cells + .next() + .unwrap_or_else(|| div().flex_1().into_any_element()) + }), + ) + })), + ), ) } } diff --git a/crates/client/src/gui/chat.rs b/crates/client/src/gui/chat.rs index f34db31..68d5951 100644 --- a/crates/client/src/gui/chat.rs +++ b/crates/client/src/gui/chat.rs @@ -3005,6 +3005,9 @@ fn members_column( user.id, kind, yumush.is_watching(user.id, kind), + (kind == Kind::Screen) + .then(|| chat.waves.share(user.id)) + .flatten(), palette, ) }) @@ -3186,7 +3189,7 @@ fn members_column( Some( div() .id("members_column") - .w(px(size::SIDEBAR)) + .w(px(size::MARGIN)) .flex_none() .h_full() .overflow_y_scroll() diff --git a/crates/client/src/gui/sidebar.rs b/crates/client/src/gui/sidebar.rs index bf09e7d..94b949a 100644 --- a/crates/client/src/gui/sidebar.rs +++ b/crates/client/src/gui/sidebar.rs @@ -992,6 +992,7 @@ pub(super) fn watch_pill( user_id: Id, kind: Kind, watching: bool, + audio: Option<&std::collections::VecDeque>, palette: Palette, ) -> impl IntoElement { let icon = match kind { @@ -1017,6 +1018,16 @@ pub(super) fn watch_pill( .items_center() .gap(px(space::XS)) .rounded(px(radius::SM)) + .children(audio.map(|audio| { + div() + .w(px(size::CONTROL)) + .h(px(space::LG)) + .child(super::parts::voice_line( + Some(audio), + super::parts::Voice::Live(palette.tokens.person(user_id)), + palette.tokens, + )) + })) .child(super::parts::small_icon(icon).text_color(if watching { palette.text } else {