Conversation
This was referenced Sep 17, 2026
Closed
Give each tool one address derived at build time, and have core mint and release its bus handle
#422
Closed
CarsonDavis
marked this pull request as ready for review
September 17, 2026 21:05
slesaad
added this pull request to stack #459
September 18, 2026 16:15
slesaad
self-requested a review
September 21, 2026 21:58
slesaad
approved these changes
Sep 21, 2026
MMGIS resets the user agent's outline globally, and the card's buttons follow the app rather than making an exception of themselves. The first action is still focused when a card opens.
Replace the plugin's own overlay tooltip with map:showPopup / map:hidePopup, so the card is placed by the map library, tracks the ground, and reports how it closed on the request's own promise. Analyze hands the feature to the analysis consumers; Cancel and a dismissal clear the selection; a card that code took down leaves it alone. Delete AOITooltip.tsx and its styling, hold the deferred show in a pending token so moveend, the fallback timer and a rejected fit arbitrate to one card, retract the current card at the start of a new selection, and suspend and restore the card around a drawing session. Rename selectionTooltipAnchor to selectionPopupAnchor.
Leaflet closes a popup on preclick, before the click reaches the engine's feature-click listener, so on a second Inspect click the open card answers dismiss before the new selection is applied and retracting it first cannot un-settle it. Capture the selection a card is requested for and act on its outcome only while that selection is still current. Disarm a pending show in _clearSelection, before its guard, so no caller leaves a ghost card to open up to 1.5s later. Fall back to a generic title when a feature name is blank, which the service would otherwise reject, stranding the selection with no way to analyze or cancel it. Report a failed restore instead of leaving an unhandled rejection. Fold overlapping popup tests together and trim comments.
Bring back the three checks the test merge dropped: destroy removes the selection layer, leaves no current selection, and unhooks its subscriptions. Assert that superseding a selection disarms the show it was waiting on. Correct the retract-first comment, which claimed an answer arriving during the camera flight could no longer reach the selection — that is the case the capture-compare exists for.
The results panel takes AOI's slot after an analysis and unloads itself when its header close is pressed, leaving the selection outlined on the map with nothing left to act on it. Watch the lifecycle listing core already broadcasts and clear the selection as the panel goes away. Only the transition counts: plugins:changed reports the whole listing on every lifecycle move, with the results panel unloaded through all of them, so the state on its own is no reason to drop a selection.
This reverts commit 0984597.
slesaad
force-pushed
the
feature/299-aoi-popup-migration-v3
branch
from
September 21, 2026 22:01
8bc88d4 to
3bb30a9
Compare
4 tasks
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.
The AOI analyze/cancel card is no longer an overlay the plugin draws itself. It is the map library's own popup, requested from the core popup service.
Closes #299
Last of three PRs: engine placement (#454) → core popup service (#455) → this AOI migration. Stacked on #455. This is the PR where the change shows on screen.
The card is the map's own popup
Before, the card was a React component the tool rendered and closed itself: it did not track the ground, had no close control, and nothing clipped it. Now it comes from the popup service, so in the Demo Dashboard it sticks to the area through pan and zoom, carries the library's ×, and clips at the edge.
When the card appears, and how it waits for the camera
A search result, an Inspect click, a finished drawing and an upload all end the same way: the area is outlined, the map frames it if needed, and the card appears once above the selection. Already in view, it opens at the centroid; if the camera moves, the card waits for it to settle — 1.5 s safety net, pre-move view if framing fails — so it never flashes at the corner.
How it closes, and what happens to the selection
Analyze area hands the feature to analysis and leaves the outline up. Cancel, the ×, and a single click on the map close the card and clear the selection and outline; a click inside the panel does nothing. Click a second state in Inspect and you get its card. The card remembers which selection it belongs to, so a late close from the old card cannot clear the new selection.
Starting a drawing puts the card away
Starting a drawing retracts the card but keeps the previous selection outlined — otherwise it would sit there all session offering to analyze an area you are replacing. Back out before the first vertex and the card comes back. The first vertex drops the old outline. EXIT takes the card with it, including one still waiting on the camera.
Closing the results panel clears the outline
After Analyze, AOI hides its own panel and the Chart plugin's Analysis results panel takes its place. Before, closing that panel with its × left the outline on the map with no panel to clear it from; only exiting AOI itself removed it. AOI now listens to the framework's plugin-state announcements and clears the selection when the results panel goes from open to unloaded, and only on that transition, since the announcement fires for every plugin change in the app. Demo mission: draw a shape, Analyze, close the results panel; the outline goes with it. AOI's own panel stays hidden afterwards, as it did before.
What the plugin lost, and the generic title
AOITooltip.tsxand the.aoi-tooltipstyles are deleted; no popup component or styling remains in the plugin. A selection with a blank name gets the title "Selected area": the service refuses a card with neither title nor body, which would strand the selection with no way to analyze or cancel.Unchanged, and not here
Switching tools still clears the selection, Cancel still fires
drawingCancelled, and requests still go through the global MMGIS API. The shape-picker and line/point bounds fixes are separate PRs.Decisions to review
drawingCancelledfires only for the Cancel button. Adismiss(× or map click) clears the selection directly, so consumers hear onlydrawingCleared. The alternative is routingdismissthe same way, so abandoning an area is one event.map:hidePopup, issued at four points without knowing whether the card in core's single slot is AOI's. It replaces an id-scoped overlay removal; as written, any plugin can dismiss another's popup. Ownership is planned for a later PR.