-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
added support of insert from url option in cover block #41908
base: trunk
Are you sure you want to change the base?
added support of insert from url option in cover block #41908
Conversation
@Mamaduka can you please review this PR. |
Thanks for working on this, @sunil25393. Unfortunately, using regex to detect media type won't work with URLs that don't have extensions attached. E.g. - |
Have addressed feedback. please review it again. |
Any more feedbacks ? |
@Mamaduka can we merge this PR if there isnt any more feedback. Thank you. |
Hi, @sunil25393 Sorry, I didn't get a chance to test or review changes here. Quick notes:
|
Hi @Mamaduka I have addressed feedback, and tested to make sure that isn't any CORS errors in the console. |
Waiting for PR review. |
I pinged some folks who recently worked on the Cover block for the reviews. |
Hi @sunil25393, Generally this works well if the host that we're linking to allows it. For instance I can easily run into:
But this other host This inconsistency has to be treated better, not sure how, but at this point as a user I have no idea why it does not work. I have tested with URLs that allow remote linking and the features work as expected. We just need to figure out what to do if:
|
i see, do you know how we do for external image on image block ? |
We don't do it there perfectly either. We can link to a pdf file and get an empty block. Nevertheless in the image block we don't have to deal with CORS because the In the case of the cover block it is in your implementation of Added a needs design feedback for this. |
Thank you @draganescu. as you said, we should add field for content type of link. |
Do we just need a better alert/fallback state when there's a failure? |
@richtabor no, we also need to ask what kind of file are we linking to. |
@draganescu need some design input for this, how we can implement content type field ? |
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Unlinked AccountsThe following contributors have not linked their GitHub and WordPress.org accounts: @Wolf-DieterFiege. Contributors, please read how to link your accounts to ensure your work is properly credited in WordPress releases. If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
Currently it isn't possible to insert images or video via url for cover block.
What?
Fixes 10853
Testing Instructions
Please include step by step instructions on how to test this PR.
Screenshots or screencast