Skip to content

Add support for Figma Embed Link #28

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

Merged
merged 2 commits into from
Aug 19, 2020
Merged

Conversation

vinpac
Copy link
Contributor

@vinpac vinpac commented Aug 9, 2020

Hi! First, this lib rocks! 🚀

Second, I'm building my blog and realized some embed link were'nt supported yet. My plan was to send a PR for codepen, tweet and other assets, but only figma has block.format.block_height and width to calculate the aspect ratio.

This PR adds support for Figma embed links.

Screenshot of it:

image

@vinpac vinpac changed the title Add support for Figma Asset Add support for Figma Embed Link Aug 16, 2020
Copy link
Contributor

@transitive-bullshit transitive-bullshit left a comment

Choose a reason for hiding this comment

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

LGTM.

I've already added support for a variety of embeds including figma in my fork, but for now I think we should merge this.

Here's a public notion page I created for testing different types of embeds: https://www.notion.so/saasifysh/Embeds-5d4e290ca4604d8fb809af806a6c1749

>
<iframe
className="notion-image-inset"
src={value.properties.source[0][0]}
Copy link
Member

Choose a reason for hiding this comment

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

can we move this into (type === "embed" || type === "video") and add || type === "figma"

and then:

<iframe
          className="notion-image-inset"
          src={type === "figma" ? value.properties.source[0][0] : display_source}
/>

we can also improve the if with
["embed","video","figma"].includes(type)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!

Copy link
Contributor Author

@vinpac vinpac left a comment

Choose a reason for hiding this comment

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

Done!

>
<iframe
className="notion-image-inset"
src={value.properties.source[0][0]}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Sure!

@tobiaslins tobiaslins merged commit ff71e52 into splitbee:master Aug 19, 2020
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