Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Add color and typography styles on the mini cart title block #9382

Merged
merged 2 commits into from
May 8, 2023
Merged

Add color and typography styles on the mini cart title block #9382

merged 2 commits into from
May 8, 2023

Conversation

daniloparrajr
Copy link
Contributor

@daniloparrajr daniloparrajr commented May 7, 2023

The goal of this PR is to make the Mini Cart Title customizable through the settings sidebar (colors, typography).
In which the two inner blocks Mini Cart Title Label and Mini Cart Title Items Counter will inherit by default.

Fixes #9346

Testing

  1. Install and activate the Twenty Twenty-Three theme
  2. Go to Appearance > Editor > Template parts > Mini Cart
  3. Select the Mini Cart Title block and add some customizations on the settings sidebar (colors, typography).
  4. Check if the customizations are applied in the editor and in the frontend of the website.

Screenshots

Before:

image

After:

image

WooCommerce Visibility

  • WooCommerce Core
  • Feature plugin
  • Experimental

Performance Impact

Changelog

Mini cart: add color and typography styles on the mini cart title block

@nielslange nielslange added focus: global styles Issues that involve styles/css/layout structure. block: mini-cart Issues related to the Mini-Cart block. type: enhancement The issue is a request for an enhancement. labels May 8, 2023
@nielslange nielslange requested review from nielslange, a team and imanish003 and removed request for a team May 8, 2023 04:25
Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

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

This is looking great, @daniloparrajr, thank you so much for contributing with this PR.

It's testing as expected and code changes look good. My only comment would be that I think we should disable support for background color (sorry, I know that wasn't specified in the original issue 🙏 ). The reason is that I feel it looks a bit off because it has some spacing around it (padding and margin from other elements):

imatge

For now, I think being able to change the text color and font size would be enough.

@nielslange
Copy link
Member

@Aljullu How did you manage to see the background color? On my end, both when using TT2 and TT3, I do not see the background color, as the following SCSS definition overwrites that setting on my end:

Screenshot 2023-05-08 at 15 43 35

Copy link
Member

@nielslange nielslange 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 working on this, @daniloparrajr.

Besides @Aljullu feedback, could you add testing steps to the PR? In #8905, you can find a great example of testing steps. Adding them, does not only help for testing the PR now, but also later when it gets merged into core. 😀

@nielslange nielslange dismissed their stale review May 8, 2023 08:49

Changing the status from "Request changes" to "Comment"

@daniloparrajr
Copy link
Contributor Author

Thank you @Aljullu and @nielslange for checking my PR, I added the change to disable the background color support for the mini cart title block. I also added some testing steps, I hope this is helpful.

Copy link
Contributor

@Aljullu Aljullu left a comment

Choose a reason for hiding this comment

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

Thank you @Aljullu and @nielslange for checking my PR, I added the change to disable the background color support for the mini cart title block. I also added some testing steps, I hope this is helpful.

Thanks for updating the PR and adding testing steps, @daniloparrajr. This is looking great. I will wait until tests pass and after that I will proceed merging. It there aren't any followup issues, your change will be included in WC Blocks 10.3 and WC core WC 7.9. 🎉

How did you manage to see the background color? On my end, both when using TT2 and TT3, I do not see the background color, as the following SCSS definition overwrites that setting on my end:

@nielslange Which color did you choose? When choosing one from the palette, it comes with an !important tag in the CSS, so it would override the default background. But maybe custom colors don't? Sidenote: this shouldn't block this PR as we have removed support for background colors.

@Aljullu Aljullu merged commit 1832630 into woocommerce:trunk May 8, 2023
@daniloparrajr daniloparrajr deleted the 9346/mini-cart-title-block-supports branch May 8, 2023 12:13
@mikejolley mikejolley added this to the 10.3.0 milestone May 22, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
block: mini-cart Issues related to the Mini-Cart block. focus: global styles Issues that involve styles/css/layout structure. type: community contribution type: enhancement The issue is a request for an enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mini Cart Title block: add support for color and typography styles
4 participants