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

TT3: Inconsistent WooCommerce button styling #7388

Closed
tjcafferkey opened this issue Oct 13, 2022 · 8 comments · Fixed by #7516
Closed

TT3: Inconsistent WooCommerce button styling #7388

tjcafferkey opened this issue Oct 13, 2022 · 8 comments · Fixed by #7516
Assignees
Labels
block: mini-cart Issues related to the Mini-Cart block. focus: template Related to API powering block template functionality in the Site Editor type: bug The issue/PR concerns a confirmed bug.

Comments

@tjcafferkey
Copy link
Contributor

Describe the bug

The WooCommerce buttons are styled differently to the current themes buttons on TT3, this does not happen on TT2.

To reproduce

Steps to reproduce the behavior:

  1. Activated TT3
  2. Go To Appearance > Site Editor > Product Catalog and add a button to this template (or filter blocks) > Save.
  3. Go to the Shop page
  4. View the difference in button styles.
  5. Go to the product page and now add to basket a related product at the bottom of the page
  6. View another set of different buttons in the Mini Cart.

Expected behavior

Button styling should be consistent.

Screenshots

Shop page
Screenshot 2022-10-13 at 10 09 24

Mini Cart
Screenshot 2022-10-13 at 10 13 15

@tjcafferkey tjcafferkey added type: bug The issue/PR concerns a confirmed bug. block: mini-cart Issues related to the Mini-Cart block. focus: template Related to API powering block template functionality in the Site Editor theme: Twenty Twenty-Three labels Oct 13, 2022
@tjcafferkey
Copy link
Contributor Author

I suspect this will probably be fixed as part of this epic. Currently WC is missing theme support to load in the relevant theme assets for TT3 which haven't been created yet.

@gigitux
Copy link
Contributor

gigitux commented Oct 27, 2022

I'm testing WC Blocks with this WC's PR, and everything look okay:

image
image
image
image
image
image

Pretty sure that we consider #7466 as a duplicate of this issue. @Aljullu, what do you think? For me, we can close both issues 👍

@Aljullu
Copy link
Contributor

Aljullu commented Oct 27, 2022

Thanks for investigating it! I can still reproduce the issue I reported in #7466. But, it looks like it's only reproducible if the link has never been visited. An easy way to test it is to visit that page from a private browsing window.

imatge

For reference, the buttons on top are added by an HTML block with these contents:

<a href="/" class="wp-block-button__link">Visited link</a>
<a href="/a-route-i-have-never-visited" class="wp-block-button__link">Not visited link</a>

Adding .wp-element-button to those links, fixes the issue. So I think we should fix it in the same way in the other buttons. Thoughts @gigitux?

@gigitux
Copy link
Contributor

gigitux commented Oct 28, 2022

@Aljullu Oh, I didn't notice! I tested your suggestion, and it fixes the issue. In the same PR, should we address the fix for the Mini Cart Drawer button?

image

@Aljullu
Copy link
Contributor

Aljullu commented Oct 28, 2022

In the same PR, should we address the fix for the Mini Cart Drawer button?

I don't have a strong opinion. Personally, I don't think it's a blocker, but if you think that's something easy to fix, it would be good to include it. One thing, however, is that we should keep it consistent with Cart & Checkout buttons as well.

@gigitux
Copy link
Contributor

gigitux commented Oct 28, 2022

I don't have a strong opinion. Personally, I don't think it's a blocker, but if you think that's something easy to fix, it would be good to include it. One thing, however, is that we should keep it consistent with Cart & Checkout buttons as well.

The fix is not immediate, so it is better if we postpone this. Is there a reason why the Cart & Checkout buttons don't inherit the style from the theme?

@Aljullu
Copy link
Contributor

Aljullu commented Oct 28, 2022

The fix is not immediate, so it is better if we postpone this.

Sounds good to me. 👍 It might be worth creating an issue so we don't forget about this.

Is there a reason why the Cart & Checkout buttons don't inherit the style from the theme?

It has some historical reasons. When we created the Cart & Checkout blocks we wanted to have more opinionated styles so we could apply good practices to increase conversion. However, with time, I think we should revisit that decision and just inherit as much as possible the styles from the theme; at least, text and background colors. Otherwise, those buttons look off compared to the other buttons.

@gigitux
Copy link
Contributor

gigitux commented Oct 28, 2022

Sounds good to me. 👍 It might be worth creating an issue so we don't forget about this.

I created the issue #7522

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: template Related to API powering block template functionality in the Site Editor type: bug The issue/PR concerns a confirmed bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants