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: Remove font weight on toolbar tab button - #61254 #61308

Merged
merged 3 commits into from
May 3, 2024

Conversation

hbhalodia
Copy link
Contributor

What?

Why?

  • This PR would resolve the consistency of the font-weight in the block toolbar.

How?

  • This PR removes the specifically adding the Font Weight - 500 to the Custom HTML block toolbar.

Testing Instructions

  • Open the site.
  • Edit any page
  • Add the Custom HTML block
  • Inspect the Toolbar Button HTML and Preview, you can see the font weight is now 400.

Testing Instructions for Keyboard

  • NIL

Screenshots or screencast

  • Before
Screenshot 2024-05-02 at 12 18 40 PM
  • After
Screenshot 2024-05-02 at 12 17 35 PM

@hbhalodia hbhalodia requested a review from ajitbohra as a code owner May 2, 2024 06:49
Copy link

github-actions bot commented May 2, 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 <hbhalodia@git.wordpress.org>
Co-authored-by: t-hamano <wildworks@git.wordpress.org>
Co-authored-by: jasmussen <joen@git.wordpress.org>

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

@t-hamano t-hamano added Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement. [Block] HTML Affects the the HTML Block labels May 2, 2024
@t-hamano t-hamano self-requested a review May 2, 2024 12:40
Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

Thanks for the PR!

This PR makes sense to me, but I would suggest further improvements.

These two buttons on the HTML block toolbar are the only elements with the CSS class .components-tab-button. Additionally, this CSS class applies styles to the internal span elements, but these two buttons do not have span elements.

In other words, you should be able to delete everything below.

// @todo We should extract the tabs styles to the tabs component itself
&.components-tab-button {
font-weight: 500;
span {
display: inline-block;
padding-left: 0;
padding-right: 0;
position: relative;
}
}

className="components-tab-button"

className="components-tab-button"

@hbhalodia
Copy link
Contributor Author

Thanks @t-hamano, I would make the changes asap.

@jasmussen
Copy link
Contributor

Good PR 👍 👍

@hbhalodia
Copy link
Contributor Author

Hi @t-hamano, I have reworked on the PR and updated it based on your inputs.

Thank You.

Copy link
Contributor

@t-hamano t-hamano left a comment

Choose a reason for hiding this comment

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

LGTM! Thanks for the update.

Before:

before

After:

after

Normally we would need to update CHANGELOG when changes are made to the components package, but for this PR we're just removing styles that are no longer in use, so I think we don't need to.

@t-hamano t-hamano merged commit cbee699 into WordPress:trunk May 3, 2024
60 of 61 checks passed
@github-actions github-actions bot added this to the Gutenberg 18.4 milestone May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] HTML Affects the the HTML Block Needs Design Feedback Needs general design feedback. [Type] Enhancement A suggestion for improvement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants