Skip to content

fix(ui): move zoom controls to top-left for better visibility#1360

Open
euzghe wants to merge 3 commits into
chairemobilite:mainfrom
euzghe:main
Open

fix(ui): move zoom controls to top-left for better visibility#1360
euzghe wants to merge 3 commits into
chairemobilite:mainfrom
euzghe:main

Conversation

@euzghe
Copy link
Copy Markdown

@euzghe euzghe commented Jan 14, 2026

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

  • Style
    • Relocated the map zoom control to the top-left, improving visibility and accessibility and reducing overlap with other UI elements.
    • This is strictly a UI positioning change; map behavior, interactions, and data flow remain unchanged.

✏️ Tip: You can customize this high-level summary in your review settings.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 14, 2026

Walkthrough

This 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

  • tahini
  • samuel-duhaime
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: moving zoom controls from RIGHT_BOTTOM to LEFT_TOP for improved visibility in smaller map containers.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No issues found across 1 file

@tahini
Copy link
Copy Markdown
Contributor

tahini commented Jan 15, 2026

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?

@samuel-duhaime
Copy link
Copy Markdown
Collaborator

@tahini @euzghe Yes this is correct.

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?

@euzghe
Copy link
Copy Markdown
Author

euzghe commented Jan 15, 2026

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!

@tahini
Copy link
Copy Markdown
Contributor

tahini commented Jan 16, 2026

There are compilation errors with this PR. The package we use does not seem to support the style zoomControlOptions and the ZoomControlStyle does not exist in google.maps.

@euzghe
Copy link
Copy Markdown
Author

euzghe commented Jan 16, 2026

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! 😊

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants