Michael Rabinovich Cursor commited on
Commit
4090e8a
·
1 Parent(s): 0c0ddd8

leaderboard: tighten mobile gallery box to a single scroll

Browse files

Increase the mobile chrome reserve so the capped box fits the phone
viewport (kills the residual outer page scroll on top of the box's own
scroll). GT row stays pinned; shows the GT + a couple of models with the
rest reachable by scrolling the box.

Co-authored-by: Cursor <cursoragent@cursor.com>

Files changed (1) hide show
  1. gallery.py +2 -2
gallery.py CHANGED
@@ -700,8 +700,8 @@ function sizeGalleryBox() {
700
  // internally on mobile so the GT row + sample headers stay pinned and each
701
  // model's renders sit under the matching GT render (same as desktop).
702
  const narrow = (window.innerWidth || 1000) < 760;
703
- const reserve = narrow ? 360 : CHROME_RESERVE;
704
- const maxH = narrow ? 560 : 1200;
705
  const minH = narrow ? 280 : 320;
706
  const h = Math.max(minH, Math.min(maxH, Math.round(avail - reserve)));
707
  document.documentElement.style.setProperty('--gallery-max', h + 'px');
 
700
  // internally on mobile so the GT row + sample headers stay pinned and each
701
  // model's renders sit under the matching GT render (same as desktop).
702
  const narrow = (window.innerWidth || 1000) < 760;
703
+ const reserve = narrow ? 410 : CHROME_RESERVE;
704
+ const maxH = narrow ? 520 : 1200;
705
  const minH = narrow ? 280 : 320;
706
  const h = Math.max(minH, Math.min(maxH, Math.round(avail - reserve)));
707
  document.documentElement.style.setProperty('--gallery-max', h + 'px');