fix(viewer): prevent tab bar crush and fix graph canvas overflow#218
fix(viewer): prevent tab bar crush and fix graph canvas overflow#218nagarjunr wants to merge 1 commit intorohitg00:mainfrom
Conversation
|
Someone is attempting to deploy a commit to the rohitg00's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughCSS layout improvements in the viewer HTML file to fix flex container sizing behavior. The header, tab bar, feature-flag banner, and footer now use Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
|
Reviewed — clean CSS layout fix. The diagnoses are right:
CSS-only, no runtime impact, no test coverage needed. Approving for merge — holding for @rohitg00 to push the button. If you have screenshots of before/after the tab-bar fix specifically, mind dropping them in the PR body? Helpful for the CHANGELOG entry. Not blocking. |
Summary
Two CSS layout bugs in the single-file viewer SPA (
src/viewer/index.html):Bug 1 — Tab bar compressed to ~8px (invisible)
Root cause:
.tab-barhasoverflow-x: autofor horizontal scrolling on small screens. The CSS overflow interaction rule means settingoverflow-xto anything other thanvisiblealso forcesoverflow-y: auto. This zeroes the flex item's minimum height floor. Combined with the defaultflex-shrink: 1on all structural elements, the flexbox algorithm shrinks the tab bar to near-zero when content is tall.Fix: Add
flex-shrink: 0to all structural chrome elements (.app-header,.tab-bar,.flag-banners,.viewer-footer). Only the content view (.view.active, which already hasmin-height: 0) should participate in shrinking.Bug 2 — Graph canvas overflows its container (~235px)
Root cause:
.graph-containerusedheight: calc(100vh - 130px)which assumed 130px of fixed chrome above it. Since the flag-banners section was added the actual chrome is ~194px, making the canvas 64-235px taller than the visible view area. Users see only ~62% of the graph canvas.Fix: Add
#view-graph { padding: 0; overflow: hidden }and change.graph-containertoheight: 100%, removing the stalecalc()and themargin: -24pxpadding-negation hack. Since the view is a flex item withflex-grow: 1the height resolves correctly against the available viewport space.Test plan
Summary by CodeRabbit