-
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
LinkControl: Remove unnecessary right padding of input fields #57784
Conversation
const inputClasses = classnames( className, { | ||
// 'has-no-label': ! hideLabelFromVision, | ||
} ); |
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.
Minor refactoring: The conditional has-no-label
class was originally commented out, so classnames
is not needed.
// If the input doesn't have a visible label then | ||
// we need to expand the input itself to occupy | ||
// the full available horizontal space. | ||
.block-editor-link-control__search-input.has-no-label .block-editor-url-input__input { | ||
flex: 1; | ||
} |
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.
Minor refactoring: This style is unnecessary because the has-no-label
class does not exist under any conditions.
Size Change: +3 B (0%) Total Size: 1.7 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. Thanks for taking care of this.
Follow-up on #56685
What?
This PR removes unnecessary right padding of input fields when there are "Action" buttons.
Why?
In #56685, the padding on the right side was increased to prevent text from covering the submit button. However, once the URL is submitted, this submit button does not exist.
How?
We can determine whether this submit button exists using the
showActions
variable, that is, thehas-actions
class. Use this class to override the right padding with the default value when there is no submit button.Testing Instructions