Skip to content

fix: hide map fullscreen tooltip on narrow viewports - #5640

Closed
hakong wants to merge 2 commits into
teslamate-org:mainfrom
hakong:fix/mobile-map-tooltip
Closed

fix: hide map fullscreen tooltip on narrow viewports#5640
hakong wants to merge 2 commits into
teslamate-org:mainfrom
hakong:fix/mobile-map-tooltip

Conversation

@hakong

@hakong hakong commented Aug 20, 2026

Copy link
Copy Markdown
Contributor

What?

Apply the existing has-tooltip-hidden-touch class from the tooltip library to the map fullscreen button.

Extend the existing fullscreen-button test to verify that the responsive tooltip class is present.

Why?

On mobile, tapping the maximize or minimize button leaves its tooltip visible until another part of the screen is tapped.

This is a follow-up to #5495.

How?

The existing tooltip class suppresses the tooltip at viewport widths of 1023px or narrower. The button retains its translated aria-label, and desktop hover tooltips are unaffected.

Testing

  • Built and deployed a production image from the current main branch.
  • Tested maximizing and minimizing the map on a physical phone.
  • Confirmed that the tooltip no longer appears on mobile.
  • Ran mix ci: 493 tests passed.

@netlify

netlify Bot commented Aug 20, 2026

Copy link
Copy Markdown

Deploy Preview for teslamate ready!

Name Link
🔨 Latest commit 9f519d8
🔍 Latest deploy log https://app.netlify.com/projects/teslamate/deploys/6a875f47ef711100080720f9
😎 Deploy Preview https://deploy-preview-5640--teslamate.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@hakong

hakong commented Aug 20, 2026

Copy link
Copy Markdown
Contributor Author

Does this look OK? Did I forget anything?

@hakong
hakong marked this pull request as ready for review August 20, 2026 20:22
@JakobLichterfeld JakobLichterfeld added the note:discussion Details or approval are up for discussion label Aug 21, 2026
@JakobLichterfeld

Copy link
Copy Markdown
Member

Thanks for your contribution, and for the thorough testing write-up — the change itself is clean and does exactly what it says.

I've marked this as a discussion because I disagree with the underlying premise, and I want to explain why rather than just close it silently.

An icon-only button without any textual explanation is only acceptable for everyday actions that are universally understood. Maximizing/minimizing the map isn't one of those in my view, so I'd rather keep the label reachable on every device instead of removing it for the majority of our users, who are on phones.

Two things specifically speak against hiding it on touch:

  1. The tooltip is not desktop-only in practice. bulma-tooltip triggers on :hover, and on touch devices a long press produces exactly that hovered state — so a user who is unsure what the button does can press and hold to read the label before triggering the action, then move their finger away. On top of that, setFullscreenButtonState() in assets/js/hooks.js swaps data-tooltip (and aria-label) to the next action when the state toggles, so the tooltip that remains after tapping "Maximize map" reads "Minimize map" — it explains what the button will do next. Adding has-tooltip-hidden-touch removes both of these for touch users.
  2. It would be inconsistent with the rest of the UI. Our established pattern for small viewports is to reposition tooltips (has-tooltip-left-mobile, used throughout summary.html.heex), not to suppress them. has-tooltip-hidden-touch isn't used anywhere in the codebase today, so this would introduce a second, divergent convention for a single control.

I also don't consider the current behavior a defect. The tooltip staying visible until you tap or pan the map elsewhere is, from my perspective, the best of the available options: it stays around long enough to be read, and it disappears as soon as you interact with the map — which is the very next thing you do. An auto-dismiss timer would be the only alternative I'd seriously consider, and I don't see enough of a problem to justify the extra behavior.

So I'm closing this one. That's not a judgment on the quality of the patch — please don't let it discourage you from opening further PRs. If you run into a case where the tooltip actually obscures something you need to see (rather than just lingering), please open an issue with a screenshot; that would be a different concern and worth solving on its own terms.


🤖 Review drafted with Claude Code (Opus 5 high) — sponsored by Claude for Open Source

@JakobLichterfeld JakobLichterfeld added closed:wontfix This will not be worked on and removed note:discussion Details or approval are up for discussion labels Aug 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

closed:wontfix This will not be worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants