fix(webapp): the map stays visible while placing a marker (#1251) #1252

Merged
claude-bot merged 1 commit from fix/map-placing-blank into main 2026-10-28 04:19:22 +00:00
Collaborator

Closes #1251.

Pressing Add a marker blanked the map. MapCanvas rendered the Leaflet container's className with the --placing modifier. When placing began, React rewrote that attribute and wiped the classes Leaflet adds to the same element. Without leaflet-container, the global img { max-width: 100% } shrank every tile to nothing.

  • The rendered className is now constant. qmap__canvas--placing is toggled with classList in an effect.
  • Regression test in MapCanvas.test.jsx, using the real Leaflet. It fails on the old code and passes now. MapCanvas.test.jsx and Map.test.jsx both pass (18 tests), and eslint is clean.
  • Changelog fragment changelog.d/1251-map-placing-blank.fixed.md.

🤖 Generated with Claude Code

Closes #1251. Pressing **Add a marker** blanked the map. `MapCanvas` rendered the Leaflet container's `className` with the `--placing` modifier. When placing began, React rewrote that attribute and wiped the classes Leaflet adds to the same element. Without `leaflet-container`, the global `img { max-width: 100% }` shrank every tile to nothing. - The rendered `className` is now constant. `qmap__canvas--placing` is toggled with `classList` in an effect. - Regression test in `MapCanvas.test.jsx`, using the real Leaflet. It fails on the old code and passes now. `MapCanvas.test.jsx` and `Map.test.jsx` both pass (18 tests), and eslint is clean. - Changelog fragment `changelog.d/1251-map-placing-blank.fixed.md`. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(webapp): the map stays visible while placing a marker (#1251)
All checks were successful
CI / Summarisation accuracy eval harness (stub provider) (pull_request) Successful in 1m0s
CI / Backend lint (ruff) (pull_request) Successful in 31s
CI / Does this change touch the recording path? (pull_request) Successful in 16s
CI / Feedback site tests (pull_request) Successful in 47s
CI / Synthetic session harness (no GPU, no LLM) (pull_request) Has been skipped
CI / Which journeys does this change need? (pull_request) Successful in 13s
CI / Bot/backend version sync (pull_request) Successful in 1m7s
CI / Bot tests and audit (pull_request) Successful in 2m6s
CI / Frontend (shard 2/2) (pull_request) Successful in 8m3s
CI / Docker image build (pull_request) Successful in 8m32s
CI / Frontend (shard 1/2) (pull_request) Successful in 9m34s
CI / Backend migration, tests, and audit (pull_request) Successful in 37m54s
CI / End-to-end journeys (desktop) (pull_request) Successful in 33m45s
1c296425b3
MapCanvas rendered the Leaflet container's className with the placing
modifier, so React rewrote the attribute when placing began and wiped
Leaflet's own classes. Without leaflet-container, the global
img { max-width: 100% } squashed every tile to nothing. The rendered
className is now constant and the modifier is toggled with classList.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude-bot deleted branch fix/map-placing-blank 2026-10-28 04:19:22 +00:00
Sign in to join this conversation.
No description provided.