mirror of
https://github.com/l0ng-ai/openidea.git
synced 2026-11-19 00:10:00 +00:00
Dragging the Git Log scrollbar through a long history stuttered and showed blank rows: the native scrollbar scrolls asynchronously in WebKit, so the virtual list rendered rows a frame or more after the new offset was painted. The list now uses a scrollbar drawn in the DOM (`Scrollbar` in `src/ui`) that sets the offset from pointer events and notifies scroll listeners at once, so the virtualizer renders the matching rows before the next paint. Rows are keyed by slot so a large jump updates the mounted rows instead of rebuilding them, overscan is lowered, and rows rendered mid-scroll draw their graph without edge hit targets, which come back once scrolling stops. Adds a `gitLogScrollbar` perf scenario with budgets.
28 lines
584 B
CSS
28 lines
584 B
CSS
/* Same look as the global ::-webkit-scrollbar (global.css). */
|
|
.track {
|
|
position: absolute;
|
|
top: 0;
|
|
right: 0;
|
|
width: 10px;
|
|
z-index: 1;
|
|
}
|
|
.thumb {
|
|
position: absolute;
|
|
left: 0;
|
|
right: 0;
|
|
top: 0;
|
|
border: 2px solid transparent;
|
|
border-radius: 6px;
|
|
background-clip: content-box;
|
|
background-color: var(--scrollbar-thumb);
|
|
will-change: transform;
|
|
}
|
|
.thumb:hover,
|
|
.thumb[data-dragging] {
|
|
background-color: var(--scrollbar-thumb-hover);
|
|
}
|
|
/* For the scroller whose vertical scrollbar `Scrollbar` draws. */
|
|
.hideNative::-webkit-scrollbar:vertical {
|
|
width: 0;
|
|
}
|