Messaging · GIF picker: a GIF focused past the fold scrolls into view

Each GIF holds its own focus handle, and a canvas around it, ring and
all, sets the results box's offset once per focus from its painted
bounds. layout::bring_into_view now works along either axis; the data
table's header and the video timeline pass their sideways one.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
ZacharyZhang-NYandClaude Opus 5.5 committed 2026-09-26 23:11:46 -04:00
1 parent 5ade2bed74
commit 6f599803ce
6 files changed
+102 -21

No files matched your search

+2 -2
View File
@@ -1,7 +1,7 @@
use std::{rc::Rc, time::Duration};
use gpui::{
App, ElementId, InteractiveElement, IntoElement, MouseButton, ParentElement, RenderOnce,
App, Axis, ElementId, InteractiveElement, IntoElement, MouseButton, ParentElement, RenderOnce,
ScrollHandle, SharedString, StatefulInteractiveElement, Styled, Window, canvas, div,
prelude::*, relative, transparent_black,
};
@@ -233,7 +233,7 @@ impl RenderOnce for VideoGenerationTimeline {
revealed.update(cx, |revealed, _| {
*revealed = Some(key.clone())
});
if bring_into_view(&scroll, bounds) {
if bring_into_view(&scroll, bounds, Axis::Horizontal) {
log::info!(
"video timeline: shot {key} scrolled into view"
);