Skip to content

docs(core): multi-canvas add standalone cities example - #10492

Open
ibgreen-openai wants to merge 1 commit into
masterfrom
codex/multi-canvas-example
Open

ibgreen-openai wants to merge 1 commit into
masterfrom
codex/multi-canvas-example

Conversation

@ibgreen-openai

@ibgreen-openai ibgreen-openai commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

Goal

Provide a complete, easy-to-run example of the multi-canvas API without mixing demo code into the core implementation review.

image

Changes

  • Add a standalone TypeScript/Vite cities app rendering New York, London, Tokyo, and Sydney into four canvases owned by one Deck instance.
  • Demonstrate independent views, controllers, basemaps, picking/tooltips, and per-view zoom widgets while sharing a device and layer stack.
  • Link the example from the multi-canvas developer guide.

No core implementation changes are included in this PR.

Review stack

  1. fix(core): position widgets relative to their canvas #10491 (merged) — widget/tooltip positioning preparation.
  2. RFC/POC: Extend View system to support multi-canvas rendering #10229 — core multi-canvas implementation, rebased directly onto master.
  3. This PR — standalone example, stacked on RFC/POC: Extend View system to support multi-canvas rendering #10229.

Validation

  • ./node_modules/.bin/tsc -p modules/core/tsconfig.json --noEmit --pretty false
  • yarn 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.js
  • yarn test-website — passes, including the monorepo build; existing dependency source-map and unrelated broken-anchor warnings remain.
  • Full headless browser suite on the restacked branch: 825 tests passed across 201 files; one unrelated LoadingWidget test fails identically on pristine master.
  • The inherited strict Mapbox integration regression passes repeatedly after deterministic first-draw synchronization.
  • yarn build passes on current master plus the feature stack.
  • Repository pre-commit lint/format checks and 21 Node smoke tests pass.

@coveralls

coveralls commented Jul 27, 2026 •

Copy link
Copy Markdown

Coverage Status

coverage: 82.239% (+0.007%) from 82.232% — codex/multi-canvas-example into master

@ibgreen-openai
ibgreen-openai force-pushed the codex/multi-canvas-example branch from c1e6919 to 2ebef5a Compare August 1, 2026 14:24
@ibgreen ibgreen added this to the v9.4 milestone Aug 2, 2026
@ibgreen
ibgreen force-pushed the ib/multi-canvas-rfc branch 2 times, most recently from b2b0105 to c2f7318 Compare August 21, 2026 21:20
@ibgreen
ibgreen marked this pull request as ready for review August 28, 2026 10:48
@greptile-apps

greptile-apps Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

Greptile Summary

The PR adds a standalone Vite example demonstrating four independently controlled canvases backed by one Deck instance and links it from the multi-canvas developer guide.

  • Adds city-specific views, basemaps, landmark layers, picking, tooltips, and zoom widgets.
  • Provides the four-canvas HTML layout and standalone package scripts.
  • Links the example from the views documentation.

Confidence Score: 5/5

The PR appears safe to merge.

No blocking failure remains.

Important Files Changed

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
Loading

Reviews (2): Last reviewed commit: "docs(core): add standalone multi-canvas ..." | Re-trigger Greptile

Comment thread modules/core/src/lib/deck.ts Resolved

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 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".

Comment thread modules/core/src/lib/canvas-manager.ts Resolved
Comment thread modules/core/src/lib/deck.ts Resolved
Base automatically changed from ib/multi-canvas-rfc to master August 28, 2026 11:08
@ibgreen
ibgreen force-pushed the codex/multi-canvas-example branch from 2ebef5a to 8d0e7ab Compare August 28, 2026 11:11
@ibgreen ibgreen changed the title docs(core): add standalone multi-canvas cities example docs(core): multi-canvas add standalone cities example Aug 28, 2026
@ibgreen ibgreen added the doc label Nov 21, 2026

@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.

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.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants