Skip to content

feat(core): Implement async picking TODO items#10020

Merged
ibgreen merged 145 commits intoib/async-deck-pickingfrom
copilot/sub-pr-9733
Mar 28, 2026
Merged

feat(core): Implement async picking TODO items#10020
ibgreen merged 145 commits intoib/async-deck-pickingfrom
copilot/sub-pr-9733

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 20, 2026

Completes the remaining core implementation items from the async deck picking API, specifically wiring up the async path end-to-end and adding test coverage.

Background

The async picking API (pickObjectAsync, pickMultipleObjectsAsync, pickObjectsAsync) was added as a public API surface but the internal implementation had gaps: the async picker methods still called synchronous GPU readback, event-driven hover/click picking skipped WebGPU entirely, and no tests existed for the async paths.

Change List

  • deck-picker.ts: _pickClosestObjectAsync and _pickVisibleObjectsAsync were calling synchronous _drawAndSample internally — replaced with await _drawAndSampleAsync
  • deck.ts_pickAndCallback(): Replaced synchronous _pick with async _pickAsync (fire-and-forget via void + .catch):
    • Removes the WebGPU early-return guard; event picking will work for WebGPU once GPU readback is implemented
    • Clears _pickRequest.event before awaiting to prevent duplicate processing on subsequent frames
    • Snapshots {x, y, radius, mode} before awaiting to avoid race conditions from mouse movement during async GPU readback
    • Errors are forwarded to props.onError
  • Tests: Added Deck#async picking in deck.spec.ts and DeckPicker#pick async empty in deck-picker.spec.ts covering pickObjectAsync, pickMultipleObjectsAsync, and pickObjectsAsync

🔒 GitHub Advanced Security automatically protects Copilot coding agent pull requests. You can protect all pull requests by enabling Advanced Security for your repositories. Learn more about Advanced Security.

chrisgervang and others added 30 commits September 26, 2025 10:09
* Add viewId prop to all widgets for multi-view support

Introduces a standardized `viewId` prop to all widget components, enabling them to attach to specific views when using multiple views. Updates defaultProps, constructors, and setProps methods to handle the new prop, and improves JSDoc comments for clarity. Also adds copyright headers to several files for consistency.

* Refactor widget exports and update overview documentation

Reorganized widget exports in index.ts into clearer categories: navigation, geospatial, view, information, control, and utility widgets. Updated the overview documentation to reflect the new structure and added missing widgets to the lists for improved clarity and discoverability.

* Refactor widget docs to centralize WidgetProps

Updated widget documentation to reference generic WidgetProps from core/widget.md, removing redundant prop listings from individual widget docs. This improves consistency and maintainability by centralizing prop definitions and reducing duplication.

* Add usage sections and version badges to widget docs

Updated documentation for multiple deck.gl widgets to include 'Usage' sections and version badges, improving clarity and consistency.

* Document default prop values for widget API

Updates API reference docs for all widgets to consistently document default values for props, improving clarity for users. Default values are now listed before descriptions for easier reference.

* Add usage section to TimelineWidget docs

* Add source links to widget API docs

* Audit widget docs for missing props

Added documentation for GimbalWidget, InfoWidget, ResetViewWidget, and ScreenshotWidget

* [fix] Invoke onViewModeChange callback on mode select

The ViewSelectorWidget now calls the onViewModeChange callback when the view mode is changed, enabling external handling of view mode changes. Updated documentation to reflect this behavior.

* Remove 'none' option from initialTheme prop docs

Updated the documentation for the ThemeWidget to remove the 'none' value from the initialTheme prop, clarifying that only 'auto', 'light', and 'dark' are valid options.

* Fix merge for context menu widget doc

* Fix inline CSS type

* Refactor widget imports for type-only usage

Updated imports in all widget components to use type-only imports for WidgetProps, WidgetPlacement, and related types from @deck.gl/core.

* Fix link

