fix(configurator): collapse output drawer on mobile - #316
Conversation
On phone-sized viewports (≤600 px) the output drawer now starts collapsed so the main token-editing area has room to be usable. Users can still tap the 'Override CSS' bar to expand it. When expanded on narrow screens, max-height is capped at 35 vh (vs 50 vh on desktop) so it never swallows more than a third of the viewport height. https://claude.ai/code/session_01MAgtQ7JY16X2TqZZyGfkuu
|
Warning Review limit reached
More reviews will be available in 56 minutes and 42 seconds. Learn how PR review limits work. Your organization has run out of usage credits. Purchase more credits in the billing tab to continue. ⌛ How to resolve this issue?After more reviews become available, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available. Please see our Fair Usage Limits Policy for further information. ℹ️ Review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe PR adds mobile-responsive behavior to the output drawer component. A reactive effect closes the drawer on narrow viewports, and corresponding CSS styling constrains the drawer's expanded height, ensuring the interface remains usable on phone-sized screens. ChangesMobile-responsive output drawer
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes 🚥 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. Comment |
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@configurator/src/App.svelte`:
- Around line 147-149: The effect using window.matchMedia only runs once and
doesn't respond to viewport changes; update the $effect to create a
MediaQueryList via window.matchMedia('(max-width: 600px)'), register a change
handler that sets ui.outputOpen = false when matches and ui.outputOpen = true
when not matches (or toggles appropriately), and ensure you remove the listener
in the effect cleanup (use mediaQuery.removeEventListener or removeListener) so
the handler is deregistered; reference the existing $effect, window.matchMedia,
and ui.outputOpen when making the change.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f64b3ec3-2803-4e39-a230-017f6512a920
📒 Files selected for processing (2)
configurator/src/App.svelteconfigurator/src/components/OutputPanel.svelte
Add a MediaQueryList change listener so the output drawer responds to viewport resizes (e.g. phone rotation), not just the initial mount. Mirrors the existing preview-overlay pattern. https://claude.ai/code/session_01MAgtQ7JY16X2TqZZyGfkuu
Summary
max-heightis capped at 35 vh (vs 50 vh on desktop) so the drawer never swallows more than a third of the viewport height.Root cause
OutputPaneldefaults tooutputOpen: trueandmax-height: 50 vh. On a typical Android phone (~780 px viewport), that leaves only ~200–250 px for the main area after the header — too small to use the token editors. TheOverride CSSsection was visually "bleeding through" and making the panel inaccessible.Test plan
https://claude.ai/code/session_01MAgtQ7JY16X2TqZZyGfkuu
Generated by Claude Code
Summary by CodeRabbit