Files
arena-tracker/crates/app/src/page/scrollbar.rs
T
nessarandClaude Sonnet 5.5 2c9ca4552c
CI / core (pull_request) Successful in 47s
CI / core (push) Successful in 45s
Address review of the champ select page scroll
- Draw the section's grid again once the draw that moved it is over: a notify
  inside a draw dirties nothing for the next one, so its rows stayed those of
  the former place.
- Keep the first row of a grid wholly below the window built, so that Tab from
  the search enters it, and scroll the page to any card the keyboard focuses.
- Leave the scrollbar its own lane in the Anvil and « Autres champions »
  sections, so it no longer covers the sort selector, and make it a view of
  its own so that its fade does not draw the whole page.
- Store the page's Paging once; correct the performance notes on scrolling.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
2026-11-22 19:18:35 +01:00

22 lines
687 B
Rust

use gpui_kit::component::scroll::Scrollbar;
use gpui_kit::*;
/// The scrollbar of the champ select's scrolling, in the lane on the right of its column. It is
/// its own view for the scrollbar's fade: the frames it asks for are drawn for this view, not the
/// whole page.
pub(in crate::page) struct PageScrollbar {
pub(in crate::page) scroll: ScrollHandle,
}
impl Render for PageScrollbar {
fn render(&mut self, _: &mut Window, _: &mut Context<Self>) -> impl IntoElement {
div()
.absolute()
.top_0()
.right_0()
.bottom_0()
.w(Scrollbar::width())
.child(Scrollbar::vertical(&self.scroll))
}
}