From 3b02c2be0a1cd7350b00c1082ba062477511ba59 Mon Sep 17 00:00:00 2001 From: Mollusk Date: Tue, 16 Jun 2026 15:11:49 -0400 Subject: [PATCH] refactor(w7): place Recent Rooms left of the Connect card MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Lay the home screen out as three side-by-side cards — Recents | Connect | Friends — instead of stacking Recents under Connect. Three 380-460px cards need ~1280px to fit in a row, so the responsive threshold rises to 1280px; below that they stack in a column (Connect first). Screenshot-verified at 1920px: Recents left, Connect center, Friends right, top-aligned. Co-Authored-By: Claude Opus 4.8 --- src/app/mod.rs | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/src/app/mod.rs b/src/app/mod.rs index 1c93daf..199ea5f 100644 --- a/src/app/mod.rs +++ b/src/app/mod.rs @@ -2303,22 +2303,19 @@ fn view(state: &AppState) -> Element<'_, AppMessage> { // fixed-width Connect card would otherwise squeeze it until its node-ID // field and remove button clip away. `responsive` measures the available // width each layout pass and picks the orientation accordingly. - // The Recent-rooms card lives in the LEFT column under the Connect card - // (both are about getting into a room), so it has its own card and a - // growing history can't reflow the Create/Join controls. Friends stays on - // the right. Always shown (empty-state hint when no history) for parity - // with the Friends card and so the feature is discoverable. + // Three cards: Recents | Connect | Friends, side-by-side when there's room. + // Three 380–460px cards need ~1280px to fit in a row, so below that the + // `responsive` measure stacks them in a column (Connect first — the primary + // action) rather than letting the row clip. Recents always shows (empty- + // state hint when no history) for parity with the Friends card. let body = responsive(move |size| { - let cards: Element = if size.width < 900.0 { + let cards: Element = if size.width < 1280.0 { column![connect_card(state), recents_card(state), friends_panel(state)] .spacing(20) .align_x(iced::alignment::Horizontal::Center) .into() } else { - let left = column![connect_card(state), recents_card(state)] - .spacing(20) - .align_x(iced::alignment::Horizontal::Center); - row![left, friends_panel(state)] + row![recents_card(state), connect_card(state), friends_panel(state)] .spacing(20) .align_y(iced::alignment::Vertical::Top) .into()