-
Notifications
You must be signed in to change notification settings - Fork 43
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: add iframe block #859
Conversation
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.
Apart from the individual comments, I'm wondering whether the block name is not too technical, but I don't have any counter-propositions.
@kariae I've pushed some simple visual changes. But I'd like to see a few more. I'm not a fan of the Embed Block placeholder style and I think it looks messy having a URL input and a Button on 2 different row. I much prefer the Image Block placeholder style. For the Height/Width settings, can we use something similar to the Cover Block regarding the unit? At the moment it's hard-coded in the input. I'm not sure we need to have the "Preview" state when the block is unfocused. The editor "jumps" when I click on the block. Plus, there's already a button in the toolbar to show the preview. |
@thomasguillot thank you for the feedback.
If we do go with the Image Block placeholder style, I'll add an
I like this one, I'll add it.
After using the block on some posts I can confirm that. I'll remove it :) |
What's the status here? I was waiting for an approval from @thomasguillot as a sign that design-wise the work is done. |
@adekbadek all good from my side, if @thomasguillot 👍 I fix the conflicts and this should be good to go. |
Both JS and SCSS staged linter failed after the merge:
And:
A first guess would be because the |
All good 👍 |
add an iframe block that will let publishers to embed an iframe either by its URL or by uploading the iframe archive
change label text form from a question to normal text
when adding a fullscreen iframe to a post we'll show a notice saying that the iframe will take over on the content on the post page (we don't want to preview this behavior as it will not let the user user the editor)
set the UI as the Image Upload Block UI and enable getting archive assets from media library
change Upload to Embed since we do embed a URL not upload it
Toggle preview display only the first time when we upload an archive zip or embed a URL
handle only errors with a valid `message` key, else fallback on a generic error message
delete method should be set as Delete not as a Post/Put/Patch
the iframe will take over the popup prompt so we don't need to render it
247a9a3
to
d485551
Compare
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.
I've ran into this issue:
- Insert the block
- Choose "Embed from URL"
- Input the first letter
- -- the block changes mode to preview and the URL insertions is impossible
A bug was introduced in 76f9021 where when we type the first letter in the URL field it's submitted, moved the field state to the right place.
Nice Catch 👌 |
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.
🙌
🎉 This PR is included in version 1.41.0-alpha.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 1.41.0 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
add an iframe block that will let publishers to embed an iframe either by its URL or by uploading
the iframe archive
All Submissions:
Add an iframe block to let publishers embed iframes by adding the iframes URL or by uploading the iframes content.
How to test the changes in this Pull Request:
Other information: