-
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
URLInput should use InputControl internally #64709
Comments
Definitely care about consolidation. Social links should be the same as the LinkControl. |
@mirka Can I take up this issue? |
Of course, thank you! Please mention |
Thanks, this may take some time, is it ok? Because, I also have some college work to do |
@mirka I replaced the <input> with <InputControl> but the problem is that the className prop, when applied to InputControl, it applies to the wrapper <div> instead of the <input> tag inside that wrapper <div>. This is causing the CSS to not apply properly on the input tag. This is due to some CSS property overriding the height property of the div class. What to do? Please help, I am stuck here. |
@rahulharpal1603 we can definitely help! Could you open a PR with your changes, so that we can help with precise code comments and test the changes? |
Sure |
@ciampo, the height issue is fixed but there is some other issue, please check the above PR for more details |
What problem does this address?
The URLInput component uses an
input
element directly, instead of a standard component likeInputControl
orTextControl
. This will cause styles to drift from the rest of the app, since it won't receive style updates with the rest of the componentry.gutenberg/packages/block-editor/src/components/url-input/index.js
Line 475 in 4d4522c
What is your proposed solution?
We should see if we can refactor this to use InputControl or TextControl. I think InputControl would be better because one of the consumers (LinkControl) has a submit button within the input field border that would be best to put in the
suffix
slot ofInputControl
.URLPopover
LinkControl
Social Icons block
@WordPress/gutenberg-design Do we also care to do some consolidation on how the submit button is placed? Especially the LinkControl and Social Icons block seem to have an unnecessary inconsistency.
The text was updated successfully, but these errors were encountered: