Move AOI's analyze and cancel card onto the core popup service - #424
Draft
CarsonDavis wants to merge 3 commits into
Draft
Move AOI's analyze and cancel card onto the core popup service#424CarsonDavis wants to merge 3 commits into
CarsonDavis wants to merge 3 commits into
Conversation
AOI asks core for its card with plain data through its own handle and acts on how the card closed: Analyze runs the analysis, Cancel, the X, Escape and an empty-map click clear the selection, and a card that code replaced or retracted leaves the selection alone. Starting a drawing parks the selection and takes the card down; cancelling before a vertex puts both back. The tool's own tooltip component and its styles are gone, and the centroid and bounds helpers handle lines and points.
…' into feature/299-aoi-popup-migration-v2
…' into feature/299-aoi-popup-migration-v2
This was referenced Sep 10, 2026
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.
AOI's analyze card is now the core popup, and every way of closing it clears the selection.
Closes #299
The analyze card is the core popup
Previously the card was AOI's own tooltip, mounted through the overlay API with its own CSS. A plugin cannot ship DOM across a sandbox boundary, so the card had to become data. It is now the core card, same "Analyze area" then "Cancel" order, label on top, anchored above the selection's centre. Demo mission: search a state.
What each way of closing does
Analyze is unchanged: it hands the selected feature to the statistics and chart plugins and leaves the highlight up. Previously only Cancel cleared the selection, and closing an old card could clear the selection underneath, so AOI retracted the card before every camera move. Now Cancel, the X, Escape and a click on empty map all clear the selection and its highlight; a card that code replaced or retracted leaves it alone. A click on a feature dismisses nothing, so a new selection replaces the open card. Demo mission: all four, then a second state.
Drawing over a selection
Previously the card sat there through the whole drawing session. Now starting a drawing parks the selection and takes the card down, cancelling before a vertex restores both, and the first vertex drops it for good. Demo mission: open a card, draw, press Escape; repeat and click once.
Shape identity, lines and points
The panel follows the shape the engine actually started, not the button pressed, visible when switching shape mid-session. Centroid and bounds now handle linestrings and points too. Demo mission: shape identity yes; lines and points only if the mission's draw shapes include them, unlike the default three.
Closing AOI mid-flight
Previously a selection made and instantly closed could leave an orphan card up to 1.5 s later. Now core closes it on destroy, and a selection superseded before its card opens never opens one. Demo mission: select, then close AOI. The tooltip component and its styles are gone, and the unused
drawingCancelledevent with them.Decisions to review
drawstartretracts the card but keeps the selection, the first vertex drops it (plugin:aoi:drawingClearednow fires mid-session, not at completion), anddrawcancelreopens the old card. The restore re-anchors without re-framing, so a selection panned off screen gets its card at the view centre.title, rendered as text, not as anhtmlbody. Labels from boundary data and uploads cannot inject markup, but the body slot stays unused, so a future "size under the name" needs a contract change, not a payload change.plugin:aoi:drawingCancelledis gone from AOI's emitted contract. Nothing in the repo listens, so the blast radius is zero today, though it matters more once plugins are third-party artifacts. The alternative was keeping it on a secondary press.