fix: hide map fullscreen tooltip on narrow viewports - #5640
Conversation
✅ Deploy Preview for teslamate ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
Does this look OK? Did I forget anything? |
|
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:
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 |
What?
Apply the existing
has-tooltip-hidden-touchclass 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
mainbranch.mix ci: 493 tests passed.