Skip to content
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

Prototype embed blocks #602

Merged
merged 3 commits into from
Aug 10, 2023
Merged

Prototype embed blocks #602

merged 3 commits into from
Aug 10, 2023

Conversation

nerik
Copy link
Contributor

@nerik nerik commented Aug 7, 2023

Adds an <Embed /> block that instantiate an iframe for the use case described here.

Sandbox-Fire-—-VEDA-UI

@netlify
Copy link

netlify bot commented Aug 7, 2023

Deploy Preview for veda-ui ready!

Name Link
🔨 Latest commit 6662edb
🔍 Latest deploy log https://app.netlify.com/sites/veda-ui/deploys/64d4aa3ec212c700082ce63c
😎 Deploy Preview https://deploy-preview-602--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 site configuration.

@nerik nerik marked this pull request as ready for review August 7, 2023 10:15
Copy link
Collaborator

@danielfdsilva danielfdsilva left a comment

Choose a reason for hiding this comment

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

@nerik This is definitely a great enhancement to shorten the gap between dashboard and other tools.

I think maybe we should maintain the block/figure structure to have more control and consistency. This would result in a behavior like the Map. What do you think?

<Block>
  <Figure>
    <Embed />
  </Figure>
</Block>

I also tried very quickly to add a window frame (<BrowserFrame> component) to contain the embed, and I think it looks kind of nice. Thoughts?

image

@nerik
Copy link
Contributor Author

nerik commented Aug 7, 2023

@danielfdsilva Excellent suggestions, thanks 👍

While using a BrowserFrame is definitely an improvement, I think this could use a specifically designed wrapper, maybe showing the original URL (with a link to access on another tab, maybe a title and author)

Thoughts @ricardoduplos ?

@danielfdsilva
Copy link
Collaborator

@nerik I like that idea. Maybe instead of making the url fully visible, we can just offer a way to open in a new tab? Otherwise it may look to much like a browser inside a page.

@hanbyul-here
Copy link
Collaborator

Wah it looks so nice 👏 and this will encourage editors to bring in their own content. But I have an open-ended question about how much content should go to iframe vs staying in mdx.

I somehow thought iframe would be strictly about the map, and all other text-based contents will be in mdx. So in the fire example discovery, the text contents such as

Recent fires
Showing large fires that were burning when the fire atlas was last updated. Only includes fires with an area greater than 2.

You can learn more about how to access [this data](https://firenrt.delta-backend.com/collections/public.eis_fire_snapshot_perimeter_nrt) directly in [this VEDA documentation page](https://nasa-impact.github.io/veda-docs/notebooks/tutorials/mapping-fires.html).

will be in mdx file, not in iframed contents. I was thinking in this way so editors don't need to think about making the fonts rights etc. This also means that we eventually need to be 'the editorial desk' to give suggestions for editing iframe contents... which I am unsure is a good idea. 🤔

@nerik
Copy link
Contributor Author

nerik commented Aug 10, 2023

@hanbyul-here Thanks. Good catch. We discussed with @jsignell and she removed the text content from the iframe, which I integrated into the story itself - see NASA-IMPACT/veda-config#295

@danielfdsilva Also added a link to open in a new tab.

@nerik nerik removed the request for review from danielfdsilva August 10, 2023 15:04
@nerik nerik merged commit 6d5e704 into main Aug 10, 2023
8 checks passed
@nerik nerik deleted the feature/embed-block branch August 10, 2023 15:05
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.

3 participants