Skip to content

Conversation

@ram-sharan25
Copy link
Contributor

@ram-sharan25 ram-sharan25 commented Nov 17, 2025

This PR introduces an &embed=true URL parameter that transforms the standard exploration view into a minimal, simplified dashboard optimized for embedding in an <iframe>. This view removes standard E&A (Explore and Analyze) components, focusing only on essential visualization elements: the map/visualization layer, the legend, and a date/time-change component. This significantly reduces visual clutter and load time for external embeds.

Uses:

  • MapBlock for single-layer viewing as well as comparison of two datasets.
  • TimelineDatePicker for the calendar.

Other features added:

  • zoom to a particular area on the map (using zoom and center url params)
  • comparison slider with two different sliders
  • calendar selection in embed mode

To test:
Currently, there is no interface to create the embedding link. You can add a layer you want to embed (or also can compare two datasets) edit the url by adding &embed=true at the end of the url in the search bar. At last, reload to see the preview.

Example:

Todo:

  • date picker
  • date boundary in the ui
  • zoom, center

@netlify
Copy link

netlify bot commented Nov 17, 2025

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit fb8bedb
🔍 Latest deploy log https://app.netlify.com/projects/veda-ui/deploys/6920e396e1ca4d00087b8fe2
😎 Deploy Preview https://deploy-preview-1922--veda-ui.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@ram-sharan25 ram-sharan25 changed the title Embed e and a feat: embed mode for a&a Nov 17, 2025
@ram-sharan25 ram-sharan25 requested a review from slesaad November 17, 2025 20:17
@ram-sharan25 ram-sharan25 marked this pull request as draft November 17, 2025 23:06
@ram-sharan25 ram-sharan25 marked this pull request as ready for review November 19, 2025 22:38
@aboydnw
Copy link
Contributor

aboydnw commented Nov 20, 2025

I like this idea! Just to check my understanding, when we say "embed mode" here, we pretty much mean "simplified version of E&A," right?

Asking because I am curious if there is anything else about this PR that makes E&A (or any map interface) easier to place in an iframe. If so, that would be useful to know about so we can implement in other places.

For the "simplified version of E&A" part, I am thinking about our MultiLaterMapBlock that we did earlier in the year. It seems to be focusing on a very similar use case.

I want to embed a straightforward map visualization onto my website so that users can simply "see the data" without worrying about all the extra capabilities that other tools have.

If so, maybe there is some work we can do on the MultiLayerMapBlock to make it more useful? Or somehow merge these efforts? Just trying to avoid having two things that serve a similar purpose.

@slesaad slesaad changed the title feat: embed mode for a&a feat: embed mode for e&a Nov 20, 2025
@slesaad
Copy link
Member

slesaad commented Nov 21, 2025

Yes, embed mode means simplified e&a.

We can't directly use MultiLayerMapBlock because it's a component that has to be put on a page to be viewable - you can't get to it via an url which is needed for iframing, which this PR adds the support for.

The feature is using the existing MapBlock component used in the stories to build out this feature and I've asked Ram to look into the MultiLayerMapBlock component to see if we can take some pointers from that too.

@ram-sharan25
Copy link
Contributor Author

@vgeorge @dzole0311 Can you please look at this and let me know if there is anything I need to change before we can merge this ? It is time-sensitive.

Copy link
Contributor

@vgeorge vgeorge left a comment

Choose a reason for hiding this comment

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

@ram-sharan25 This seems to work as expected. I think we can better organize the atoms and component files related to the embed feature, but lets address on a separated PR to avoid blocking you work.

@vgeorge vgeorge merged commit 67cf145 into main Nov 25, 2025
11 checks passed
@vgeorge vgeorge deleted the embed-e-and-a branch November 25, 2025 13:02
@vgeorge
Copy link
Contributor

vgeorge commented Nov 25, 2025

@ram-sharan25 this was merged to main and will be release in the next scheduled cycle, which is Dec 1st. Please let us know if you need to release it sooner.

@vgeorge vgeorge mentioned this pull request Nov 25, 2025
6 tasks
@slesaad
Copy link
Member

slesaad commented Nov 25, 2025

@vgeorge dec 1st should be good!

@Jeanne-le-Roux
Copy link

@slesaad links needed for staging:

  • U.S. Gridded Anthropogenic Methane Emissions Inventory; Total Methane (annual) layer; centered on CONUS; 2020
  • GRA²PES Greenhouse Gas and Air Quality Species; CO₂ Emissions layer; centered on CONUS; July 2021
  • Black Marble Nighttime at Sensor Radiance; Nighttime at Sensor Radiance layer; centered on CONUS; can we just default to the latest date? If not, use Aug 18, 2025
  • MiCASA Land Carbon Flux; (Monthly Mean) Net Primary Production (NPP) layer; centered on CONUS; can we just default to the latest date? If not, use Dec 2024