* Add placement and viewId props to StatsWidget

Introduces 'placement' and 'viewId' properties to StatsWidget for improved positioning and multi-view support.

* Update widget.md

Co-authored-by: felixpalmer <felixpalmer@gmail.com>

* alphabetical

---------

Co-authored-by: felixpalmer <felixpalmer@gmail.com>
* Add deck.gl widgets 9.2 test apps

Renamed and added new example apps for deck.gl widgets 9.2, including single and multi-view setups. Upgraded dependencies to @deck.gl/core, @deck.gl/layers, and @deck.gl/widgets v9.2.0-beta.1. Refactored LayerListWidget to extend Widget from @deck.gl/core.

* fix: zoom transitions in non-geo views

* fix: reset in multi-view apps

* add: button text to theme

* fix: animate and design fps widget

* fix: gimbal in non-default views and multi-views

* fix: timeline themed icon

* fix: stats update on redraw

* fix: loading status was flipped

* stylesheet

* Add --button-text-color CSS variable to docs

Documents the new --button-text-color variable in the widget styling reference, including its default value and link to CSS color documentation.

* types on IconButton

* Refactor widget types for view state support

Updated Widget and ResetViewWidget to support generic view state types using ViewOrViews and ViewStateMap. Matches `Deck`'s initialViewState type

* Update test/apps/widgets-multi-view-9.2/package.json

Co-authored-by: felixpalmer <felixpalmer@gmail.com>

* Update test/apps/widgets-9.2/package.json

Co-authored-by: felixpalmer <felixpalmer@gmail.com>

* Add documentation for widgets with multiple views

Introduces a new section explaining how to position widgets relative to deck.gl views using `viewId` and `placement` props. Provides example configuration and HTML structure, along with remarks and references to related guides.

* Add data filtering to GeoJsonLayer with timeline control

Introduces DataFilterExtension to the GeoJsonLayer, enabling dynamic filtering based on the 'scalerank' property. The timeline widget now updates the filter range interactively, allowing users to control visible features by time.

* Refactor button components for improved type safety and fix lints

* Add customizable --menu-gap CSS variable for menus

* Refactor IconMenu to use elements instead of icon functions

Updated IconMenu and related usage to accept JSX elements for icons instead of icon functions. Adjusted menu item definitions and rendering logic accordingly, and replaced inline menu styles with class-based styling and ButtonGroup/GroupedIconButton components for improved structure and maintainability.

---------

Co-authored-by: felixpalmer <felixpalmer@gmail.com>
* Update docs for luma.gl v9 and API changes

Revised documentation to reflect luma.gl v9 updates, including changes to GPU parameter handling, device initialization, and usage of string constants over WebGL constants.

* Sections and better formatting

* Update upgrade-guide.md

* Remove outdated note about setting GPU parameters

Deleted a note referencing the use of the `onDeviceInitialized` callback and luma.gl's `setParameters` method as an alternative way to set GPU parameters, likely due to deprecation or changes in recommended practices.
Co-authored-by: Chris Gervang <chrisgervang@users.noreply.github.com>
Swapped session times and details for Chris Kapp and Chris Gervang/Adam Krebs, updated speaker images, titles, and company logos. Added a break & networking divider at 14:00 and adjusted subsequent session times to reflect the new schedule.
Pivoting the topic of my taqlk to be more about react google maps in general.
Signed-off-by: dependabot[bot] <support@github.com>
Updated Node.js version requirement and governance links.
Copy link
Copy Markdown
Collaborator

@ibgreen ibgreen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, I will push some improvements and land.

@ibgreen ibgreen merged commit 3bc0dc5 into ib/async-deck-picking Mar 28, 2026
3 checks passed
@ibgreen ibgreen deleted the copilot/sub-pr-9733 branch March 28, 2026 13:18
@chrisgervang chrisgervang added this to the v9.3 milestone Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Tracker: deck.gl v9.3