Repository navigation
docs(core): multi-canvas add standalone cities example - #10492
ibgreen-openai wants to merge 1 commit into
Conversation
89c1f3f to
83ef05e
Compare
ba1c9f7 to
c1e6919
Compare
0954aba to
ce2ab1a
Compare
c1e6919 to
2ebef5a
Compare
b2b0105 to
c2f7318
Compare
Greptile SummaryThe PR adds a standalone Vite example demonstrating four independently controlled canvases backed by one
Confidence Score: 5/5The PR appears safe to merge. No blocking failure remains.
|
| Filename | Overview |
|---|---|
| docs/developer-guide/views.md | Adds a repository link to the standalone multi-canvas cities example. |
| test/apps/multi-canvas-cities/app.ts | Configures four canvas-bound views with filtered basemaps and landmark layers, independent controllers, picking, tooltips, and widgets. |
| test/apps/multi-canvas-cities/index.html | Defines four canvases with distinct event-root containers, preventing the previously reported shared-root interaction collision. |
| test/apps/multi-canvas-cities/package.json | Adds standalone Vite start and build scripts using dependency conventions shared by existing test apps. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
Deck[One Deck instance] --> Views[Four MapView instances]
Deck --> Layers[Shared layer stack]
Deck --> Widgets[Per-view zoom widgets]
Views --> NY[New York canvas]
Views --> London[London canvas]
Views --> Tokyo[Tokyo canvas]
Views --> Sydney[Sydney canvas]
Layers --> Filter[layerFilter by viewport ID]
Filter --> NY
Filter --> London
Filter --> Tokyo
Filter --> Sydney
Reviews (2): Last reviewed commit: "docs(core): add standalone multi-canvas ..." | Re-trigger Greptile
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 2ebef5ab7f
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
2ebef5a to
8d0e7ab
Compare
ibgreen
left a comment
There was a problem hiding this comment.
The four-canvas setup is still a distinct example of the core API. One correction before approval: the hover handler rebuilds layers with the same IDs and data, but the attributes behind getRadius and getFillColor depend on hoveredLandmark. Without updateTriggers, deck.gl can retain the previously computed buffers, so the status and automatic picking highlight can update while the custom radius and city colors stay stale. Please add triggers for both accessors keyed on the hovered landmark ID and verify entering a landmark, moving to another city, and clearing hover.
Goal
Provide a complete, easy-to-run example of the multi-canvas API without mixing demo code into the core implementation review.
Changes
Deckinstance.No core implementation changes are included in this PR.
Review stack
master.Validation
./node_modules/.bin/tsc -p modules/core/tsconfig.json --noEmit --pretty falseyarn test-headless test/modules/core/lib/view-manager.spec.ts test/modules/core/lib/deck.spec.ts test/modules/core/lib/deck-renderer.spec.ts test/modules/core/passes/layers-pass.spec.ts test/modules/core/passes/pick-layers-pass.spec.ts test/modules/core/lib/deck-picker.spec.ts test/modules/core/lib/widget-manager.spec.ts test/modules/core/lib/tooltip.spec.ts test/modules/mapbox/mapbox-overlay.spec.ts --retry 1 --silent— 91 passing tests../node_modules/.bin/esbuild test/apps/multi-canvas-cities/app.ts --bundle --format=esm --platform=browser --external:@deck.gl-community/basemap-layers --outfile=/private/tmp/deck-gl-multi-canvas-cities.jsyarn test-website— passes, including the monorepo build; existing dependency source-map and unrelated broken-anchor warnings remain.LoadingWidgettest fails identically on pristinemaster.yarn buildpasses on currentmasterplus the feature stack.