Skip to content

feat(pydeck): chart gallery examples, ES module custom libraries, community-layer docs - #10665

Merged
chrisgervang merged 6 commits into
masterfrom
claude/pydeck-community-4c3e3g
Oct 1, 2026
Merged

chrisgervang merged 6 commits into
masterfrom
claude/pydeck-community-4c3e3g

Conversation

@chrisgervang

@chrisgervang chrisgervang commented Sep 7, 2026 •

Copy link
Copy Markdown
Collaborator

For #10454

Background

pydeck documents only geospatial views, and settings.custom_libraries only loads classic script bundles, so charts on OrthographicView and OrbitView go undocumented and libraries published only as ES modules cannot be loaded.

Stacked on #10764. The register_library resourceUri fix moved to #10759. Tracked in #10763.

Change List

  • examples/charts/scatter_plot.py, bar_chart.py and surface_plot.py with thumbnails; new "Charts" gallery section
  • settings.register_library(name, uri, module=True); custom_libraries is JSON-encoded in the HTML template with < escaped
  • loadModule(): import ES modules through an inline module script and resolve with the namespace; fetch, parse and evaluation failures reject and can be retried
  • addCustomLibraries: a library that fails to load, or does not define its global, no longer blocks the others; classic scripts are detected from the script load event
  • With the per-layer conversion from fix(jupyter-widget): render layers with extensions from unloaded custom libraries #10764, layers from the libraries that did load still render when another library fails
  • examples/point_cloud_layer.py: move controller to the view, drop the basemap
  • Unit tests: chart examples, ViewState camelCasing, custom_libraries JSON output, ES module loading and failure paths (headless Chromium)
  • Documentation: view_state.rst non-geospatial parameters, view.rst chart views, custom_layers.rst (classic and ES module bundles)

Verified after restacking with make test and the jupyter-widget headless suite.

This description was drafted by an AI coding agent following the guidelines proposed in #10707.


Note

Medium Risk
Changes dynamic third-party script loading and deck initialization when custom libraries fail; mitigated by JSON/script escaping and broad headless tests, but still affects runtime behavior in pydeck HTML and the Jupyter widget.

Overview
Adds non-geospatial chart support to pydeck’s docs and gallery: three new examples (scatter, bar, surface) on OrthographicView / OrbitView with map_provider=None, a Charts gallery section, and guidance in view.rst / view_state.rst for camera parameters and hand-tuned target/zoom.

Extends custom layer loading with pydeck.settings.register_library(name, uri, module=True) for ES modules, documents classic vs ESM bundles in custom_layers.rst, and serializes custom_libraries as script-safe JSON in generated HTML (including < escaping).

On the Jupyter/playground frontend, loadModule dynamic-imports ESM via an inline module script; addCustomLibraries no longer blocks deck init when one library fails—classic scripts resolve on load and verify window[name], with per-URL caching and retries. Layers from libraries that did load still register when siblings fail.

Also tweaks point_cloud_layer (view controller, no basemap) and adds tests for chart examples, ViewState camelCasing, HTML custom_libraries output, and ESM/concurrency failure paths.

Reviewed by Cursor Bugbot for commit effde4d. Bugbot is set up for automated code reviews on this repo. Configure here.

@coveralls

coveralls commented Sep 7, 2026 •

Copy link
Copy Markdown

Coverage Status

No base build to compare — claude/pydeck-community-4c3e3g into master

Copy link
Copy Markdown
Collaborator Author

@greptileai review

bugbot run


Generated by Claude Code

@greptile-apps

greptile-apps Bot commented Sep 7, 2026 •

Copy link
Copy Markdown

RetriggerConfidence Score: 5/5

[Medium risk] Adds chart examples and ES module library loading to pydeck.

The PR appears safe to merge; no outstanding findings or new actionable issues were identified.

Summary

This PR adds non-geospatial chart examples and documentation, ES-module custom-library registration, safer HTML serialization, and custom-library loading that completes even when an entry fails.

  • Adds scatter, bar, and surface charts to the pydeck gallery.
  • Adds ES-module loading and failure-path coverage for the Jupyter widget.
  • Documents chart views and custom-library bundling.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
  A[Registered custom libraries] --> B{Module?}
  B -->|Yes| C[Import ES module]
  B -->|No| D[Load classic script]
  C --> E{Loaded?}
  D --> E
  E -->|Yes| F[Register exports]
  E -->|No| G[Record failure]
  F --> H[Settle entry]
  G --> H
  H --> I[Reconvert deck when all entries settle]
Loading

Reviews (20) · Last reviewed commit: "docs(whats-new): split the pydeck charts..."

Comment thread bindings/pydeck/pydeck/io/html.py Resolved

