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

Cart/Checkout: Adjust styling of product attributes so that they are visually distinct. #52607

Closed
wants to merge 7 commits into from

Conversation

samueljseay
Copy link
Contributor

@samueljseay samueljseay commented Nov 6, 2024

Changes proposed in this Pull Request:

Closes #42022

  • Adds a small amount of margin to each product description item.
  • Always apply bold styling to the name element.

How to test the changes in this Pull Request:

This is a visual change and also impacts cart, so check that it hasn't introduced any visual regressions or issues in either cart or checkout.

  1. Add a product with some variations to your store, ideally more than one so you can see the list displayed.
  2. As a shopper add some of the variable products to your cart
  3. Examine the styling of the list of product attributes in cart and checkout

Before:

Mobile:

Screenshot 2024-11-06 at 7 14 42 PM

Desktop:

Screenshot 2024-11-06 at 7 15 47 PM

After:

Mobile:

Screenshot 2024-11-06 at 4 47 54 PM

Desktop:

Screenshot 2024-11-06 at 4 46 43 PM

Changelog entry

  • Automatically create a changelog entry from the details below.
  • This Pull Request does not require a changelog entry. (Comment required below)
Changelog Entry Details

Significance

  • Patch
  • Minor
  • Major

Type

  • Fix - Fixes an existing bug
  • Add - Adds functionality
  • Update - Update existing functionality
  • Dev - Development related task
  • Tweak - A minor adjustment to the codebase
  • Performance - Address performance issues
  • Enhancement - Improvement to existing functionality

Message

Cart/Checkout: Adjust styling of product attributes so that they are visually distinct.

Changelog Entry Comment

Comment

@woocommercebot woocommercebot requested review from a team and mikejolley and removed request for a team November 6, 2024 08:46
@samueljseay samueljseay added team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. labels Nov 6, 2024
@samueljseay samueljseay removed the request for review from mikejolley November 6, 2024 08:46
Copy link
Contributor

github-actions bot commented Nov 6, 2024

Hi @senadir,

Apart from reviewing the code changes, please make sure to review the testing instructions and verify that relevant tests (E2E, Unit, Integration, etc.) have been added or updated as needed.

You can follow this guide to find out what good testing instructions should look like:
https://github.com/woocommerce/woocommerce/wiki/Writing-high-quality-testing-instructions

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Test using WordPress Playground

The changes in this pull request can be previewed and tested using a WordPress Playground instance.
WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser.

Test this pull request with WordPress Playground.

Note that this URL is valid for 30 days from when this comment was last updated. You can update it by closing/reopening the PR or pushing a new commit.

Copy link
Contributor

github-actions bot commented Nov 6, 2024

Size Change: +17.2 kB (+0.34%)

Total Size: 5.07 MB

Filename Size Change
./packages/js/data/build/payment-settings/actions.js 1.1 kB +314 B (+39.95%) 🚨
./plugins/woocommerce/client/admin/build/app/index.js 196 kB +249 B (+0.13%)
./plugins/woocommerce/client/admin/build/chunks/8534.style.css 1.56 kB +171 B (+12.33%) ⚠️
./plugins/woocommerce/client/admin/build/chunks/settings-payments-offline.js 1.93 kB +708 B (+57.89%) 🆘
./plugins/woocommerce/client/admin/build/data/index.js 40.7 kB +157 B (+0.39%)
./packages/js/data/build/payment-settings/utils.js 253 B +253 B (new file) 🆕
./plugins/woocommerce/client/admin/build/chunks/4521.js 15 kB +15 kB (new file) 🆕

compressed-size-action

@samueljseay samueljseay closed this Nov 6, 2024
@samueljseay samueljseay reopened this Nov 6, 2024
@github-actions github-actions bot added the plugin: woocommerce Issues related to the WooCommerce Core plugin. label Nov 6, 2024
@samueljseay samueljseay requested review from a team and wavvves and removed request for a team November 6, 2024 11:16
@samueljseay
Copy link
Contributor Author

@wavvves bump on this if you're around today 🙇🏻

@samueljseay samueljseay requested review from a team and senadir and removed request for wavvves and a team November 12, 2024 03:29
@@ -18,7 +19,7 @@
display: inline-block;
}

.is-large:not(.wc-block-checkout) {
Copy link
Member

Choose a reason for hiding this comment

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

Seems this was on purpose, any idea why it was set that way?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Good idea to test subscriptions. The checkout and cart styles have departed a lot since then so I didn't think too much of it not being needed anymore.

Subscriptions is an extension though right, shouldn't any CSS fix for that specific case belong in that plugin?

Copy link
Member

@senadir senadir left a comment

Choose a reason for hiding this comment

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

Original PR (woocommerce/woocommerce-blocks#3665) does mention WCSubs, I will test against that tomorrow

@samueljseay
Copy link
Contributor Author

@elizaan36 When you have a chance would you mind having another look? I've matched the design spacing and font sizes as best I can (our em based font sizes are 0.3px smaller than the design).

We don't have the new badge design so still the spacing between product image and description are different. I'll see if I can pick that up in a cooldown sometime, because the badge really cleans up the look of the area too.

Anyway here's how a product with attributes looks:

Screenshot 2024-11-21 at 12 17 44 PM

@elizaan36
Copy link
Contributor

Really nice @samueljseay thanks! I still think we need to capitalize the first letter of the attribute category if possible.

@pierorocca
Copy link

pierorocca commented Nov 23, 2024

@pmcpinto for visibility.

The order summary section ends up being a long list of bolded, important elements drawing attention from the main CTA, placing the order.

There's already a lot of divergence between WooPay and Blocks pdpOw2-4Df-p2 that Nikki was attempting to converge and to address mobile optimization. Can we regroup before progressing any further?

image

image

Shopify Benchmark - note the lack of even needing attribute labels.

Shopify Guest Checkout
image

ShopPay Checkout (Yes it's identical to the store guest checkout order summary AND the order summary in the TY page).
image

@samueljseay
Copy link
Contributor Author

@pierorocca I agree it would be good to overall optimize the design, especially I like the shopify concept of removing the attrtibute labels

@pierorocca
Copy link

pierorocca commented Nov 25, 2024

@pierorocca I agree it would be good to overall optimize the design, especially I like the shopify concept of removing the attrtibute labels

It makes sense right? If the word shown is "Green", the label "Color" is redundant. I appreciate how mobile optimized and to the point their summary is. Before Nikki left we were discussing a mobile first approach which led to the size comparisons in the linked P2.

@samueljseay samueljseay added the status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. label Nov 29, 2024
@pmcpinto
Copy link

Woo’s case differs slightly from Shopify, as our users have more flexibility to create attributes and variations, unlocking more bespoke and niche situations. Still, I think having the attribute label can be redundant in most situations.

Cc @elizaan36 in case you have some suggestions on displaying the attribute value without the label.

PS: it will be interesting to see if Shopify’s expansion of their product model with more complex attributes and higher number of variations will impact their order summary.

@pierorocca
Copy link

Different ways to approach this. Certainly needs a full exploration, which is what I'm advocating for here before we make changes to a very important component.

@samueljseay
Copy link
Contributor Author

Certainly needs a full exploration, which is what I'm advocating for here before we make changes to a very important component.

@pmcpinto seems the advocation here is to put a hold on these changes, so I'd just be keen to know what you think are best steps forward here, I don't have strong feelings either way. 🙇

@pierorocca
Copy link

@samueljseay TT5 design is in flight which I see already has some changes to the order summary sections, there's a new checkout designer that started yesterday, and there are changes coming to how we approach the checkout design in general so I'd recommend holding off.

@pmcpinto
Copy link

pmcpinto commented Dec 4, 2024

I agree that putting this work on hold is the best option. Thanks.

@samueljseay
Copy link
Contributor Author

Thanks folks! Closing this for now 🙇

@samueljseay samueljseay closed this Dec 4, 2024
@elizaan36
Copy link
Contributor

Thanks y'all. I'm going to put this on the list of first projects for Yoann to take a look at.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
block: cart Issues related to the cart block. block: checkout Issues related to the checkout block. plugin: woocommerce Issues related to the WooCommerce Core plugin. status: blocked The issue is blocked from progressing, waiting for another piece of work to be done. team: Rubik Store API checkout endpoints, Mini-Cart, Cart and Checkout related issues
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Improve UI for order meta on the Block Checkout page
5 participants