fix(ui): move zoom controls to top-left for better visibility#1360
fix(ui): move zoom controls to top-left for better visibility#1360euzghe wants to merge 3 commits into
Conversation
WalkthroughThis change updates the Google Map component in InputMapGoogle.tsx to move the zoom control position from google.maps.ControlPosition.RIGHT_BOTTOM to google.maps.ControlPosition.LEFT_TOP. No other logic, data flow, event handling, or exported declarations were modified. Possibly related PRs
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
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 |
|
The original issue is not as much about the placement as the fact that we need to click on the square control to see the zoom and other icons. The zoom buttons (+ / -) at least should be visible by default on the map, while panning buttons could be visible only on request. @samuel-duhaime can you confirm what is the expected behavior for the map controls? |
|
@tahini @euzghe Yes this is correct.
|
|
Hi @tahini and @samuel-duhaime! I've updated the PR with the requested changes. I used google.maps.ZoomControlStyle.SMALL to ensure the '+' and '-' buttons are always visible as separate controls, even in smaller map containers. This prevents them from being collapsed into a single menu button. Thanks for the guidance! |
|
There are compilation errors with this PR. The package we use does not seem to support the style |
|
Hi @tahini and @samuel-duhaime! I've removed the ZoomControlStyle line to fix the compilation errors as requested. However, as @samuel-duhaime mentioned, the main goal is to keep the zoom buttons (+/-) visible by default. Since the library doesn't support the SMALL style, should we consider increasing the minimum height of the map container, or is there another preferred way in this project to prevent Google Maps from collapsing the controls into a square menu? I'm ready to implement the best alternative! 😊 |
This PR moves the Google Maps zoom controls from RIGHT_BOTTOM to LEFT_TOP. This was requested by the maintainers in the localisation repository to ensure the controls are visible in smaller map containers.
Reference: chairemobilite/localisation#54
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.