fix(layout): calendar island next to the rail like other pages
- no extra island gap when the sidebar is hidden (calendar, call without sidebar) - layout_guard checks the first island starts at the rail edge - calendar now dot without negative offset, tentative bar without hard outline Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -1004,6 +1004,21 @@ mod frames {
1004
1004
_ => {}
1005
1005
}
1006
1006
let mut found = violations(&tags, window, &expected);
1007
let bounds_of = |wanted: &str| {
1008
tags.iter()
1009
.find(|(path, _)| *path == wanted)
1010
.map(|(_, bounds)| *bounds)
1011
};
1012
let first_island = bounds_of("shell/islands/sidebar").or_else(|| bounds_of(CALENDAR));
1013
if let (Some(rail), Some(island)) = (bounds_of("shell/islands/rail"), first_island) {
1014
let gap = f32::from(island.origin.x) - f32::from(rail.origin.x + rail.size.width);
1015
if gap.abs() > 0.5 {
1016
found.push((
1017
"shell/islands/rail:gap".to_owned(),
1018
format!("first island starts {gap} px after the rail, expected 0"),
1019
));
1020
}
1021
}
1007
1022
if status_menu {
1008
1023
let menu = tags
1009
1024
.iter()
@@ -1004,6 +1004,21 @@ mod frames {1004
_ => {}1004
_ => {}1005
}1005
}1006
let mut found = violations(&tags, window, &expected);1006
let mut found = violations(&tags, window, &expected);1007
let bounds_of = |wanted: &str| {1008
tags.iter()1009
.find(|(path, _)| *path == wanted)1010
.map(|(_, bounds)| *bounds)1011
};1012
let first_island = bounds_of("shell/islands/sidebar").or_else(|| bounds_of(CALENDAR));1013
if let (Some(rail), Some(island)) = (bounds_of("shell/islands/rail"), first_island) {1014
let gap = f32::from(island.origin.x) - f32::from(rail.origin.x + rail.size.width);1015
if gap.abs() > 0.5 {1016
found.push((1017
"shell/islands/rail:gap".to_owned(),1018
format!("first island starts {gap} px after the rail, expected 0"),1019
));1020
}1021
}1007
if status_menu {1022
if status_menu {1008
let menu = tags1023
let menu = tags1009
.iter()1024
.iter()@@ -466,7 +466,7 @@ impl CalendarView {
466
466
div()
467
467
.absolute()
468
468
.top(px(now_top - NOW_DOT_SIZE / 2.))
469
.left(px(-NOW_DOT_SIZE / 2.))
469
.left_0()
470
470
.size(px(NOW_DOT_SIZE))
471
471
.rounded_full()
472
472
.bg(theme::accent()),
@@ -534,9 +534,11 @@ fn status_bar(look: EventLook) -> Option<Div> {
534
534
match look {
535
535
EventLook::Busy => Some(bar.bg(theme::accent())),
536
536
EventLook::Tentative => Some(
537
bar.border_1()
538
.border_color(theme::accent())
539
.bg(pattern_slash(theme::accent(), HATCH_STRIPE, HATCH_GAP)),
537
bar.bg(theme::accent().opacity(BUSY_FILL_OPACITY)).child(
538
div()
539
.size_full()
540
.bg(pattern_slash(theme::accent(), HATCH_STRIPE, HATCH_GAP)),
541
),
540
542
),
541
543
EventLook::Free => None,
542
544
}
@@ -466,7 +466,7 @@ impl CalendarView {466
div()466
div()467
.absolute()467
.absolute()468
.top(px(now_top - NOW_DOT_SIZE / 2.))468
.top(px(now_top - NOW_DOT_SIZE / 2.))469
.left(px(-NOW_DOT_SIZE / 2.))469
.left_0()470
.size(px(NOW_DOT_SIZE))470
.size(px(NOW_DOT_SIZE))471
.rounded_full()471
.rounded_full()472
.bg(theme::accent()),472
.bg(theme::accent()),@@ -534,9 +534,11 @@ fn status_bar(look: EventLook) -> Option<Div> {534
match look {534
match look {535
EventLook::Busy => Some(bar.bg(theme::accent())),535
EventLook::Busy => Some(bar.bg(theme::accent())),536
EventLook::Tentative => Some(536
EventLook::Tentative => Some(537
bar.border_1()537
bar.bg(theme::accent().opacity(BUSY_FILL_OPACITY)).child(538
.border_color(theme::accent())538
div()539
.bg(pattern_slash(theme::accent(), HATCH_STRIPE, HATCH_GAP)),539
.size_full()540
.bg(pattern_slash(theme::accent(), HATCH_STRIPE, HATCH_GAP)),541
),540
),542
),541
EventLook::Free => None,543
EventLook::Free => None,542
}544
}@@ -886,7 +886,7 @@ impl AppShell {
886
886
.flex_1()
887
887
.min_h_0()
888
888
.w_full()
889
.gap(px(ISLAND_GAP))
889
.when(show_sidebar, |islands| islands.gap(px(ISLAND_GAP)))
890
890
.pr(px(ISLAND_GAP))
891
891
.pb(px(ISLAND_GAP))
892
892
.child(
@@ -997,8 +997,8 @@ impl Render for AppShell {
997
997
&& sidebar_hidden_in_call(window_width, panel_open));
998
998
let island_width = window_width
999
999
- RAIL_WIDTH
1000
- if show_sidebar { SIDEBAR_WIDTH } else { 0. }
1001
- 2. * ISLAND_GAP;
1000
- if show_sidebar { SIDEBAR_WIDTH + ISLAND_GAP } else { 0. }
1001
- ISLAND_GAP;
1002
1002
let call_view = render_call_view(&self.state, state, chat_panel, call_fullscreen, island_width)
1003
1003
.filter(|_| state.viewing_call())
1004
1004
.or_else(|| render_call_end(&self.state, state));
@@ -886,7 +886,7 @@ impl AppShell {886
.flex_1()886
.flex_1()887
.min_h_0()887
.min_h_0()888
.w_full()888
.w_full()889
.gap(px(ISLAND_GAP))889
.when(show_sidebar, |islands| islands.gap(px(ISLAND_GAP)))890
.pr(px(ISLAND_GAP))890
.pr(px(ISLAND_GAP))891
.pb(px(ISLAND_GAP))891
.pb(px(ISLAND_GAP))892
.child(892
.child(@@ -997,8 +997,8 @@ impl Render for AppShell {997
&& sidebar_hidden_in_call(window_width, panel_open));997
&& sidebar_hidden_in_call(window_width, panel_open));998
let island_width = window_width998
let island_width = window_width999
- RAIL_WIDTH999
- RAIL_WIDTH1000
- if show_sidebar { SIDEBAR_WIDTH } else { 0. }1000
- if show_sidebar { SIDEBAR_WIDTH + ISLAND_GAP } else { 0. }1001
- 2. * ISLAND_GAP;1001
- ISLAND_GAP;1002
let call_view = render_call_view(&self.state, state, chat_panel, call_fullscreen, island_width)1002
let call_view = render_call_view(&self.state, state, chat_panel, call_fullscreen, island_width)1003
.filter(|_| state.viewing_call())1003
.filter(|_| state.viewing_call())1004
.or_else(|| render_call_end(&self.state, state));1004
.or_else(|| render_call_end(&self.state, state));