Repository navigation
Commit 522b594
committed
fix(web): close the gap above the first diff file
Two sources, both above the first file header:
`DIFF_PANEL_UNSAFE_CSS` shrinks the file header to match the app's type
scale, but the virtualizer kept reserving its default `diffHeaderHeight`
of 44px per file. The extra 11px per file is phantom scroll space, and
when everything is collapsed the content is shorter than the viewport, so
the sticky window's positive top inset pushes it down by exactly that
slack -- a gap that grows with the file count. Pin the header height in
CSS and hand the same constant to `itemMetrics.diffHeaderHeight` so the
reserved and rendered heights agree. `min-height` is set alongside
`height` because the library's own `min-height: 36px` otherwise wins.
`layout.paddingTop: 8` then left an 8px gap above the first header at
rest that disappeared as soon as the header pinned while scrolling. Drop
it to 0 so the top of the list looks the same at rest and scrolled.1 parent ac23e7b commit 522b594
1 file changed
Lines changed: 12 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
81 | 81 | | |
82 | 82 | | |
83 | 83 | | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
| |||
133 | 140 | | |
134 | 141 | | |
135 | 142 | | |
136 | | - | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
137 | 146 | | |
138 | 147 | | |
139 | 148 | | |
| |||
915 | 924 | | |
916 | 925 | | |
917 | 926 | | |
918 | | - | |
| 927 | + | |
| 928 | + | |
919 | 929 | | |
920 | 930 | | |
921 | 931 | | |
| |||
0 commit comments