Michael Rabinovich Cursor commited on
Commit
5eaf6b8
·
1 Parent(s): a0462d9

leaderboard: make the gallery the single scroller

Browse files

Sizing the iframe to a fixed 80vh left two scrollbars (the iframe body
and the outer Gradio page), which was confusing. Now fitIframe measures
the available height from the iframe's own top down to the bottom of the
viewport (via the same-origin parent) and sizes the iframe to
min(content, available), reserving room for the Refresh button. Short
content shrinks the iframe (nothing scrolls); tall content fills the
viewport so only the iframe body scrolls and the sticky header + GT row
stay locked. The outer page no longer needs its own scrollbar.

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

2 files changed +30 -15
Files changed (2)
app.py+7-8
gallery.py+23-7