-
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
ToggleGroupControl: Add lint rule for 40px size prop usage #64524
Changes from all commits
333455f
4cd1378
1c5ca50
ca907d5
93891b8
9e8eef7
9daf7b4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -325,6 +325,7 @@ function FlexLayoutJustifyContentControl( { | |
|
||
return ( | ||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
__nextHasNoMarginBottom | ||
label={ __( 'Justification' ) } | ||
value={ justifyContent } | ||
|
@@ -370,6 +371,7 @@ function OrientationControl( { layout, onChange } ) { | |
} = layout; | ||
return ( | ||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
__nextHasNoMarginBottom | ||
className="block-editor-hooks__flex-layout-orientation-controls" | ||
label={ __( 'Orientation' ) } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -449,6 +449,7 @@ function GridLayoutTypeControl( { layout, onChange } ) { | |
|
||
return ( | ||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
__nextHasNoMarginBottom | ||
label={ __( 'Grid item position' ) } | ||
value={ gridPlacement } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import { | |
export function CommentsPaginationArrowControls( { value, onChange } ) { | ||
return ( | ||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
__nextHasNoMarginBottom | ||
label={ __( 'Arrow' ) } | ||
value={ value } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -626,10 +626,11 @@ function Navigation( { | |
</div> | ||
</> | ||
) } | ||
<h3>{ __( 'Overlay Menu' ) }</h3> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Moving this unnecessary There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd be curious (and also a bit scared) to see how many more There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 😅 May be alleviated if we add fieldset/legend support to BaseControl (or provide a new component for it)? Like the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, it definitely sounds like we need to gather and brainstorm all requirements that we'd like for a new version of |
||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
__nextHasNoMarginBottom | ||
label={ __( 'Configure overlay menu' ) } | ||
label={ __( 'Overlay Menu' ) } | ||
aria-label={ __( 'Configure overlay menu' ) } | ||
value={ overlayMenu } | ||
help={ __( | ||
'Collapses the navigation options in a menu icon opening an overlay.' | ||
|
@@ -638,7 +639,6 @@ function Navigation( { | |
setAttributes( { overlayMenu: value } ) | ||
} | ||
isBlock | ||
hideLabelFromVision | ||
> | ||
<ToggleGroupControlOption | ||
value="never" | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -27,7 +27,9 @@ export default function OverlayMenuPreview( { setAttributes, hasIcon, icon } ) { | |
/> | ||
|
||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
__nextHasNoMarginBottom | ||
className="wp-block-navigation__overlay-menu-icon-toggle-group" | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. A bit of style wrangling going on here. See screenshot above. |
||
label={ __( 'Icon' ) } | ||
value={ icon } | ||
onChange={ ( value ) => setAttributes( { icon: value } ) } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -203,6 +203,7 @@ const DimensionControls = ( { | |
panelId={ clientId } | ||
> | ||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
__nextHasNoMarginBottom | ||
label={ scaleLabel } | ||
value={ scale } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -120,6 +120,7 @@ export default function PostNavigationLinkEdit( { | |
/> | ||
) } | ||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
__nextHasNoMarginBottom | ||
label={ __( 'Arrow' ) } | ||
value={ arrow } | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,7 @@ import { | |
export function QueryPaginationArrowControls( { value, onChange } ) { | ||
return ( | ||
<ToggleGroupControl | ||
__next40pxDefaultSize | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
__nextHasNoMarginBottom | ||
label={ __( 'Arrow' ) } | ||
value={ value } | ||
|
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.
This can be seen for example in the Group block.