Repository navigation
feat(pydeck): chart gallery examples, ES module custom libraries, community-layer docs - #10665
Conversation
|
@greptileai review bugbot run Generated by Claude Code |
|
|
@greptileai review bugbot run Generated by Claude Code |
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ 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.
5af19eb to
b45a093
Compare
Comments Outside DiffThese findings could not be posted inline.
|
b45a093 to
8502c49
Compare
f6b38c3 to
5f105c0
Compare
1f1674c to
b2a1f17
Compare
ibgreen
left a comment
There was a problem hiding this comment.
Nice, Does this even support ESM custom modules!?!
b2a1f17 to
4cb949e
Compare
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.
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01GoghM5SYvzaConbutwAw21
3e3e8c1 to
f1c0e68
Compare
Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01GoghM5SYvzaConbutwAw21
…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)
|
The |

For #10454
Background
pydeck documents only geospatial views, and
settings.custom_librariesonly loads classic script bundles, so charts onOrthographicViewandOrbitViewgo undocumented and libraries published only as ES modules cannot be loaded.Stacked on #10764. The
register_libraryresourceUrifix moved to #10759. Tracked in #10763.Change List
examples/charts/scatter_plot.py,bar_chart.pyandsurface_plot.pywith thumbnails; new "Charts" gallery sectionsettings.register_library(name, uri, module=True);custom_librariesis JSON-encoded in the HTML template with<escapedloadModule(): import ES modules through an inline module script and resolve with the namespace; fetch, parse and evaluation failures reject and can be retriedaddCustomLibraries: 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 eventexamples/point_cloud_layer.py: movecontrollerto the view, drop the basemapViewStatecamelCasing,custom_librariesJSON output, ES module loading and failure paths (headless Chromium)view_state.rstnon-geospatial parameters,view.rstchart views,custom_layers.rst(classic and ES module bundles)Verified after restacking with
make testand 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/OrbitViewwithmap_provider=None, a Charts gallery section, and guidance inview.rst/view_state.rstfor camera parameters and hand-tunedtarget/zoom.Extends custom layer loading with
pydeck.settings.register_library(name, uri, module=True)for ES modules, documents classic vs ESM bundles incustom_layers.rst, and serializescustom_librariesas script-safe JSON in generated HTML (including<escaping).On the Jupyter/playground frontend,
loadModuledynamic-imports ESM via an inline module script;addCustomLibrariesno longer blocks deck init when one library fails—classic scripts resolve on load and verifywindow[name], with per-URL caching and retries. Layers from libraries that did load still register when siblings fail.Also tweaks
point_cloud_layer(viewcontroller, no basemap) and adds tests for chart examples,ViewStatecamelCasing, HTMLcustom_librariesoutput, 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.