Skip to content

Commit

Permalink
Fix: Button: Replace remaining 40px default size violation [Block lib…
Browse files Browse the repository at this point in the history
…rary 3] (#65110)

* Fix the modal button for page list to use default 40px button size

* Fix convert page list to navigation links edit button  to use 40px default size

* Fix enable comments form to use 40px default button size

* Fix featured image block open media library button to use 40px default sizee

* Fix site-logo block to use 40px default button size

* Fix social link apply link button to use 40px default size

* Revert social link apply button size to todo state
  • Loading branch information
hbhalodia authored Sep 9, 2024
1 parent 82bc72d commit 168d3c5
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,16 +32,14 @@ export function ConvertToLinksModal( { onClick, onClose, disabled } ) {
</p>
<div className="wp-block-page-list-modal-buttons">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="tertiary"
onClick={ onClose }
>
{ __( 'Cancel' ) }
</Button>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ disabled }
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/page-list/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -342,8 +342,7 @@ export default function PageListEdit( {
<PanelBody title={ __( 'Edit this menu' ) }>
<p>{ convertDescription }</p>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="primary"
accessibleWhenDisabled
disabled={ ! hasResolvedPages }
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/post-comments-form/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,7 @@ const CommentsForm = ( { postId, postType } ) => {
if ( 'closed' === commentStatus ) {
const actions = [
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
key="enableComments"
onClick={ () => setCommentStatus( 'open' ) }
variant="primary"
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/post-featured-image/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,7 @@ export default function PostFeaturedImageEdit( {
mediaLibraryButton={ ( { open } ) => {
return (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
icon={ upload }
variant="primary"
label={ label }
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/site-logo/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,7 @@ export default function LogoEdit( {
render={ ( { open } ) => (
<div className="block-library-site-logo__inspector-upload-container">
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
onClick={ open }
variant="secondary"
>
Expand Down Expand Up @@ -674,8 +673,7 @@ export default function LogoEdit( {
mediaLibraryButton={ ( { open } ) => {
return (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
icon={ upload }
variant="primary"
label={ __( 'Choose logo' ) }
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/social-link/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ const SocialLinkURLPopover = ( {
/>
</div>
<Button
// TODO: Switch to `true` (40px size) if possible
// TODO: Switch to `true` (40px size) if possible.
__next40pxDefaultSize={ false }
icon={ keyboardReturn }
label={ __( 'Apply' ) }
Expand Down

1 comment on commit 168d3c5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 168d3c5.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/10769289454
📝 Reported issues:

Please sign in to comment.