Still need to get list of links for stories.

slesaad added a commit to US-GHG-Center/veda-config-ghg that referenced this pull request Dec 9, 2025
- # Changelog
- ## 🎉 Features
- feat: Expose VedaMap
[#1878](NASA-IMPACT/veda-ui#1878)
- feat: migrate ExternalLinkFlag to USWDS
[#1887](NASA-IMPACT/veda-ui#1887)
- feat: Share button to URL shortener
[#1905](NASA-IMPACT/veda-ui#1905)
- feat: embed mode for e&a
[#1922](NASA-IMPACT/veda-ui#1922)
- ## 🚀 Improvements
  - chore: trigger netlify redeploy
- refactor: Preset selector
[#1874](NASA-IMPACT/veda-ui#1874)
- refactor: retire Collecticons
[#1893](NASA-IMPACT/veda-ui#1893)
- refactor: migrate dataset layer card icons to USWDS
[#1891](NASA-IMPACT/veda-ui#1891)
- refactor: Replace Collecticons in legacy footer and connections
section [#1890](NASA-IMPACT/veda-ui#1890)
- refactor: migrate catalog components to USWDS (except catalog-card)
[#1888](NASA-IMPACT/veda-ui#1888)
- ci: prevent cleanup from deleting latest valid release tag
[#1910](NASA-IMPACT/veda-ui#1910)
- ci: disable the slack notifications until we stabilize the release
workflow [#1909](NASA-IMPACT/veda-ui#1909)
- ci: re-enable slack notifications for failed releases
[#1911](NASA-IMPACT/veda-ui#1911)
- docs: Update development instructions for storybook
[#1914](NASA-IMPACT/veda-ui#1914)
- test: Add micasa to mock datasets for testing cmr timeseries
[#1896](NASA-IMPACT/veda-ui#1896)

 
- ## 📊 Dataset Updates
- fix: Updates for SEDAC dataset landing
page[#840](#840)
- ## 📝 Stories Updates
 - ## 🐛 Fixes
- fix: make release workflow idempotent and reset version to last
successful release
[#1908](NASA-IMPACT/veda-ui#1908)
- fix: wmts copy url
[#1886](NASA-IMPACT/veda-ui#1886)
- fix: 744/search bar fix
[#1903](NASA-IMPACT/veda-ui#1903)
- fix: Rename React component files from .js to .jsx
[#1901](NASA-IMPACT/veda-ui#1901)
- fix: migrate scrollytelling from CollecticonCircleXmark to USWDS
[#1885](NASA-IMPACT/veda-ui#1885)
- fix: remove Collecticons from EmptyHub and TimelineZoomControls
components [#1884](NASA-IMPACT/veda-ui#1884)
- fix: [veda-ui-1864] Update colormapscale to default to mdx rescale
[#1916](NASA-IMPACT/veda-ui#1916)
- fix: properly load API_URL_SHORTENER_ENDPOINT through VedaUI context
[#1924](NASA-IMPACT/veda-ui#1924)
- fix: Guided tour doesn't work in exported ExplorationAndAnalysis
component [#1921](NASA-IMPACT/veda-ui#1921)
- fix: selected pill alignment in data-catalog layer component
[1932](NASA-IMPACT/veda-ui#1932)
- fix: update compare swiper interactions to prevent interaction with
map controls [#1930](NASA-IMPACT/veda-ui#1930)
- fix: guard WMS date domain lookup in scrollytelling
[1926](NASA-IMPACT/veda-ui#1926)
- fix: update cmr query key to cache bust on start and end date
[#1928](NASA-IMPACT/veda-ui#1928)
- fix: add missing export for embedded exploration
[#1933](NASA-IMPACT/veda-ui#1933)
- fix: 1068 update mapbox compare
[#1947](NASA-IMPACT/veda-ui#1947)
- fix: Fix EMIT Bug with Overlapping Plumes
[#798](US-GHG-Center/ghgc-architecture#798)
ifsimicoded added a commit that referenced this pull request Dec 9, 2025
**Related Ticket:** 
Relates to the work completed in PR #1922 
Closes #1929 

### Description of Changes
This PR addresses some of the issues that came up when the "embed" mode
was created for the GHGc portal. Details in the related ticket. Note,
because the entire app is 'embeddable', I've changed the name of this
view to be 'simple' mode. (Most of the changes are renames).

⚠️ @slesaad Note that I've changed the URL parameter to viewMode=simple,
so this will need to be updated in downstream consumers when the package
is updated.

### Validation / Testing
Ensure viewMode=simple renders the simple view, and any other viewMode
renders the usual E&A view. embed should no longer alter the view.
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.

7 participants