- 
                Notifications
    You must be signed in to change notification settings 
- Fork 634
Fix control panel width for narrow viewports #2200
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
| WalkthroughReplaces the bottom-right control panel wrapper in  Changes
 Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Possibly related PRs
 Suggested labels
 Suggested reviewers
 Poem
 Pre-merge checks✅ Passed checks (3 passed)
 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  | 
| since it's not fixed the control panel shrinks and expands as the numbers change. | 
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/client/index.html (1)
310-315: Approved: Pointer-events constraint is correct and well-targeted.The shift to
inline-flexwithpointer-events-autoon the control panel, combined with the parent'spointer-events: none, correctly restricts interactivity to just the panel—restoring camera drag behavior on narrow viewports. The width formulamin(320px, calc(100vw - 48px))is sensible for preventing overflow on mobile while capping at 320px on wider screens.Consider documenting the 48px value as a semantic constant (e.g., a CSS variable or inline comment) to clarify whether it represents horizontal padding, margin, or another layout consideration—this will help future maintainers understand the responsiveness rationale.
To confirm the layout behaves as intended, please verify that the control panel renders and accepts clicks correctly across a few key viewport widths (e.g., 320px mobile, 640px tablet, 1024px desktop).
Description:
Fix control panel width for narrow viewports, Bug fix
Bound the control-panel wrapper width so the interactive overlay no longer stretches across the map when the viewport narrows, letting canvas drags reach the camera again.
src/client/index.html:304 — swapped the broad block wrapper for an inline-flex container and capped its width with min(320px, calc(100vw - 48px)), which keeps pointer events confined to the panel itself instead of swallowing the entire bottom band on narrow windows.
Please complete the following:
Please put your Discord username so you can be contacted if a bug or regression is found:
Hiphex