Spaces:
Running
Running
Fix logo placement and iframe-resizer infinite-scroll on Spaces
#2
by linoyts HF Staff - opened
Supersedes #1. Two UI bugs visible on the deployed Space (not locally):
1. Logo was tiny and overlapping the plot. The original #header was position: absolute with max-width: 40px, squashing the logo to a 40ร40 corner overlay. Restructured:
- Renamed
#headerโ#header-bar; droppedposition: absoluteand thepointer-events: noneoverlay hack. - Made the Gradio wrapper (
.gradio-container .main/.wrap/.contain) aflex-direction: columncontainer, so#header-bartakes its natural height at top and#main-row(nowflex: 1 1 auto`) consumes the remaining height. - Bumped logo to 48px tall, removed the
max-width: 40pxcap that was squashing it. - Passed
height=48, width=48togr.Imageso it pre-sizes on the first paint โ without this, the component flashes at default size until the injected<style>block applies. - Added a faint bottom border on
#header-barto separate it from the plot/chat split.
2. Page scrolled to infinity on Spaces. Feedback loop between html, body { height: 100vh } and the HF Spaces iframe-resizer: iframe grows to body.scrollHeight, 100vh chases the new height, loop. overflow: hidden does NOT break the loop because scrollHeight reports actual content size, not clipped visible size. Fix: drop 100vh on body and pin gradio-app with position: fixed; inset: 0; โ the app is removed from document flow, body.scrollHeight stays ~0, the iframe never grows.
linoyts changed pull request status to merged