-
Notifications
You must be signed in to change notification settings - Fork 14
feat: embed mode for e&a #1922
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: embed mode for e&a #1922
Conversation
✅ Deploy Preview for veda-ui ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
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.
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. |
|
Yes, embed mode means simplified e&a. We can't directly use The feature is using the existing |
|
@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. |
vgeorge
left a comment
There was a problem hiding this 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.
|
@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 dec 1st should be good! |
|
@slesaad links needed for staging:
Still need to get list of links for stories. |
- # 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)
**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.
This PR introduces an
&embed=trueURL 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:
Other features added:
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=trueat the end of the url in the search bar. At last, reload to see the preview.&embed=trueat the endExample:
https://deploy-preview-1922--veda-ui.netlify.app/exploration?datasets=%5B%7B%22id%22%3A%22VIIRS_SNPP_DayNightBand_At_Sensor_Radiance%22%2C%22settings%22%3A%7B%22isVisible%22%3Atrue%2C%22opacity%22%3A100%2C%22analysisMetrics%22%3A%5B%7B%22id%22%3A%22mean%22%2C%22label%22%3A%22Average%22%2C%22chartLabel%22%3A%22Average%22%2C%22themeColor%22%3A%22infographicB%22%7D%2C%7B%22id%22%3A%22std%22%2C%22label%22%3A%22St+Deviation%22%2C%22chartLabel%22%3A%22St+Deviation%22%2C%22themeColor%22%3A%22infographicD%22%7D%5D%7D%7D%5D&taxonomy=%7B%7D&search=&date=2025-06-27T05%3A00%3A00.000Z&embed=true&zoom=3¢er=[-103.144488,40.6976312]
embed=trueExample:
Todo: