-
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
Border Style Control: Update styling for consistency with border width control #37244
Border Style Control: Update styling for consistency with border width control #37244
Conversation
…for consistency with Width control
Size Change: +329 B (0%) Total Size: 1.11 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.
Thank you for the ping, Andrew!
Those changes do fix the alignment issue! I believe that this PR is good to go (after the CHANGELOG entry is removed, as explained in the comment below).
I also have some feedback/question on the BorderStyleControl
component — again, definitely something that can/should be tackled separately:
- As also highlighted in ToolsPanel: Standardize input control label margin #36387 (review), the proper fix in my opinion is that all components in
@wordpress/components
get refactored to be based off the same underlyingBaseControl
, which would also imply that they share the same implementation for their label. If that was the case, we would then be able to take that base control and use it also in custom controls (like in this example), and get a perfect label alignment out of the box. - Have you considered using
ToggleGroupControl
instead of usingButton
s ? - The component is using some classnames (e.g.
components-border-style-control
) that use the same naming convention used by the legacy components in@wordpress/components
, and therefore somehow imply that this component is part of that package. As we migrate away from hardcodedcomponent-*
classnames in@wordpress/components
, the fact that the same naming convention is being used in another package will probably add extra confusion. I also know that this comment would apply to most components defined inblock-editor/src/components
.
I haven't had a chance to review this yet but can answer one of the questions above now:
The control needs to be able to toggle off a selection. The |
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 review @ciampo! And apologies, I was working too quickly here and saw
Agreed! Once we've stabilised some of these individual cases for 5.9 it'd be good for us to do this refactor to tidy up the components across the board 👍 |
…h control (#37244) * Border Style Control: Update line-height, bottom-margin, and padding for consistency with width control
Description
Raised in #34061 (comment) by @ramonjd and following on from the PR by @aaronrobertshaw to standardise ToolsPanel input margins (#36387), this PR looks at updating the Border Style Control to have consistent margin, padding and line-height as the border width control.
How has this been tested?
Screenshots
Types of changes
Bug fix (non-breaking change which fixes an issue)
Checklist:
*.native.js
files for terms that need renaming or removal).