Skip to content

Conversation

@hbhalodia
Copy link
Contributor

Part of - #65018

What?

Why?

  • To make the consistent button across Gutenberg, and we would have a lint rule added once fixed, all the button usage.

How?

  • Change from __next40pxDefaultSize={ false } to __next40pxDefaultSize on component.

Testing Instructions

  • Add the blocks on the page/post and check for the buttons defined.
  • Screenshot is added for individual changed files.

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

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 visit, site-editor --> styles --> typogrpahy --> open font library modal.

Note: This has changed some styles, but that is not looking good, should we add some higher specificity or !important? as we did previously with block library? @mirka @ciampo

Before After
Font-library-modal-before font-librayr-modal-after

Copy link
Member

Choose a reason for hiding this comment

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

Yes, I guess we can go with a !important on the height: auto?

Copy link
Member

Choose a reason for hiding this comment

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

(FYI, unrelated to this but the tabs styling was broken. Fix proposed in #65330)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, I guess we can go with a !important on the height: auto?

Sure, Would do this.

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

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 visit, site-editor --> styles --> typogrpahy --> open font library modal and install fonts tab.

Before After
install-fonts-before install-fonts-after

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

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 visit, site-editor --> styles --> typogrpahy --> open font library modal and choose font to edit.

Before After
installed-fonts-delete-before Screenshot 2024-09-12 at 11 04 50 AM

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

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 visit, site-editor --> styles --> typogrpahy --> open font library modal and choose font

Before After
installed-fonts-update-before installed-fonts-update-after

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

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 visit, site-editor --> styles --> typography --> open font library modal --> upload font tab.

Note: Due to higher specificity of button class, it has changed the size of upload button to 40px which is not looking nice. Should we revert this change or add some style change by adding !importnant or higher specificity? Cc: @mirka @ciampo

Before After
upload-font-before Upload-font-after

Copy link
Member

Choose a reason for hiding this comment

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

I raised this as a separate issue at #65333, but for the scope of this PR let's just add an !important to the height.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I raised this as a separate issue at #65333, but for the scope of this PR let's just add an !important to the height.

Sure 👍.

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

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 visit, site-editor --> styles --> color --> pallete, option for randmoize colors.

Before After
radomize-colors-before randomize-colors-after

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

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 visit, site-editor --> styles --> revisions icon --> check for individual revisions button.

Note: This has some overridden styles, so no difference in before and after.

Before After
revisions-button-before revisions-button-after

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

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 visit, site-editor --> styles --> shadows --> add shadow and rename it, a modal would be opened and check for cancel button.

Before After
shadow-rename-cancel-before shadow-rename-cancel-after

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

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 visit, site-editor --> styles --> shadows --> add shadow and rename it, a modal would be opened and check for save button.

Before After
shadow-rename-save-before shadow-rename-save-after

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

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 visit, site-editor --> styles --> shadows --> add shadow. Open shadow and check for drop shadow button.

Note: It already has a 40px size as height is auto.

Before After
drop-showdow-button-before drop-shadow-button-aafter

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

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 visit, site-editor --> styles --> shadows --> add shadow. Open shadow and check for drop shadow remove icon button.

Note: It already has a 40px size as height is auto.

Before After
drop-shadow-remove-before drop-shadow-remove-after

@hbhalodia hbhalodia marked this pull request as ready for review September 12, 2024 05:47
@github-actions
Copy link

github-actions bot commented Sep 12, 2024

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: hbhalodia <[email protected]>
Co-authored-by: mirka <[email protected]>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@akasunil akasunil added the [Type] Code Quality Issues or PRs that relate to code quality label Sep 12, 2024
@mirka mirka requested a review from a team September 13, 2024 14:16
@hbhalodia hbhalodia requested a review from mirka September 15, 2024 15:44
@hbhalodia
Copy link
Contributor Author

Hi @mirka, The requested changes are updated in the PR.
Thank You,

Copy link
Member

@mirka mirka left a comment

Choose a reason for hiding this comment

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

Looks good, thanks 🚀

@mirka mirka enabled auto-merge (squash) September 16, 2024 10:44
@mirka mirka merged commit c80fc61 into WordPress:trunk Sep 16, 2024
@github-actions github-actions bot added this to the Gutenberg 19.3 milestone Sep 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants