feat(mapbox): Add widget support to MapboxOverlay via IControl adapter - #9963
Open
chrisgervang wants to merge 9 commits into
Open
feat(mapbox): Add widget support to MapboxOverlay via IControl adapter#9963chrisgervang wants to merge 9 commits into
chrisgervang wants to merge 9 commits into
Conversation
chrisgervang
force-pushed
the
chr/mapbox-widget-support
branch
from
February 4, 2026 23:24
40d85b9 to
9426c8c
Compare
chrisgervang
force-pushed
the
chr/mapbox-widget-support
branch
from
February 27, 2026 19:08
79355a6 to
287b467
Compare
chrisgervang
force-pushed
the
chr/mapbox-widget-support
branch
from
March 9, 2026 18:06
287b467 to
e793c90
Compare
Pessimistress
approved these changes
Mar 10, 2026
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
There are 3 total unresolved issues (including 2 from previous reviews).
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, have a team admin enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit afec60a. Configure here.
Widgets with `viewId: 'mapbox'` are extracted from the deck overlay and wrapped as native map IControl instances, positioning them alongside native controls like NavigationControl. - Add DeckWidgetControl IControl adapter - Update MapboxOverlay to process widgets and manage control lifecycle - Suppress widget margin inside basemap control containers (CSS) - Add unit tests for widget support in MapboxOverlay - Add "Using Widgets" guide to MapboxOverlay docs - Add whats-new entry Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
chrisgervang
force-pushed
the
chr/mapbox-widget-support
branch
from
June 12, 2026 18:06
76f0325 to
c3668c5
Compare
…chr/mapbox-widget-support
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.

Closes #9962
Background
Enable deck widgets to coexist with native Mapbox/MapLibre controls without DOM overlap by rendering widgets with
viewId: 'mapbox'into the map's control container system via the new_containerprop.Change List
DeckWidgetControlclass that wraps deck widgets as Mapbox IControlsviewId: 'mapbox'in MapboxOverlay, automatically wrapping them as IControlswidget.props._containerto Mapbox-positioned element so WidgetManager appends thereNote
Medium Risk
Touches overlay lifecycle, map control registration, and widget DOM mounting; mistakes could leak controls or break widget updates on setProps/remove.
Overview
MapboxOverlay can now place deck.gl widgets in the same control stack as native Mapbox/MapLibre UI (e.g.
NavigationControl) so they do not overlap deck’s overlay container.Widgets with
viewId: 'mapbox'are wrapped asIControlinstances via a newDeckWidgetControl.MapboxOverlayregisters those controls on the map, sets each widget’s_containerbeforeDeck/WidgetManagerrun, and reuses controls whensetPropspasses new widget instances with the same id and placement. Overlay removal avoids mutating the map’s control list duringmap.remove()iteration.Widget CSS drops extra margin when widgets sit inside
deck-widget-ctrl. Docs describe default vs map-positioned widgets and limitations (view controls, screenshot in interleaved mode, fullscreencontainer). Tests and the Map mock cover control lifecycle, placement, and cleanup.Reviewed by Cursor Bugbot for commit 5474ab7. Bugbot is set up for automated code reviews on this repo. Configure here.