Copy link
Copy Markdown
Collaborator Author

@greptileai review

bugbot run


Generated by Claude Code

Comment thread bindings/pydeck/docs/view_state.rst Resolved
@chrisgervang
chrisgervang marked this pull request as ready for review September 7, 2026 06:06

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Fix All in Cursor

❌ 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 1ead8af. Configure here.

@chrisgervang
chrisgervang force-pushed the claude/pydeck-community-4c3e3g branch from 5af19eb to b45a093 Compare September 29, 2026 05:26
@chrisgervang
chrisgervang changed the base branch from master to chr/pydeck-community-libraries September 29, 2026 05:26
@chrisgervang chrisgervang mentioned this pull request Sep 29, 2026
12 of 17 tasks
@greptile-apps

greptile-apps Bot commented Sep 29, 2026 •

Copy link
Copy Markdown

Comments Outside Diff

These findings could not be posted inline.

  • P1 Gallery example needs unreleased bundle bindings/pydeck/examples/extensions/zoom_opacity_extension.py:24 ▶

    The gallery now links to an example whose required bundle is described in the accompanying documentation as working only after a future deck.gl-community release includes it. Until that release is available, ZoomOpacityExtension cannot load, so the advertised zoom-dependent visualization does not render.

@chrisgervang chrisgervang added this to the v9.4 milestone Sep 29, 2026
@chrisgervang
chrisgervang force-pushed the claude/pydeck-community-4c3e3g branch from b45a093 to 8502c49 Compare September 29, 2026 05:51
Comment thread bindings/pydeck/docs/view.rst Resolved
@chrisgervang
chrisgervang force-pushed the claude/pydeck-community-4c3e3g branch from f6b38c3 to 5f105c0 Compare September 29, 2026 16:02
@chrisgervang
chrisgervang removed this pull request from stack #10766 September 30, 2026 21:37
@chrisgervang
chrisgervang force-pushed the claude/pydeck-community-4c3e3g branch from 1f1674c to b2a1f17 Compare September 30, 2026 21:37
@chrisgervang
chrisgervang changed the base branch from chr/pydeck-community-libraries to chr/jupyter-widget-custom-extensions September 30, 2026 21:37

@ibgreen ibgreen left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice, Does this even support ESM custom modules!?!

@chrisgervang
chrisgervang force-pushed the claude/pydeck-community-4c3e3g branch from b2a1f17 to 4cb949e Compare October 1, 2026 22:11
Base automatically changed from chr/jupyter-widget-custom-extensions to master October 1, 2026 22:31
chrisgervang and others added 5 commits October 1, 2026 15:31
register_library(name, uri, module=True) imports an ES module and registers its exports. The
custom_libraries entries are inlined as JSON with "<" escaped. A library that fails to load, or
does not define its global, no longer blocks the registration of the others.
@chrisgervang
chrisgervang force-pushed the claude/pydeck-community-4c3e3g branch from 3e3e8c1 to f1c0e68 Compare October 1, 2026 22:32
@chrisgervang
chrisgervang merged commit 3585425 into master Oct 1, 2026
8 checks passed
@chrisgervang
chrisgervang deleted the claude/pydeck-community-4c3e3g branch October 1, 2026 23:50
@chrisgervang chrisgervang modified the milestones: v9.4, v9.4 patch releases Oct 4, 2026
@chrisgervang chrisgervang mentioned this pull request Oct 7, 2026
53 of 66 tasks
chrisgervang added a commit that referenced this pull request Oct 22, 2026
…munity-layer docs (#10665)

* feat(pydeck): chart gallery examples on non-geospatial views

* feat(pydeck): load ES module custom libraries

register_library(name, uri, module=True) imports an ES module and registers its exports. The
custom_libraries entries are inlined as JSON with "<" escaped. A library that fails to load, or
does not define its global, no longer blocks the registration of the others.

* test(jupyter-widget): layers from loaded libraries render when another library fails

* docs(whats-new): pydeck charts and ES module libraries

* docs(pydeck): capitalize the BEST constant in the bar chart example

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GoghM5SYvzaConbutwAw21

* docs(whats-new): split the pydeck charts and ES module highlights

Co-Authored-By: Claude Fable 5.1 <[email protected]>
Claude-Session: https://claude.ai/code/session_01GoghM5SYvzaConbutwAw21

---------

Co-authored-by: Claude <[email protected]>
(cherry picked from commit 3585425)
@chrisgervang

Copy link
Copy Markdown
Collaborator Author

The @deck.gl/jupyter-widget changes are released in deck.gl 9.4.1. The pydeck examples and docs ship with the next pydeck release (#10763).

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.

4 participants