fix(channels): wheel scrolls a long thread reply instead of the feed
- The message list's wheel mask scrolled the list in the capture phase, so the inline reply editor inside a feed row never got the wheel - MessageScroller gets wheel_mask(bool); conversations turn it off since no ancestor scrolls Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@@ -4079,6 +4079,7 @@ impl Render for ConversationView {
4079
4079
},
4080
4080
)
4081
4081
.with_row_style(StyleRefinement::default().px(px(0.)).pb(px(0.)))
4082
.wheel_mask(false)
4082
4083
.jump_button(!in_feed)
4083
4084
.force_jump_button(detached)
4084
4085
.with_jump_button_label(jump::JUMP_TO_NEWEST_LABEL)
@@ -4079,6 +4079,7 @@ impl Render for ConversationView {4079
},4079
},4080
)4080
)4081
.with_row_style(StyleRefinement::default().px(px(0.)).pb(px(0.)))4081
.with_row_style(StyleRefinement::default().px(px(0.)).pb(px(0.)))4082
.wheel_mask(false)4082
.jump_button(!in_feed)4083
.jump_button(!in_feed)4083
.force_jump_button(detached)4084
.force_jump_button(detached)4084
.with_jump_button_label(jump::JUMP_TO_NEWEST_LABEL)4085
.with_jump_button_label(jump::JUMP_TO_NEWEST_LABEL)@@ -14,3 +14,4 @@ Upstream: crates.io `gpui-component 0.7.1`. Wired in via `[patch.crates-io]` in
14
14
| `src/tooltip.rs` | `PopupTriggerTooltip` (`popup_trigger_tooltip`, `popup_trigger_tooltip_text`): no tooltip while the element's popup is open | a tooltip never covers the menu its trigger opened, and does not come back while it is open |
15
15
| `src/button/button.rs` | no managed tooltip while the button is held `open` by its popover or dropdown menu | same, for Button triggers |
16
16
| `src/tooltip.rs` | managed tooltip requests carry a liveness token from the trigger's element state (`while_alive`); `TOOLTIP_DEBUG_SELECTOR` on `Tooltip` | a tooltip closes when its trigger is no longer rendered (e.g. "Jump to newest" after the button vanished); tests find tooltips |
17
| `src/message_scroller.rs` | `wheel_mask(bool)` builder, default on; off skips the `ScrollableMask` child | the mask scrolls the list in the capture phase, so an editor inside a row (channel thread reply) never got the wheel |
@@ -14,3 +14,4 @@ Upstream: crates.io `gpui-component 0.7.1`. Wired in via `[patch.crates-io]` in14
| `src/tooltip.rs` | `PopupTriggerTooltip` (`popup_trigger_tooltip`, `popup_trigger_tooltip_text`): no tooltip while the element's popup is open | a tooltip never covers the menu its trigger opened, and does not come back while it is open |14
| `src/tooltip.rs` | `PopupTriggerTooltip` (`popup_trigger_tooltip`, `popup_trigger_tooltip_text`): no tooltip while the element's popup is open | a tooltip never covers the menu its trigger opened, and does not come back while it is open |15
| `src/button/button.rs` | no managed tooltip while the button is held `open` by its popover or dropdown menu | same, for Button triggers |15
| `src/button/button.rs` | no managed tooltip while the button is held `open` by its popover or dropdown menu | same, for Button triggers |16
| `src/tooltip.rs` | managed tooltip requests carry a liveness token from the trigger's element state (`while_alive`); `TOOLTIP_DEBUG_SELECTOR` on `Tooltip` | a tooltip closes when its trigger is no longer rendered (e.g. "Jump to newest" after the button vanished); tests find tooltips |16
| `src/tooltip.rs` | managed tooltip requests carry a liveness token from the trigger's element state (`while_alive`); `TOOLTIP_DEBUG_SELECTOR` on `Tooltip` | a tooltip closes when its trigger is no longer rendered (e.g. "Jump to newest" after the button vanished); tests find tooltips |17
| `src/message_scroller.rs` | `wheel_mask(bool)` builder, default on; off skips the `ScrollableMask` child | the mask scrolls the list in the capture phase, so an editor inside a row (channel thread reply) never got the wheel |@@ -237,6 +237,7 @@ pub struct MessageScroller {
237
237
bottom_fade: Option<Hsla>,
238
238
top_inset: gpui::Pixels,
239
239
scrollbar: bool,
240
wheel_mask: bool,
240
241
jump_button: bool,
241
242
force_jump_button: bool,
242
243
on_jump: Option<Rc<dyn Fn(&mut Window, &mut App)>>,
@@ -270,6 +271,7 @@ impl MessageScroller {
270
271
bottom_fade: None,
271
272
top_inset: px(0.),
272
273
scrollbar: true,
274
wheel_mask: true,
273
275
jump_button: true,
274
276
force_jump_button: false,
275
277
on_jump: None,
@@ -283,6 +285,12 @@ impl MessageScroller {
283
285
self
284
286
}
285
287
288
/// Without the mask the wheel reaches scrollable rows (an inline editor) before the list; use it when no ancestor scrolls.
289
pub fn wheel_mask(mut self, wheel_mask: bool) -> Self {
290
self.wheel_mask = wheel_mask;
291
self
292
}
293
286
294
/// Enable or disable the built-in jump-to-latest button.
287
295
pub fn jump_button(mut self, jump_button: bool) -> Self {
288
296
self.jump_button = jump_button;
@@ -509,7 +517,9 @@ impl RenderOnce for MessageScroller {
509
517
// scroller (like in Table): the mask consumes vertical-dominant
510
518
// wheel events while the list can move and chains to the ancestor
511
519
// only at the edges.
512
.child(ScrollableMask::new(Axis::Vertical, &list_state).id(root_id.clone()))
520
.when(self.wheel_mask, |this| {
521
this.child(ScrollableMask::new(Axis::Vertical, &list_state).id(root_id.clone()))
522
})
513
523
.when(self.jump_button && jump_button_visibility > 0., |this| {
514
524
let state = self.state.clone();
515
525
let on_jump = self.on_jump.clone();
@@ -237,6 +237,7 @@ pub struct MessageScroller {237
bottom_fade: Option<Hsla>,237
bottom_fade: Option<Hsla>,238
top_inset: gpui::Pixels,238
top_inset: gpui::Pixels,239
scrollbar: bool,239
scrollbar: bool,240
wheel_mask: bool,240
jump_button: bool,241
jump_button: bool,241
force_jump_button: bool,242
force_jump_button: bool,242
on_jump: Option<Rc<dyn Fn(&mut Window, &mut App)>>,243
on_jump: Option<Rc<dyn Fn(&mut Window, &mut App)>>,@@ -270,6 +271,7 @@ impl MessageScroller {270
bottom_fade: None,271
bottom_fade: None,271
top_inset: px(0.),272
top_inset: px(0.),272
scrollbar: true,273
scrollbar: true,274
wheel_mask: true,273
jump_button: true,275
jump_button: true,274
force_jump_button: false,276
force_jump_button: false,275
on_jump: None,277
on_jump: None,@@ -283,6 +285,12 @@ impl MessageScroller {283
self285
self284
}286
}285
287
288
/// Without the mask the wheel reaches scrollable rows (an inline editor) before the list; use it when no ancestor scrolls.289
pub fn wheel_mask(mut self, wheel_mask: bool) -> Self {290
self.wheel_mask = wheel_mask;291
self292
}293
286
/// Enable or disable the built-in jump-to-latest button.294
/// Enable or disable the built-in jump-to-latest button.287
pub fn jump_button(mut self, jump_button: bool) -> Self {295
pub fn jump_button(mut self, jump_button: bool) -> Self {288
self.jump_button = jump_button;296
self.jump_button = jump_button;@@ -509,7 +517,9 @@ impl RenderOnce for MessageScroller {509
// scroller (like in Table): the mask consumes vertical-dominant517
// scroller (like in Table): the mask consumes vertical-dominant510
// wheel events while the list can move and chains to the ancestor518
// wheel events while the list can move and chains to the ancestor511
// only at the edges.519
// only at the edges.512
.child(ScrollableMask::new(Axis::Vertical, &list_state).id(root_id.clone()))520
.when(self.wheel_mask, |this| {521
this.child(ScrollableMask::new(Axis::Vertical, &list_state).id(root_id.clone()))522
})513
.when(self.jump_button && jump_button_visibility > 0., |this| {523
.when(self.jump_button && jump_button_visibility > 0., |this| {514
let state = self.state.clone();524
let state = self.state.clone();515
let on_jump = self.on_jump.clone();525
let on_jump = self.on_jump.clone();