-
Notifications
You must be signed in to change notification settings - Fork 4.3k
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
MediaPlaceholder: Use InputControl in URL popover #65656
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. |
border: none; | ||
border-radius: 0; | ||
margin: 2px; | ||
min-width: 260px; |
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.
The widths don't seem to be particularly intentional to begin with, so just using my best judgement here.
display: flex; | ||
|
||
// Selector requires a lot of specificity to override base styles. | ||
input[type="url"].block-editor-media-placeholder__url-input-field { |
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.
Interestingly, these styles were not applying to the input
as intended because it didn't have type="url"
.
To minimize the risk of unintended consequences for the scope of this PR, I didn't add a type="url"
to the InputControl. Let me know if you disagree.
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.
Sounds good to me — it could be a change to consider, but not in the scope of this PR
Size Change: -74 B (0%) 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.
LGTM 🎸
Flaky tests detected in 347a0c8. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11036424654
|
* MediaPlaceholder: Use InputControl in URL popover * Tweak width in mobile Co-authored-by: mirka <0mirka00@git.wordpress.org> Co-authored-by: ciampo <mciampini@git.wordpress.org>
I just cherry-picked this PR to the wp/6.7 branch to get it included in the next release: 5458080 |
Follow-up to #64709
What?
Replaces the raw
input
in the MediaPlaceholder URL popover with an InputControl, and move the submit button to the suffix slot like the other similar UI patterns.Why?
Easier and more consistent styling, as well as UI pattern consolidation among all the URL input controls.
Testing Instructions
Add an Image block. The "Insert from URL" flow should work as expected.
Screenshots or screencast
Desktop
Mobile