[WC-3429] Complete LeafletMap MobX migration with ViewModel#2274
Closed
iobuhov wants to merge 16 commits into
Closed
[WC-3429] Complete LeafletMap MobX migration with ViewModel#2274iobuhov wants to merge 16 commits into
iobuhov wants to merge 16 commits into
Conversation
- Wire MapsContainer into Maps.tsx via useMapsContainer + ContainerProvider - Add MapsWidget observer component reading gate props and services - Add CurrentLocationService (reactive showCurrentLocation handling, stale-request guard, clears location when disabled) - Add injection-hooks following the gallery-web pattern - Rewrite LeafletMap on the imperative Leaflet API; drop react-leaflet and @types/react-leaflet; add explicit mobx + mobx-react-lite - Remove legacy useLocationResolver from utils/geodecode.ts - Replace react-leaflet snapshots with structural LeafletMap tests (15), add CurrentLocationService tests (6) and Maps integration tests (2) - Add OpenSpec change complete-mobx-migration (tdd-refactor schema) Tests: 77 passed across 9 suites; tsc and eslint clean; Maps.mpk builds Co-Authored-By: Claude <noreply@anthropic.com>
…ct marker utils, fix linting Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…package" This reverts commit a8ed724.
…ived in maps-web) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…emove baseMapLayer utility Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
… cleanup Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…/tile-layer.ts Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…fect Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
…tile-layer utility Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Collaborator
Author
|
Closing this PR from fork. Reopening from main repo branch for easier collaboration. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull request type
Refactoring (e.g. file rename, variable rename, etc.)
Description
This PR completes the MobX migration for the LeafletMap component by:
Key Changes:
LeafletMapViewModelto handle all map logic with MobX reactionsLeafletMap.tsxcomponent (removed 184 lines) to focus on renderingsrc/utils/leaflet-markers.tsuseLeafletMapVMinjection hookArchitecture:
LeafletMapViewModel): Manages map instance, tile layer, markers, and reactivityLeafletMap): Pure presentational component using ref callback for setupLocationResolverServiceandCurrentLocationServiceTesting:
Impact:
This PR builds on the existing MobX infrastructure and completes the migration started in the parent branch.
What should be covered while testing?
Test in Mendix Studio Pro: