Skip to content
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

Fix: Button: Replace remaining 40px default size violations [Block library 1] #65033

Merged
merged 5 commits into from
Sep 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,7 @@ export default function CommentsLegacy( {

const actions = [
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
Copy link
Contributor Author

@hbhalodia hbhalodia Sep 4, 2024

Choose a reason for hiding this comment

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

This can be seen in comments block, when used in legacy mode.

Before After
Comments-Before Comments-After

key="convert"
onClick={ () => void setAttributes( { legacy: false } ) }
variant="primary"
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/embed/embed-placeholder.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,16 +66,14 @@ const EmbedPlaceholder = ( {
justify="flex-start"
>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
variant="secondary"
onClick={ tryAgain }
>
{ _x( 'Try again', 'button label' ) }
</Button>{ ' ' }
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
Comment on lines +69 to +76
Copy link
Contributor Author

@hbhalodia hbhalodia Sep 4, 2024

Choose a reason for hiding this comment

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

This can be seen on embed block, when you insert a URL that is non-embedded.

Before After
embed-before embed-after

variant="secondary"
onClick={ fallback }
>
Expand Down
6 changes: 2 additions & 4 deletions packages/block-library/src/freeform/modal.js
Original file line number Diff line number Diff line change
Expand Up @@ -123,8 +123,7 @@ export default function ModalEdit( props ) {
>
<FlexItem>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
Copy link
Contributor Author

@hbhalodia hbhalodia Sep 4, 2024

Choose a reason for hiding this comment

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

This can be seen while you insert the core/freeform block.

Before After
Classic-before classic-after

variant="tertiary"
onClick={ onClose }
>
Expand All @@ -133,8 +132,7 @@ export default function ModalEdit( props ) {
</FlexItem>
<FlexItem>
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
Copy link
Contributor Author

@hbhalodia hbhalodia Sep 4, 2024

Choose a reason for hiding this comment

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

This can be seen while you insert the core/freeform block.

Before After
Classic-before classic-after

variant="primary"
onClick={ () => {
setAttributes( {
Expand Down
3 changes: 1 addition & 2 deletions packages/block-library/src/missing/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,7 @@ export default function MissingEdit( { attributes, clientId } ) {

const convertToHtmlButton = (
<Button
// TODO: Switch to `true` (40px size) if possible
__next40pxDefaultSize={ false }
__next40pxDefaultSize
Copy link
Contributor Author

@hbhalodia hbhalodia Sep 4, 2024

Choose a reason for hiding this comment

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

This can be seen, when you have a block inserted and that block is no longer registered or available.

Before After
missing-before missing-after

key="convert"
onClick={ convertToHTML }
variant="primary"
Expand Down
Loading