Migrate maps page module to React 19#91
Open
devin-ai-integration[bot] wants to merge 4 commits into
Open
Conversation
Convert the AngularJS maps module (Google Maps, Leaflet, Bubble, Line) to React 19 components mounted via react2angular-style bridge directives. Map libraries initialize in useEffect with cleanup on unmount; baConfig and layoutPaths are injected through the bridge, not read off window. Also wire up the shared React build integration (gulp inject/scripts/ server/build + index.html bundle script) which was not yet present.
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
Address Devin Review: check the cancelled flag inside the inner setTimeout callbacks in MapLinesPage and MapBubblesPage so the chart is not created/written after the component has unmounted.
|
Can we add a globe spinner to just the maps module when it loads? |
Author
|
Added a globe spinner scoped to just the maps module (commit a2bf1a9).
All 36 tests in |
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.
Summary
Migrates the AngularJS
mapspage module (Google Maps, Leaflet, Bubble, Line) to React 19, keeping the four UI-Router routes (#/maps/gmap,/leaflet,/bubble,/line) and exact DOM/IDs the framework-agnostic e2e suite depends on. Themaps.spec.tssuite (36 tests) passes against the migrated module.Each AngularJS controller+template pair becomes a React page under
src/app/react/pages/, rendered inside the shared<Panel>. The map libraries are initialized inuseEffect(with a small poll for the global to load) and torn down on unmount:GoogleMapsPage→new google.maps.Map(...), container cleared on unmountLeafletPage→L.map(...)+ OSM tiles + marker popup,map.remove()on unmountMapBubblesPage/MapLinesPage→ amCharts AmMap,map.clear()on unmountEach child state now renders a bridge directive (
mapsReact.js) instead oftemplateUrl/controller:The amCharts pages need theme colors and asset paths, so the bridge injects
baConfigandlayoutPathsand passes them as props — the components never read them offwindow. The now-unused*Ctrl.js/*.htmlfiles are removed.This is the first module migrated on this branch, so it also adds the shared React build wiring (previously absent):
gulp/inject.js&gulp/scripts.js: excludesrc/app/react/**/*.js(ES modules bundled by webpack, not standalone AngularJS scripts)gulp/server.js: servebuild/reactinserve/serve:e2egulp/build.js:copyReactBundletask copiesbuild/react/bundle.jsinto dist, added tobuildsrc/index.html:<script src="bundle.js"></script>build/react/bundle.jsexporting the four new pagesVerified locally with
gulp serve:e2e(Node 10) +playwright test e2e/maps.spec.ts(Node 20): 36/36 passing.Link to Devin session: https://partner-workshops.devinenterprise.com/sessions/cbb14e99d718435b8fe96bf8ab345da3