fix(ui): every scrolling list and panel shows a scrollbar
- overflow_y_scroll -> overflow_y_scrollbar in 25 views (transcript, activity, chat list, settings, dialogs, pickers, ...) - Scrollable::track_scroll keeps the caller handle (scroll_to and edge dividers keep working) - settings body tag moves to a wrapper so the layout guard measures the viewport - drop two unused imports in feed.rs Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::assets::IconName;
2
3
use gpui_kit::component::{h_flex, v_flex};
3
4
use gpui_kit::prelude::FluentBuilder as _;
@@ -147,7 +148,7 @@ impl Render for AgentsPanel {
147
148
.flex_1()
148
149
.min_h_0()
149
150
.pb(px(12.))
150
.overflow_y_scroll()
151
.overflow_y_scrollbar()
151
152
.track_scroll(&self.scroll)
152
153
.when(!running.is_empty(), |list| {
153
154
list.child(section_header("Running"))
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::assets::IconName;2
use gpui_kit::assets::IconName;2
use gpui_kit::component::{h_flex, v_flex};3
use gpui_kit::component::{h_flex, v_flex};3
use gpui_kit::prelude::FluentBuilder as _;4
use gpui_kit::prelude::FluentBuilder as _;@@ -147,7 +148,7 @@ impl Render for AgentsPanel {147
.flex_1()148
.flex_1()148
.min_h_0()149
.min_h_0()149
.pb(px(12.))150
.pb(px(12.))150
.overflow_y_scroll()151
.overflow_y_scrollbar()151
.track_scroll(&self.scroll)152
.track_scroll(&self.scroll)152
.when(!running.is_empty(), |list| {153
.when(!running.is_empty(), |list| {153
list.child(section_header("Running"))154
list.child(section_header("Running"))@@ -1,4 +1,5 @@
1
1
use app_ui_kit::settings_controls::PAGE_PADDING;
2
use gpui_kit::component::scroll::ScrollableElement as _;
2
3
use gpui_kit::assets::IconName;
3
4
use gpui_kit::component::{h_flex, v_flex};
4
5
use gpui_kit::*;
@@ -216,16 +217,15 @@ impl Render for SettingsDialog {
216
217
} else {
217
218
metrics.padding
218
219
};
219
let body = div()
220
let scroll_area = div()
220
221
.id(SharedString::from(format!(
221
222
"settings-body-{}",
222
223
label(self.section)
223
224
)))
224
.debug_selector(|| "settings/main/body".into())
225
225
.w_full()
226
226
.flex_1()
227
227
.min_h_0()
228
.overflow_y_scroll()
228
.overflow_y_scrollbar()
229
229
.track_scroll(&self.body_scroll)
230
230
.px(px(body_inset.max(0.)))
231
231
.pb(px(metrics.padding))
@@ -236,6 +236,14 @@ impl Render for SettingsDialog {
236
236
.max_w(px(CONTENT_MAX_WIDTH))
237
237
.child(self.content(cx)),
238
238
);
239
let body = div()
240
.debug_selector(|| "settings/main/body".into())
241
.w_full()
242
.flex_1()
243
.min_h_0()
244
.flex()
245
.flex_col()
246
.child(scroll_area);
239
247
div()
240
248
.id("settings-layer")
241
249
.absolute()
@@ -1,4 +1,5 @@1
use app_ui_kit::settings_controls::PAGE_PADDING;1
use app_ui_kit::settings_controls::PAGE_PADDING;2
use gpui_kit::component::scroll::ScrollableElement as _;2
use gpui_kit::assets::IconName;3
use gpui_kit::assets::IconName;3
use gpui_kit::component::{h_flex, v_flex};4
use gpui_kit::component::{h_flex, v_flex};4
use gpui_kit::*;5
use gpui_kit::*;@@ -216,16 +217,15 @@ impl Render for SettingsDialog {216
} else {217
} else {217
metrics.padding218
metrics.padding218
};219
};219
let body = div()220
let scroll_area = div()220
.id(SharedString::from(format!(221
.id(SharedString::from(format!(221
"settings-body-{}",222
"settings-body-{}",222
label(self.section)223
label(self.section)223
)))224
)))224
.debug_selector(|| "settings/main/body".into())225
.w_full()225
.w_full()226
.flex_1()226
.flex_1()227
.min_h_0()227
.min_h_0()228
.overflow_y_scroll()228
.overflow_y_scrollbar()229
.track_scroll(&self.body_scroll)229
.track_scroll(&self.body_scroll)230
.px(px(body_inset.max(0.)))230
.px(px(body_inset.max(0.)))231
.pb(px(metrics.padding))231
.pb(px(metrics.padding))@@ -236,6 +236,14 @@ impl Render for SettingsDialog {236
.max_w(px(CONTENT_MAX_WIDTH))236
.max_w(px(CONTENT_MAX_WIDTH))237
.child(self.content(cx)),237
.child(self.content(cx)),238
);238
);239
let body = div()240
.debug_selector(|| "settings/main/body".into())241
.w_full()242
.flex_1()243
.min_h_0()244
.flex()245
.flex_col()246
.child(scroll_area);239
div()247
div()240
.id("settings-layer")248
.id("settings-layer")241
.absolute()249
.absolute()@@ -1,6 +1,7 @@
1
1
use std::collections::{BTreeSet, HashMap};
2
2
use std::time::Duration;
3
3
4
use gpui_kit::component::scroll::ScrollableElement as _;
4
5
use gpui_kit::assets::IconName;
5
6
use gpui_kit::component::{
6
7
ActiveTheme as _, h_flex,
@@ -854,7 +855,7 @@ impl McpView {
854
855
.id("mcp-picker-list")
855
856
.w_full()
856
857
.max_h(px(PICKER_ROW_HEIGHT * PICKER_MAX_ROWS as f32))
857
.overflow_y_scroll()
858
.overflow_y_scrollbar()
858
859
.children(rows),
859
860
)
860
861
}
@@ -1,6 +1,7 @@1
use std::collections::{BTreeSet, HashMap};1
use std::collections::{BTreeSet, HashMap};2
use std::time::Duration;2
use std::time::Duration;3
3
4
use gpui_kit::component::scroll::ScrollableElement as _;4
use gpui_kit::assets::IconName;5
use gpui_kit::assets::IconName;5
use gpui_kit::component::{6
use gpui_kit::component::{6
ActiveTheme as _, h_flex,7
ActiveTheme as _, h_flex,@@ -854,7 +855,7 @@ impl McpView {854
.id("mcp-picker-list")855
.id("mcp-picker-list")855
.w_full()856
.w_full()856
.max_h(px(PICKER_ROW_HEIGHT * PICKER_MAX_ROWS as f32))857
.max_h(px(PICKER_ROW_HEIGHT * PICKER_MAX_ROWS as f32))857
.overflow_y_scroll()858
.overflow_y_scrollbar()858
.children(rows),859
.children(rows),859
)860
)860
}861
}@@ -3,6 +3,7 @@ use std::ops::Range;
3
3
use std::rc::Rc;
4
4
5
5
use chrono::{DateTime, Local, NaiveDate, Offset, TimeZone, Utc};
6
use gpui_kit::component::scroll::ScrollableElement as _;
6
7
use gpui_kit::assets::IconName;
7
8
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};
8
9
use gpui_kit::prelude::FluentBuilder as _;
@@ -818,7 +819,7 @@ impl Render for ActivityPanel {
818
819
.flex_1()
819
820
.min_h_0()
820
821
.pb(px(12.))
821
.overflow_y_scroll()
822
.overflow_y_scrollbar()
822
823
.track_scroll(&self.scroll)
823
824
.children(rows);
824
825
v_flex()
@@ -3,6 +3,7 @@ use std::ops::Range;3
use std::rc::Rc;3
use std::rc::Rc;4
4
5
use chrono::{DateTime, Local, NaiveDate, Offset, TimeZone, Utc};5
use chrono::{DateTime, Local, NaiveDate, Offset, TimeZone, Utc};6
use gpui_kit::component::scroll::ScrollableElement as _;6
use gpui_kit::assets::IconName;7
use gpui_kit::assets::IconName;7
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};8
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};8
use gpui_kit::prelude::FluentBuilder as _;9
use gpui_kit::prelude::FluentBuilder as _;@@ -818,7 +819,7 @@ impl Render for ActivityPanel {818
.flex_1()819
.flex_1()819
.min_h_0()820
.min_h_0()820
.pb(px(12.))821
.pb(px(12.))821
.overflow_y_scroll()822
.overflow_y_scrollbar()822
.track_scroll(&self.scroll)823
.track_scroll(&self.scroll)823
.children(rows);824
.children(rows);824
v_flex()825
v_flex()@@ -1,5 +1,6 @@
1
1
use std::time::Instant;
2
2
3
use gpui_kit::component::scroll::ScrollableElement as _;
3
4
use gpui_kit::assets::IconName;
4
5
use gpui_kit::component::{
5
6
button::{Button, ButtonVariants as _},
@@ -291,7 +292,7 @@ fn overflow_tile(
291
292
.id("call-hidden-list")
292
293
.w(px(HIDDEN_LIST_WIDTH))
293
294
.max_h(px(HIDDEN_LIST_HEIGHT))
294
.overflow_y_scroll()
295
.overflow_y_scrollbar()
295
296
.gap(px(2.))
296
297
.children(people.iter().map(|(mri, name, user_id)| {
297
298
let app_for_click = app.clone();
@@ -1,5 +1,6 @@1
use std::time::Instant;1
use std::time::Instant;2
2
3
use gpui_kit::component::scroll::ScrollableElement as _;3
use gpui_kit::assets::IconName;4
use gpui_kit::assets::IconName;4
use gpui_kit::component::{5
use gpui_kit::component::{5
button::{Button, ButtonVariants as _},6
button::{Button, ButtonVariants as _},@@ -291,7 +292,7 @@ fn overflow_tile(291
.id("call-hidden-list")292
.id("call-hidden-list")292
.w(px(HIDDEN_LIST_WIDTH))293
.w(px(HIDDEN_LIST_WIDTH))293
.max_h(px(HIDDEN_LIST_HEIGHT))294
.max_h(px(HIDDEN_LIST_HEIGHT))294
.overflow_y_scroll()295
.overflow_y_scrollbar()295
.gap(px(2.))296
.gap(px(2.))296
.children(people.iter().map(|(mri, name, user_id)| {297
.children(people.iter().map(|(mri, name, user_id)| {297
let app_for_click = app.clone();298
let app_for_click = app.clone();@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::assets::IconName;
2
3
use gpui_kit::component::{
3
4
Sizable as _,
@@ -441,7 +442,7 @@ pub fn people_panel(app: &Entity<AppState>, state: &AppState, call: &ActiveCall)
441
442
.flex_1()
442
443
.min_h_0()
443
444
.w_full()
444
.overflow_y_scroll()
445
.overflow_y_scrollbar()
445
446
.track_scroll(&call.people_scroll)
446
447
.pb(px(12.))
447
448
.children(model.can_admit().then(|| lobby_section(app, state, §ions)).flatten())
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::assets::IconName;2
use gpui_kit::assets::IconName;2
use gpui_kit::component::{3
use gpui_kit::component::{3
Sizable as _,4
Sizable as _,@@ -441,7 +442,7 @@ pub fn people_panel(app: &Entity<AppState>, state: &AppState, call: &ActiveCall)441
.flex_1()442
.flex_1()442
.min_h_0()443
.min_h_0()443
.w_full()444
.w_full()444
.overflow_y_scroll()445
.overflow_y_scrollbar()445
.track_scroll(&call.people_scroll)446
.track_scroll(&call.people_scroll)446
.pb(px(12.))447
.pb(px(12.))447
.children(model.can_admit().then(|| lobby_section(app, state, §ions)).flatten())448
.children(model.can_admit().then(|| lobby_section(app, state, §ions)).flatten())@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::assets::IconName;
2
3
use gpui_kit::component::{
3
4
h_flex,
@@ -156,7 +157,7 @@ impl Render for TranscriptPanel {
156
157
.id("call-transcript-list")
157
158
.flex_1()
158
159
.min_h_0()
159
.overflow_y_scroll()
160
.overflow_y_scrollbar()
160
161
.track_scroll(&self.scroll)
161
162
.on_scroll_wheel(cx.listener(|this, _, _, cx| {
162
163
this.scrolled = true;
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::assets::IconName;2
use gpui_kit::assets::IconName;2
use gpui_kit::component::{3
use gpui_kit::component::{3
h_flex,4
h_flex,@@ -156,7 +157,7 @@ impl Render for TranscriptPanel {156
.id("call-transcript-list")157
.id("call-transcript-list")157
.flex_1()158
.flex_1()158
.min_h_0()159
.min_h_0()159
.overflow_y_scroll()160
.overflow_y_scrollbar()160
.track_scroll(&self.scroll)161
.track_scroll(&self.scroll)161
.on_scroll_wheel(cx.listener(|this, _, _, cx| {162
.on_scroll_wheel(cx.listener(|this, _, _, cx| {162
this.scrolled = true;163
this.scrolled = true;@@ -1,5 +1,6 @@
1
1
use chatsvc::{Reply, ResponseType};
2
2
use chrono::{Local, Offset, Utc};
3
use gpui_kit::component::scroll::ScrollableElement as _;
3
4
use gpui_kit::assets::IconName;
4
5
use gpui_kit::component::Sizable as _;
5
6
use gpui_kit::component::button::{Button, ButtonVariants as _};
@@ -509,7 +510,7 @@ pub fn calls_body(
509
510
.id("calls-scroll")
510
511
.flex_1()
511
512
.min_h_0()
512
.overflow_y_scroll()
513
.overflow_y_scrollbar()
513
514
.track_scroll(scroll)
514
515
.child(list),
515
516
scroll,
@@ -1,5 +1,6 @@1
use chatsvc::{Reply, ResponseType};1
use chatsvc::{Reply, ResponseType};2
use chrono::{Local, Offset, Utc};2
use chrono::{Local, Offset, Utc};3
use gpui_kit::component::scroll::ScrollableElement as _;3
use gpui_kit::assets::IconName;4
use gpui_kit::assets::IconName;4
use gpui_kit::component::Sizable as _;5
use gpui_kit::component::Sizable as _;5
use gpui_kit::component::button::{Button, ButtonVariants as _};6
use gpui_kit::component::button::{Button, ButtonVariants as _};@@ -509,7 +510,7 @@ pub fn calls_body(509
.id("calls-scroll")510
.id("calls-scroll")510
.flex_1()511
.flex_1()511
.min_h_0()512
.min_h_0()512
.overflow_y_scroll()513
.overflow_y_scrollbar()513
.track_scroll(scroll)514
.track_scroll(scroll)514
.child(list),515
.child(list),515
scroll,516
scroll,@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::assets::IconName;
2
3
use gpui_kit::component::button::{Button, ButtonVariants as _};
3
4
use gpui_kit::component::dialog::DialogFooter;
@@ -72,7 +73,7 @@ fn members_panel(
72
73
v_flex()
73
74
.id("chat-members-list")
74
75
.max_h(px(LIST_MAX_HEIGHT))
75
.overflow_y_scroll()
76
.overflow_y_scrollbar()
76
77
.py(px(4.))
77
78
.child(
78
79
div()
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::assets::IconName;2
use gpui_kit::assets::IconName;2
use gpui_kit::component::button::{Button, ButtonVariants as _};3
use gpui_kit::component::button::{Button, ButtonVariants as _};3
use gpui_kit::component::dialog::DialogFooter;4
use gpui_kit::component::dialog::DialogFooter;@@ -72,7 +73,7 @@ fn members_panel(72
v_flex()73
v_flex()73
.id("chat-members-list")74
.id("chat-members-list")74
.max_h(px(LIST_MAX_HEIGHT))75
.max_h(px(LIST_MAX_HEIGHT))75
.overflow_y_scroll()76
.overflow_y_scrollbar()76
.py(px(4.))77
.py(px(4.))77
.child(78
.child(78
div()79
div()@@ -1,6 +1,7 @@
1
1
use std::ops::Range;
2
2
use std::rc::Rc;
3
3
4
use gpui_kit::component::scroll::ScrollableElement as _;
4
5
use gpui_kit::component::{h_flex, v_flex};
5
6
use gpui_kit::prelude::FluentBuilder as _;
6
7
use gpui_kit::*;
@@ -285,7 +286,7 @@ pub fn render(
285
286
v_flex()
286
287
.id("slash-rows")
287
288
.max_h(px(ROW_HEIGHT * visible))
288
.overflow_y_scroll()
289
.overflow_y_scrollbar()
289
290
.track_scroll(&popup.scroll)
290
291
.children(rows),
291
292
)
@@ -1,6 +1,7 @@1
use std::ops::Range;1
use std::ops::Range;2
use std::rc::Rc;2
use std::rc::Rc;3
3
4
use gpui_kit::component::scroll::ScrollableElement as _;4
use gpui_kit::component::{h_flex, v_flex};5
use gpui_kit::component::{h_flex, v_flex};5
use gpui_kit::prelude::FluentBuilder as _;6
use gpui_kit::prelude::FluentBuilder as _;6
use gpui_kit::*;7
use gpui_kit::*;@@ -285,7 +286,7 @@ pub fn render(285
v_flex()286
v_flex()286
.id("slash-rows")287
.id("slash-rows")287
.max_h(px(ROW_HEIGHT * visible))288
.max_h(px(ROW_HEIGHT * visible))288
.overflow_y_scroll()289
.overflow_y_scrollbar()289
.track_scroll(&popup.scroll)290
.track_scroll(&popup.scroll)290
.children(rows),291
.children(rows),291
)292
)@@ -1,4 +1,5 @@
1
1
use chrono::{Local, Offset, Utc};
2
use gpui_kit::component::scroll::ScrollableElement as _;
2
3
use gpui_kit::assets::IconName;
3
4
use gpui_kit::component::button::{Button, ButtonVariants as _};
4
5
use gpui_kit::component::{h_flex, v_flex};
@@ -309,7 +310,7 @@ impl ConversationView {
309
310
.id("channel-details-body")
310
311
.flex_1()
311
312
.min_h_0()
312
.overflow_y_scroll()
313
.overflow_y_scrollbar()
313
314
.track_scroll(&self.channel_details_scroll)
314
315
.child(body),
315
316
&self.channel_details_scroll,
@@ -1,4 +1,5 @@1
use chrono::{Local, Offset, Utc};1
use chrono::{Local, Offset, Utc};2
use gpui_kit::component::scroll::ScrollableElement as _;2
use gpui_kit::assets::IconName;3
use gpui_kit::assets::IconName;3
use gpui_kit::component::button::{Button, ButtonVariants as _};4
use gpui_kit::component::button::{Button, ButtonVariants as _};4
use gpui_kit::component::{h_flex, v_flex};5
use gpui_kit::component::{h_flex, v_flex};@@ -309,7 +310,7 @@ impl ConversationView {309
.id("channel-details-body")310
.id("channel-details-body")310
.flex_1()311
.flex_1()311
.min_h_0()312
.min_h_0()312
.overflow_y_scroll()313
.overflow_y_scrollbar()313
.track_scroll(&self.channel_details_scroll)314
.track_scroll(&self.channel_details_scroll)314
.child(body),315
.child(body),315
&self.channel_details_scroll,316
&self.channel_details_scroll,@@ -1,7 +1,6 @@
1
1
use std::cell::RefCell;
2
2
use std::rc::Rc;
3
3
4
use gpui_kit::assets::IconName;
5
4
use gpui_kit::component::{
6
5
button::{Button, ButtonVariants as _},
7
6
h_flex,
@@ -19,7 +18,6 @@ use crate::theme;
19
18
use crate::views::channel_tabs::ChannelPane;
20
19
use crate::views::composer::{Composer, ComposerEvent, ReplyPreview};
21
20
use crate::views::post_card::{PostAction, post_in_channel_card};
22
use crate::views::widgets::icon;
23
21
24
22
const REPLY_PLACEHOLDER: &str = "Reply in thread";
25
23
const SUBJECT_PLACEHOLDER: &str = "Add a subject";
@@ -1,7 +1,6 @@1
use std::cell::RefCell;1
use std::cell::RefCell;2
use std::rc::Rc;2
use std::rc::Rc;3
3
4
use gpui_kit::assets::IconName;5
use gpui_kit::component::{4
use gpui_kit::component::{6
button::{Button, ButtonVariants as _},5
button::{Button, ButtonVariants as _},7
h_flex,6
h_flex,@@ -19,7 +18,6 @@ use crate::theme;19
use crate::views::channel_tabs::ChannelPane;18
use crate::views::channel_tabs::ChannelPane;20
use crate::views::composer::{Composer, ComposerEvent, ReplyPreview};19
use crate::views::composer::{Composer, ComposerEvent, ReplyPreview};21
use crate::views::post_card::{PostAction, post_in_channel_card};20
use crate::views::post_card::{PostAction, post_in_channel_card};22
use crate::views::widgets::icon;23
21
24
const REPLY_PLACEHOLDER: &str = "Reply in thread";22
const REPLY_PLACEHOLDER: &str = "Reply in thread";25
const SUBJECT_PLACEHOLDER: &str = "Add a subject";23
const SUBJECT_PLACEHOLDER: &str = "Add a subject";@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::component::{h_flex, v_flex};
2
3
use gpui_kit::*;
3
4
@@ -93,7 +94,7 @@ fn panel(dialog: &TaskDialogState, cx: &App) -> Div {
93
94
.w_full()
94
95
.flex_1()
95
96
.min_h(px(0.))
96
.overflow_y_scroll()
97
.overflow_y_scrollbar()
97
98
.child(card_view(&dialog.card, &dialog.scope, cx)),
98
99
)
99
100
}
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::component::{h_flex, v_flex};2
use gpui_kit::component::{h_flex, v_flex};2
use gpui_kit::*;3
use gpui_kit::*;3
4
@@ -93,7 +94,7 @@ fn panel(dialog: &TaskDialogState, cx: &App) -> Div {93
.w_full()94
.w_full()94
.flex_1()95
.flex_1()95
.min_h(px(0.))96
.min_h(px(0.))96
.overflow_y_scroll()97
.overflow_y_scrollbar()97
.child(card_view(&dialog.card, &dialog.scope, cx)),98
.child(card_view(&dialog.card, &dialog.scope, cx)),98
)99
)99
}100
}@@ -1,5 +1,6 @@
1
1
use std::ops::Range;
2
2
3
use gpui_kit::component::scroll::ScrollableElement as _;
3
4
use gpui_kit::component::{h_flex, v_flex};
4
5
use gpui_kit::prelude::FluentBuilder as _;
5
6
use gpui_kit::*;
@@ -189,7 +190,7 @@ pub fn render(
189
190
v_flex()
190
191
.id("emoji-rows")
191
192
.max_h(px(ROW_HEIGHT * visible))
192
.overflow_y_scroll()
193
.overflow_y_scrollbar()
193
194
.track_scroll(&popup.scroll)
194
195
.children(rows),
195
196
)
@@ -1,5 +1,6 @@1
use std::ops::Range;1
use std::ops::Range;2
2
3
use gpui_kit::component::scroll::ScrollableElement as _;3
use gpui_kit::component::{h_flex, v_flex};4
use gpui_kit::component::{h_flex, v_flex};4
use gpui_kit::prelude::FluentBuilder as _;5
use gpui_kit::prelude::FluentBuilder as _;5
use gpui_kit::*;6
use gpui_kit::*;@@ -189,7 +190,7 @@ pub fn render(189
v_flex()190
v_flex()190
.id("emoji-rows")191
.id("emoji-rows")191
.max_h(px(ROW_HEIGHT * visible))192
.max_h(px(ROW_HEIGHT * visible))192
.overflow_y_scroll()193
.overflow_y_scrollbar()193
.track_scroll(&popup.scroll)194
.track_scroll(&popup.scroll)194
.children(rows),195
.children(rows),195
)196
)@@ -1,6 +1,7 @@
1
1
use std::time::Duration;
2
2
3
3
use chrono::{Local, NaiveDate, Offset};
4
use gpui_kit::component::scroll::ScrollableElement as _;
4
5
use gpui_kit::assets::IconName;
5
6
use gpui_kit::component::button::{Button, ButtonVariants as _};
6
7
use gpui_kit::component::input::{Escape, Input, InputEvent, InputState};
@@ -457,7 +458,7 @@ impl FindPanel {
457
458
.flex_1()
458
459
.min_h_0()
459
460
.w_full()
460
.overflow_y_scroll()
461
.overflow_y_scrollbar()
461
462
.track_scroll(&self.scroll)
462
463
.child(list)
463
464
}
@@ -1,6 +1,7 @@1
use std::time::Duration;1
use std::time::Duration;2
2
3
use chrono::{Local, NaiveDate, Offset};3
use chrono::{Local, NaiveDate, Offset};4
use gpui_kit::component::scroll::ScrollableElement as _;4
use gpui_kit::assets::IconName;5
use gpui_kit::assets::IconName;5
use gpui_kit::component::button::{Button, ButtonVariants as _};6
use gpui_kit::component::button::{Button, ButtonVariants as _};6
use gpui_kit::component::input::{Escape, Input, InputEvent, InputState};7
use gpui_kit::component::input::{Escape, Input, InputEvent, InputState};@@ -457,7 +458,7 @@ impl FindPanel {457
.flex_1()458
.flex_1()458
.min_h_0()459
.min_h_0()459
.w_full()460
.w_full()460
.overflow_y_scroll()461
.overflow_y_scrollbar()461
.track_scroll(&self.scroll)462
.track_scroll(&self.scroll)462
.child(list)463
.child(list)463
}464
}@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::assets::IconName;
2
3
use gpui_kit::component::{
3
4
button::{Button, ButtonVariants as _},
@@ -308,7 +309,7 @@ impl ForwardDialog {
308
309
}
309
310
}
310
311
311
fn list(&self, cx: &mut Context<Self>) -> Stateful<Div> {
312
fn list(&self, cx: &mut Context<Self>) -> impl IntoElement + use<> {
312
313
let directory = &self.app.read(cx).directory;
313
314
let selected_id = self
314
315
.target
@@ -370,7 +371,7 @@ impl ForwardDialog {
370
371
.id("forward-targets")
371
372
.w_full()
372
373
.max_h(px(ROW_HEIGHT * MAX_RESULTS as f32))
373
.overflow_y_scroll()
374
.overflow_y_scrollbar()
374
375
.children(rows)
375
376
}
376
377
@@ -400,14 +401,14 @@ impl ForwardDialog {
400
401
}
401
402
}
402
403
403
fn preview(&self) -> Stateful<Div> {
404
fn preview(&self) -> impl IntoElement + use<> {
404
405
let lines = preview_lines(self.source.messages.len());
405
406
v_flex()
406
407
.id("forward-preview")
407
408
.debug_selector(|| FORWARD_PREVIEW_TAG.into())
408
409
.w_full()
409
410
.max_h(px(PREVIEW_MAX_HEIGHT))
410
.overflow_y_scroll()
411
.overflow_y_scrollbar()
411
412
.gap(px(PREVIEW_GAP))
412
413
.children(
413
414
self.source
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::assets::IconName;2
use gpui_kit::assets::IconName;2
use gpui_kit::component::{3
use gpui_kit::component::{3
button::{Button, ButtonVariants as _},4
button::{Button, ButtonVariants as _},@@ -308,7 +309,7 @@ impl ForwardDialog {308
}309
}309
}310
}310
311
311
fn list(&self, cx: &mut Context<Self>) -> Stateful<Div> {312
fn list(&self, cx: &mut Context<Self>) -> impl IntoElement + use<> {312
let directory = &self.app.read(cx).directory;313
let directory = &self.app.read(cx).directory;313
let selected_id = self314
let selected_id = self314
.target315
.target@@ -370,7 +371,7 @@ impl ForwardDialog {370
.id("forward-targets")371
.id("forward-targets")371
.w_full()372
.w_full()372
.max_h(px(ROW_HEIGHT * MAX_RESULTS as f32))373
.max_h(px(ROW_HEIGHT * MAX_RESULTS as f32))373
.overflow_y_scroll()374
.overflow_y_scrollbar()374
.children(rows)375
.children(rows)375
}376
}376
377
@@ -400,14 +401,14 @@ impl ForwardDialog {400
}401
}401
}402
}402
403
403
fn preview(&self) -> Stateful<Div> {404
fn preview(&self) -> impl IntoElement + use<> {404
let lines = preview_lines(self.source.messages.len());405
let lines = preview_lines(self.source.messages.len());405
v_flex()406
v_flex()406
.id("forward-preview")407
.id("forward-preview")407
.debug_selector(|| FORWARD_PREVIEW_TAG.into())408
.debug_selector(|| FORWARD_PREVIEW_TAG.into())408
.w_full()409
.w_full()409
.max_h(px(PREVIEW_MAX_HEIGHT))410
.max_h(px(PREVIEW_MAX_HEIGHT))410
.overflow_y_scroll()411
.overflow_y_scrollbar()411
.gap(px(PREVIEW_GAP))412
.gap(px(PREVIEW_GAP))412
.children(413
.children(413
self.source414
self.source@@ -1,6 +1,7 @@
1
1
use std::rc::Rc;
2
2
use std::time::Duration;
3
3
4
use gpui_kit::component::scroll::ScrollableElement as _;
4
5
use gpui_kit::base::PopoverState;
5
6
use gpui_kit::component::{
6
7
h_flex,
@@ -616,7 +617,7 @@ impl FunPicker {
616
617
div()
617
618
.id("fun-picker-gifs")
618
619
.size_full()
619
.overflow_y_scroll()
620
.overflow_y_scrollbar()
620
621
.child(body)
621
622
.into_any_element()
622
623
}
@@ -1,6 +1,7 @@1
use std::rc::Rc;1
use std::rc::Rc;2
use std::time::Duration;2
use std::time::Duration;3
3
4
use gpui_kit::component::scroll::ScrollableElement as _;4
use gpui_kit::base::PopoverState;5
use gpui_kit::base::PopoverState;5
use gpui_kit::component::{6
use gpui_kit::component::{6
h_flex,7
h_flex,@@ -616,7 +617,7 @@ impl FunPicker {616
div()617
div()617
.id("fun-picker-gifs")618
.id("fun-picker-gifs")618
.size_full()619
.size_full()619
.overflow_y_scroll()620
.overflow_y_scrollbar()620
.child(body)621
.child(body)621
.into_any_element()622
.into_any_element()622
}623
}@@ -1,6 +1,7 @@
1
1
use std::sync::Arc;
2
2
3
3
use chrono::Utc;
4
use gpui_kit::component::scroll::ScrollableElement as _;
4
5
use gpui_kit::assets::IconName;
5
6
use gpui_kit::base::GlobalState;
6
7
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};
@@ -524,7 +525,7 @@ impl ProfileCard {
524
525
v_flex()
525
526
.id("profile-reports")
526
527
.max_h(px(REPORTS_MAX_HEIGHT))
527
.overflow_y_scroll()
528
.overflow_y_scrollbar()
528
529
.children(rows),
529
530
);
530
531
}
@@ -1,6 +1,7 @@1
use std::sync::Arc;1
use std::sync::Arc;2
2
3
use chrono::Utc;3
use chrono::Utc;4
use gpui_kit::component::scroll::ScrollableElement as _;4
use gpui_kit::assets::IconName;5
use gpui_kit::assets::IconName;5
use gpui_kit::base::GlobalState;6
use gpui_kit::base::GlobalState;6
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};7
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};@@ -524,7 +525,7 @@ impl ProfileCard {524
v_flex()525
v_flex()525
.id("profile-reports")526
.id("profile-reports")526
.max_h(px(REPORTS_MAX_HEIGHT))527
.max_h(px(REPORTS_MAX_HEIGHT))527
.overflow_y_scroll()528
.overflow_y_scrollbar()528
.children(rows),529
.children(rows),529
);530
);530
}531
}@@ -1,6 +1,7 @@
1
1
use std::rc::Rc;
2
2
3
3
use chrono::Local;
4
use gpui_kit::component::scroll::ScrollableElement as _;
4
5
use gpui_kit::base::GlobalState;
5
6
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};
6
7
use gpui_kit::prelude::FluentBuilder as _;
@@ -316,7 +317,7 @@ fn popover(
316
317
v_flex()
317
318
.id("reaction-popover-entries")
318
319
.max_h(px(POPOVER_MAX_HEIGHT))
319
.overflow_y_scroll()
320
.overflow_y_scrollbar()
320
321
.children(entries.iter().map(|entry| entry_row(entry, directory))),
321
322
);
322
323
deferred(
@@ -1,6 +1,7 @@1
use std::rc::Rc;1
use std::rc::Rc;2
2
3
use chrono::Local;3
use chrono::Local;4
use gpui_kit::component::scroll::ScrollableElement as _;4
use gpui_kit::base::GlobalState;5
use gpui_kit::base::GlobalState;5
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};6
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};6
use gpui_kit::prelude::FluentBuilder as _;7
use gpui_kit::prelude::FluentBuilder as _;@@ -316,7 +317,7 @@ fn popover(316
v_flex()317
v_flex()317
.id("reaction-popover-entries")318
.id("reaction-popover-entries")318
.max_h(px(POPOVER_MAX_HEIGHT))319
.max_h(px(POPOVER_MAX_HEIGHT))319
.overflow_y_scroll()320
.overflow_y_scrollbar()320
.children(entries.iter().map(|entry| entry_row(entry, directory))),321
.children(entries.iter().map(|entry| entry_row(entry, directory))),321
);322
);322
deferred(323
deferred(@@ -5,6 +5,7 @@ use chatsvc::{
5
5
days_until_expiry,
6
6
};
7
7
use chrono::{DateTime, FixedOffset, Local, NaiveDate, Offset as _, Utc};
8
use gpui_kit::component::scroll::ScrollableElement as _;
8
9
use gpui_kit::assets::IconName;
9
10
use gpui_kit::component::{
10
11
button::{Button, ButtonVariants as _},
@@ -493,7 +494,7 @@ pub fn render_recap(view: RecapView, run: &RecapRun) -> AnyElement {
493
494
.w_full()
494
495
.flex_1()
495
496
.min_h_0()
496
.overflow_y_scroll()
497
.overflow_y_scrollbar()
497
498
.py(px(16.))
498
499
.gap(px(SECTION_GAP))
499
500
.when(!view.occurrences.is_empty(), |column| {
@@ -5,6 +5,7 @@ use chatsvc::{5
days_until_expiry,5
days_until_expiry,6
};6
};7
use chrono::{DateTime, FixedOffset, Local, NaiveDate, Offset as _, Utc};7
use chrono::{DateTime, FixedOffset, Local, NaiveDate, Offset as _, Utc};8
use gpui_kit::component::scroll::ScrollableElement as _;8
use gpui_kit::assets::IconName;9
use gpui_kit::assets::IconName;9
use gpui_kit::component::{10
use gpui_kit::component::{10
button::{Button, ButtonVariants as _},11
button::{Button, ButtonVariants as _},@@ -493,7 +494,7 @@ pub fn render_recap(view: RecapView, run: &RecapRun) -> AnyElement {493
.w_full()494
.w_full()494
.flex_1()495
.flex_1()495
.min_h_0()496
.min_h_0()496
.overflow_y_scroll()497
.overflow_y_scrollbar()497
.py(px(16.))498
.py(px(16.))498
.gap(px(SECTION_GAP))499
.gap(px(SECTION_GAP))499
.when(!view.occurrences.is_empty(), |column| {500
.when(!view.occurrences.is_empty(), |column| {@@ -1,4 +1,5 @@
1
1
use chrono::{DateTime, Local, Offset};
2
use gpui_kit::component::scroll::ScrollableElement as _;
2
3
use gpui_kit::assets::IconName;
3
4
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};
4
5
use gpui_kit::*;
@@ -227,7 +228,7 @@ impl Render for SavedPanel {
227
228
.flex_1()
228
229
.min_h_0()
229
230
.pb(px(12.))
230
.overflow_y_scroll()
231
.overflow_y_scrollbar()
231
232
.track_scroll(&self.scroll)
232
233
.children(rows),
233
234
&self.scroll,
@@ -1,4 +1,5 @@1
use chrono::{DateTime, Local, Offset};1
use chrono::{DateTime, Local, Offset};2
use gpui_kit::component::scroll::ScrollableElement as _;2
use gpui_kit::assets::IconName;3
use gpui_kit::assets::IconName;3
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};4
use gpui_kit::component::{h_flex, tooltip::Tooltip, v_flex};4
use gpui_kit::*;5
use gpui_kit::*;@@ -227,7 +228,7 @@ impl Render for SavedPanel {227
.flex_1()228
.flex_1()228
.min_h_0()229
.min_h_0()229
.pb(px(12.))230
.pb(px(12.))230
.overflow_y_scroll()231
.overflow_y_scrollbar()231
.track_scroll(&self.scroll)232
.track_scroll(&self.scroll)232
.children(rows),233
.children(rows),233
&self.scroll,234
&self.scroll,@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::component::{h_flex, v_flex};
2
3
use gpui_kit::*;
3
4
@@ -147,7 +148,7 @@ impl Render for ShortcutsDialog {
147
148
.id("shortcuts-body")
148
149
.min_h_0()
149
150
.gap(px(SECTION_GAP))
150
.overflow_y_scroll()
151
.overflow_y_scrollbar()
151
152
.children(Group::ALL.into_iter().map(group_block)),
152
153
),
153
154
)
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::component::{h_flex, v_flex};2
use gpui_kit::component::{h_flex, v_flex};2
use gpui_kit::*;3
use gpui_kit::*;3
4
@@ -147,7 +148,7 @@ impl Render for ShortcutsDialog {147
.id("shortcuts-body")148
.id("shortcuts-body")148
.min_h_0()149
.min_h_0()149
.gap(px(SECTION_GAP))150
.gap(px(SECTION_GAP))150
.overflow_y_scroll()151
.overflow_y_scrollbar()151
.children(Group::ALL.into_iter().map(group_block)),152
.children(Group::ALL.into_iter().map(group_block)),152
),153
),153
)154
)@@ -3,6 +3,7 @@ use std::collections::HashSet;
3
3
use std::time::Duration;
4
4
5
5
use chrono::{Local, Offset, Utc};
6
use gpui_kit::component::scroll::ScrollableElement as _;
6
7
use gpui_kit::assets::IconName;
7
8
use gpui_kit::component::button::{Button, ButtonVariants as _};
8
9
use gpui_kit::component::dialog::DialogFooter;
@@ -1433,7 +1434,7 @@ impl SidebarView {
1433
1434
.id("chats-scroll")
1434
1435
.flex_1()
1435
1436
.min_h_0()
1436
.overflow_y_scroll()
1437
.overflow_y_scrollbar()
1437
1438
.track_scroll(&self.chats_scroll)
1438
1439
.child(list);
1439
1440
with_top_edge(scroll_area, &self.chats_scroll, SIDEBAR_SCROLL_DIVIDER).into_any_element()
@@ -1844,7 +1845,7 @@ impl SidebarView {
1844
1845
.id("channels-scroll")
1845
1846
.flex_1()
1846
1847
.min_h_0()
1847
.overflow_y_scroll()
1848
.overflow_y_scrollbar()
1848
1849
.track_scroll(&self.channels_scroll)
1849
1850
.child(list);
1850
1851
with_top_edge(scroll_area, &self.channels_scroll, SIDEBAR_SCROLL_DIVIDER).into_any_element()
@@ -3,6 +3,7 @@ use std::collections::HashSet;3
use std::time::Duration;3
use std::time::Duration;4
4
5
use chrono::{Local, Offset, Utc};5
use chrono::{Local, Offset, Utc};6
use gpui_kit::component::scroll::ScrollableElement as _;6
use gpui_kit::assets::IconName;7
use gpui_kit::assets::IconName;7
use gpui_kit::component::button::{Button, ButtonVariants as _};8
use gpui_kit::component::button::{Button, ButtonVariants as _};8
use gpui_kit::component::dialog::DialogFooter;9
use gpui_kit::component::dialog::DialogFooter;@@ -1433,7 +1434,7 @@ impl SidebarView {1433
.id("chats-scroll")1434
.id("chats-scroll")1434
.flex_1()1435
.flex_1()1435
.min_h_0()1436
.min_h_0()1436
.overflow_y_scroll()1437
.overflow_y_scrollbar()1437
.track_scroll(&self.chats_scroll)1438
.track_scroll(&self.chats_scroll)1438
.child(list);1439
.child(list);1439
with_top_edge(scroll_area, &self.chats_scroll, SIDEBAR_SCROLL_DIVIDER).into_any_element()1440
with_top_edge(scroll_area, &self.chats_scroll, SIDEBAR_SCROLL_DIVIDER).into_any_element()@@ -1844,7 +1845,7 @@ impl SidebarView {1844
.id("channels-scroll")1845
.id("channels-scroll")1845
.flex_1()1846
.flex_1()1846
.min_h_0()1847
.min_h_0()1847
.overflow_y_scroll()1848
.overflow_y_scrollbar()1848
.track_scroll(&self.channels_scroll)1849
.track_scroll(&self.channels_scroll)1849
.child(list);1850
.child(list);1850
with_top_edge(scroll_area, &self.channels_scroll, SIDEBAR_SCROLL_DIVIDER).into_any_element()1851
with_top_edge(scroll_area, &self.channels_scroll, SIDEBAR_SCROLL_DIVIDER).into_any_element()@@ -1,3 +1,4 @@
1
use gpui_kit::component::scroll::ScrollableElement as _;
1
2
use gpui_kit::assets::IconName;
2
3
use gpui_kit::component::{
3
4
button::{Button, ButtonVariants as _},
@@ -128,7 +129,7 @@ impl TransferPicker {
128
129
.update(cx, |state, cx| state.close_transfer_picker(cx));
129
130
}
130
131
131
fn list(&self, cx: &mut Context<Self>) -> Stateful<Div> {
132
fn list(&self, cx: &mut Context<Self>) -> impl IntoElement + use<> {
132
133
let directory = &self.app.read(cx).directory;
133
134
let rows: Vec<AnyElement> = self
134
135
.results
@@ -179,7 +180,7 @@ impl TransferPicker {
179
180
.id("transfer-targets")
180
181
.w_full()
181
182
.max_h(px(ROW_HEIGHT * MAX_RESULTS as f32))
182
.overflow_y_scroll()
183
.overflow_y_scrollbar()
183
184
.children(rows)
184
185
}
185
186
@@ -1,3 +1,4 @@1
use gpui_kit::component::scroll::ScrollableElement as _;1
use gpui_kit::assets::IconName;2
use gpui_kit::assets::IconName;2
use gpui_kit::component::{3
use gpui_kit::component::{3
button::{Button, ButtonVariants as _},4
button::{Button, ButtonVariants as _},@@ -128,7 +129,7 @@ impl TransferPicker {128
.update(cx, |state, cx| state.close_transfer_picker(cx));129
.update(cx, |state, cx| state.close_transfer_picker(cx));129
}130
}130
131
131
fn list(&self, cx: &mut Context<Self>) -> Stateful<Div> {132
fn list(&self, cx: &mut Context<Self>) -> impl IntoElement + use<> {132
let directory = &self.app.read(cx).directory;133
let directory = &self.app.read(cx).directory;133
let rows: Vec<AnyElement> = self134
let rows: Vec<AnyElement> = self134
.results135
.results@@ -179,7 +180,7 @@ impl TransferPicker {179
.id("transfer-targets")180
.id("transfer-targets")180
.w_full()181
.w_full()181
.max_h(px(ROW_HEIGHT * MAX_RESULTS as f32))182
.max_h(px(ROW_HEIGHT * MAX_RESULTS as f32))182
.overflow_y_scroll()183
.overflow_y_scrollbar()183
.children(rows)184
.children(rows)184
}185
}185
186
@@ -68,6 +68,7 @@ pub struct Scrollable<E: InteractiveElement + Styled + ParentElement + Element>
68
68
id: ElementId,
69
69
element: E,
70
70
axis: ScrollbarAxis,
71
scroll_handle: Option<ScrollHandle>,
71
72
}
72
73
73
74
impl<E> Scrollable<E>
@@ -80,9 +81,17 @@ where
80
81
id: caller_id(),
81
82
element,
82
83
axis: axis.into(),
84
scroll_handle: None,
83
85
}
84
86
}
85
87
88
/// Scroll with the caller's handle instead of one kept per element id, so
89
/// the caller can read and set the offset.
90
pub fn track_scroll(mut self, scroll_handle: &ScrollHandle) -> Self {
91
self.scroll_handle = Some(scroll_handle.clone());
92
self
93
}
94
86
95
/// Set a specific element id, default is the [`std::panic::Location::caller`].
87
96
///
88
97
/// Only needed when one call site creates several scrollables, which would
@@ -130,7 +139,10 @@ where
130
139
E: InteractiveElement + Styled + ParentElement + Element + 'static,
131
140
{
132
141
fn render(mut self, window: &mut Window, cx: &mut App) -> impl IntoElement {
133
let scroll_handle = scroll_handle_for(&self.id, window, cx);
142
let scroll_handle = match self.scroll_handle.take() {
143
Some(scroll_handle) => scroll_handle,
144
None => scroll_handle_for(&self.id, window, cx),
145
};
134
146
135
147
// Preserve the caller-requested size on the wrapper, while keeping the
136
148
// caller's element as the actual scroll-tracked layout container.
@@ -68,6 +68,7 @@ pub struct Scrollable<E: InteractiveElement + Styled + ParentElement + Element>68
id: ElementId,68
id: ElementId,69
element: E,69
element: E,70
axis: ScrollbarAxis,70
axis: ScrollbarAxis,71
scroll_handle: Option<ScrollHandle>,71
}72
}72
73
73
impl<E> Scrollable<E>74
impl<E> Scrollable<E>@@ -80,9 +81,17 @@ where80
id: caller_id(),81
id: caller_id(),81
element,82
element,82
axis: axis.into(),83
axis: axis.into(),84
scroll_handle: None,83
}85
}84
}86
}85
87
88
/// Scroll with the caller's handle instead of one kept per element id, so89
/// the caller can read and set the offset.90
pub fn track_scroll(mut self, scroll_handle: &ScrollHandle) -> Self {91
self.scroll_handle = Some(scroll_handle.clone());92
self93
}94
86
/// Set a specific element id, default is the [`std::panic::Location::caller`].95
/// Set a specific element id, default is the [`std::panic::Location::caller`].87
///96
///88
/// Only needed when one call site creates several scrollables, which would97
/// Only needed when one call site creates several scrollables, which would@@ -130,7 +139,10 @@ where130
E: InteractiveElement + Styled + ParentElement + Element + 'static,139
E: InteractiveElement + Styled + ParentElement + Element + 'static,131
{140
{132
fn render(mut self, window: &mut Window, cx: &mut App) -> impl IntoElement {141
fn render(mut self, window: &mut Window, cx: &mut App) -> impl IntoElement {133
let scroll_handle = scroll_handle_for(&self.id, window, cx);142
let scroll_handle = match self.scroll_handle.take() {143
Some(scroll_handle) => scroll_handle,144
None => scroll_handle_for(&self.id, window, cx),145
};134
146
135
// Preserve the caller-requested size on the wrapper, while keeping the147
// Preserve the caller-requested size on the wrapper, while keeping the136
// caller's element as the actual scroll-tracked layout container.148
// caller's element as the actual scroll-tracked layout container.