-
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
Embed Block: Replace native input element with InputControl component #64668
Conversation
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 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. |
Size Change: +143 B (+0.01%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
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.
Works as expected ✅
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.
className="components-placeholder__input" | ||
aria-label={ label } | ||
className="wp-block-embed__placeholder-input" | ||
label={ __( 'Embed URL' ) } |
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.
Should this be __( 'Embed URL' )
or should it just be label
?
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.
Good catch! I shouldn't have used a hard-coded string here. We should reference this label and display the corresponding label for the variation. I'll merge it after I update.
…WordPress#64668) * Embed Block: Replace native input element with InputControl component * Don't use hardcoded label Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: jasmussen <joen@git.wordpress.org>
Closes #41961
What?
This PR replaces the native input element with the
InputControl
component in the Embed block placeholder, and applies a new 40px size.Why?
In our current implementation, to apply the component styles we apply the
components-placeholder__input
class directly, which is not ideal. Additionally, it doesn't allow us to apply the new 40px size.Testing Instructions
You should be able to embed the URL as before.
Screenshots or screencast