-
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
Convert EmbedPreview component to functional component #51325
Convert EmbedPreview component to functional component #51325
Conversation
👋 Thanks for your first Pull Request and for helping build the future of Gutenberg and WordPress, @louwie17! In case you missed it, we'd love to have you join us in our Slack community, where we hold regularly weekly meetings open to anyone to coordinate with each other. If you want to learn more about WordPress development in general, check out the Core Handbook full of helpful information. |
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.
Thanks for the PR @louwie17! This looks good except for my small comment.
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: @louwie17. 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. |
e2c0b8e
to
f4349e4
Compare
The PR is updated. @ntsekouras, @kevin940726 sorry for the very long delay in addressing the PR feedback, but it has been addressed. This PR is ready for a re-review. |
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.
LGTM! Thanks for the update 👍
The overlay is also working correctly. That is, the first time the block is clicked, elements in the iframe document do not react the first time the block is clicked, but only when the block is selected:
a15cad4f5bfa3f44f1c9065f142ff9d5.mp4
Thanks for the quick review @t-hamano, I don't have permission to merge, so I will leave that up to you or any of the other reviewers :) |
Congratulations on your first merged pull request, @louwie17! We'd like to credit you for your contribution in the post announcing the next WordPress release, but we can't find a WordPress.org profile associated with your GitHub account. When you have a moment, visit the following URL and click "link your GitHub account" under "GitHub Username" to link your accounts: https://profiles.wordpress.org/me/profile/edit/ And if you don't have a WordPress.org account, you can create one on this page: https://login.wordpress.org/register Kudos! |
What?
This PR converts the
EmbedPreview
component to a functional component.Why?
React class components are outdated and functional components are encouraged, this is part of the #22890 to convert all class components to functional components.
How?
Converts
EmbedPreview
component to a functional component.Testing Instructions
Testing Instructions for Keyboard
N/A
Screenshots or screencast
N/A