Share/Export plugin: one-click "export to share" of the current dashboard state
Motivation
When someone has a dashboard set up just the way they want — the right layers on, zoomed to the right place, on the right date — there's no obvious way to hand that exact view to a colleague. The link in the address bar does encode the state, but you'd have to know that, and know to copy it, and there's no single "share this" action anywhere in the UI. Science teams routinely want to say "here, look at exactly what I'm looking at" — as a link, or as an image they can drop into a report or a message. Today that's friction; it should be one click.
How it should work
A plugin adds an "export to share" surface to the dashboard — a button that opens a small panel. At the moment you click, it captures the current view and offers:
- A share link — a complete, ready-to-copy URL. Opening it drops another user into the same view (see "What is shared" below). It's a long, self-contained link with no backend behind it — copy it, send it, done.
- A downloadable image — a PNG snapshot of the current map, for pasting into a report, slide, or message.
Hand either one to another person and they see what you saw. The plugin is a thin surface: it asks the framework for the link and the image and presents them. It does not reinvent state capture, and it does not reach into the app's internals.
What is shared (in the link)
The link reflects whatever the framework captures, which today is the current:
- Mission / site
- 2D map center and zoom, and 3D globe center / zoom / camera
- Panel layout
- Visible layers and their opacity (this is also how the basemap / tiling is captured)
- Selected feature, if any
- Viewer image and its position
- Time state (start/end/live/follow), when time is enabled
- State from existing built-in tools that already publish it (Draw files/filters, layer reordering, Shade, Viewshed)
What is NOT shared
So expectations are clear in the UI and the issue:
- State that lives only in newer (modern) plugins is not captured — modern plugins don't contribute to the link yet. ⚠️ If the date/time picker is ever delivered as a modern plugin, the date would silently stop being shared. Closing that gap is separate framework work, not this plugin.
- Runtime layer restyling beyond opacity; unsaved drawn geometry; which tool/panel is open; 2D map rotation.
The plugin should not promise more than this — ideally the panel makes it clear the link captures "the view" (layers, place, zoom, time), not every last interaction.
Done when
Out of scope
- PDF export — explicitly dropped.
- Short links / link shortening — the link is the full self-contained URL.
- Capturing any state the framework's link doesn't already capture (including the modern-plugin gap above) — that's framework work, not this plugin.
- The core API work that exposes the screenshot capability — separate core issue; this plugin depends on it for the image (see below).
Depends on: #143 — the core issue that exposes the share-link and map-screenshot through the public plugin API. The link half is already callable today via the public API, so the hard dependency is really the screenshot — build/merge that core change before the image feature can land cleanly.
Draft implementation plan — written as of d85a6c66 on 2026-06-15. Rough guide; re-verify against latest code.
Current behavior
- Modern TSX plugins (good references:
src/essence/Tools/Card/, minimal: src/essence/Tools/Title/, larger: src/essence/Tools/LayerManager/) share a structure: a config.json plus a *Tool.tsx lifecycle shim (initialize / make(targetId) / destroy) that mounts a React adapter with createRoot. The adapter (MMGIS*Adapter.tsx) talks to the core only through the shared mmgisAPI client in src/essence/Tools/_shared/adapters/ (mmgisAPI.ts, useMMGISHandlerReady.ts) — request/observe/emit. Portable presentational UI lives under the plugin's lib/.
- Registration is the same path as legacy tools:
config.json is scanned at build time into src/pre/tools.js; tools with metadata.modernLayoutSupport: true slot into the modern panel system.
- The link is already available:
mmgisAPI.writeCoordinateURL() returns the full self-contained URL synchronously (src/essence/mmgisAPI/mmgisAPI.js:440). The screenshot is not exposed — that's what the core issue adds.
Where the change lands & rough plan
- New plugin directory under
src/essence/Tools/ (e.g. ShareExport/), modeled on the Card plugin layout:
config.json — name/icon, paths, metadata.modernLayoutSupport: true, sensible preferredPosition/compatiblePositions.
ShareExportTool.tsx — lifecycle shim that mounts the adapter.
MMGISShareExportAdapter.tsx — calls mmgisAPI.writeCoordinateURL() for the link (available now) and the new public screenshot method (from the core issue) for the image.
lib/ — a portable share panel: a "copy link" button and a "download image" button, plus clear copy about what the link captures ("the view," not every interaction).
- The adapter copies the link to clipboard and triggers the image download; no internal-module access.
- Registers automatically once
config.json is in place and the build regenerates the tool manifest.
⚠️ Gotcha: the link half can be built immediately against the existing public method; the image half depends on the core issue's screenshot API. Don't work around a missing screenshot method by importing internal modules — land the core change first, or stub the image button behind the eventual API shape.
References
src/essence/Tools/Card/ — full modern-plugin example (entry shim, adapter, lib/, adapters/, config.json)
src/essence/Tools/Title/ — minimal modern-plugin example
src/essence/Tools/_shared/adapters/mmgisAPI.ts, useMMGISHandlerReady.ts — the plugin↔core client
src/essence/mmgisAPI/mmgisAPI.js — public API surface (writeCoordinateURL already there; screenshot to be added by the core issue)
Share/Export plugin: one-click "export to share" of the current dashboard state
Motivation
When someone has a dashboard set up just the way they want — the right layers on, zoomed to the right place, on the right date — there's no obvious way to hand that exact view to a colleague. The link in the address bar does encode the state, but you'd have to know that, and know to copy it, and there's no single "share this" action anywhere in the UI. Science teams routinely want to say "here, look at exactly what I'm looking at" — as a link, or as an image they can drop into a report or a message. Today that's friction; it should be one click.
How it should work
A plugin adds an "export to share" surface to the dashboard — a button that opens a small panel. At the moment you click, it captures the current view and offers:
Hand either one to another person and they see what you saw. The plugin is a thin surface: it asks the framework for the link and the image and presents them. It does not reinvent state capture, and it does not reach into the app's internals.
What is shared (in the link)
The link reflects whatever the framework captures, which today is the current:
What is NOT shared
So expectations are clear in the UI and the issue:
The plugin should not promise more than this — ideally the panel makes it clear the link captures "the view" (layers, place, zoom, time), not every last interaction.
Done when
Out of scope
Draft implementation plan — written as of d85a6c66 on 2026-06-15. Rough guide; re-verify against latest code.
Current behavior
src/essence/Tools/Card/, minimal:src/essence/Tools/Title/, larger:src/essence/Tools/LayerManager/) share a structure: aconfig.jsonplus a*Tool.tsxlifecycle shim (initialize/make(targetId)/destroy) that mounts a React adapter withcreateRoot. The adapter (MMGIS*Adapter.tsx) talks to the core only through the shared mmgisAPI client insrc/essence/Tools/_shared/adapters/(mmgisAPI.ts,useMMGISHandlerReady.ts) — request/observe/emit. Portable presentational UI lives under the plugin'slib/.config.jsonis scanned at build time intosrc/pre/tools.js; tools withmetadata.modernLayoutSupport: trueslot into the modern panel system.mmgisAPI.writeCoordinateURL()returns the full self-contained URL synchronously (src/essence/mmgisAPI/mmgisAPI.js:440). The screenshot is not exposed — that's what the core issue adds.Where the change lands & rough plan
src/essence/Tools/(e.g.ShareExport/), modeled on the Card plugin layout:config.json— name/icon,paths,metadata.modernLayoutSupport: true, sensiblepreferredPosition/compatiblePositions.ShareExportTool.tsx— lifecycle shim that mounts the adapter.MMGISShareExportAdapter.tsx— callsmmgisAPI.writeCoordinateURL()for the link (available now) and the new public screenshot method (from the core issue) for the image.lib/— a portable share panel: a "copy link" button and a "download image" button, plus clear copy about what the link captures ("the view," not every interaction).config.jsonis in place and the build regenerates the tool manifest.References
src/essence/Tools/Card/— full modern-plugin example (entry shim, adapter,lib/,adapters/,config.json)src/essence/Tools/Title/— minimal modern-plugin examplesrc/essence/Tools/_shared/adapters/mmgisAPI.ts,useMMGISHandlerReady.ts— the plugin↔core clientsrc/essence/mmgisAPI/mmgisAPI.js— public API surface (writeCoordinateURLalready there; screenshot to be added by the core issue)