Make tile insert targets discoverable

This commit is contained in:
Dylan M. Taylor
2026-11-21 16:21:26 -05:00
parent 024517d26e
commit 5d5d1922ca
2 changed files with 4 additions and 1 deletions
+1 -1
View File
@@ -626,7 +626,7 @@ impl<K: Clone + Eq + Hash + Send + Sync + 'static> Component for TileGrid<'_, K>
pinned: cx.color(cx.tokens.color.surface.panel),
header: ListRow::style(cx, ListRow::new(Label::default()).heading().style_key()),
insert: cx.color(cx.tokens.color.accent.solid),
insert_width: cx.tokens.space.gap.stack,
insert_width: cx.tokens.size.icon.lg,
}
}
@@ -191,6 +191,9 @@ fn insert_gaps_keep_document_positions_when_rows_are_virtualised() {
});
fixture.room(Vec2::new(600.0, 300.0));
fixture.settle();
let first_gap = fixture.by_label("Insert before 1").expect("the first gap").rect;
let first_tile = shown.borrow().tile(0);
assert!(first_gap.width() >= first_tile.width() / 8.0, "the insert control must be discoverable: {first_gap:?} beside {first_tile:?}");
let view = shown.borrow().view;
fixture.frame(vec![pointer::moved(view.center())]);
for _ in 0..4 {