-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Add product card styling. #30410
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
Add product card styling. #30410
Conversation
andfinally
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looking great, thanks! There are a few things I still need to check. I think we probably need to retain the max-width 1200px on the list of products and align it left, like in the current page. So we may want to adjust the width of the cards a little bit to allow for that greater width.
assets/css/admin.scss
Outdated
| inset 0 -1px 0 rgba(0, 0, 0, 0.1); | ||
| padding: 0; | ||
| vertical-align: top; | ||
| width: 45%; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
|
Hey @madeincosmos, just started to see this PR and noticed that E2E tests failed: It looks like the expected element is missed. It might happen coincidentally. Can you take a look? |
Hi @tgglv, the e2e tests are failing because we changed the marketplace page structure. I've updated the tests in a different branch that is currently merged into |
- Changed `wc_addons_wrap` to `wc-addons-wrap` to adhere to stylelint class rule. - Removed `max-width` from `wc-addons-wrap` – we need the purple header to stretch to full width. Added new `wc-subscriptions-wrap` class to give the `max-width` to the My Subscriptions page. - Changed width of product cards to use `calc`, so that any trailing odd-numbered card has the same width as the others. - Fixed some stylelint issues. Moved style blocks to address `no-descending-specificity` warnings. Remove quotes from URLs and font names that don't need them. - Gave `#screen-meta-links` absolute position on the marketplace page, so it overlays the full-width purple header.
- Deleted precision indentation on lines 72 and 80. - Deleted unnecessary `echo` from before `esc_html_e` cals.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks lovely! My apologies Maria, I pushed some additions to this PR before I saw your comment, hope this is consistent with your work. I made some tweaks to the page layout.
- Made the wrapper full width, so the purple header stretches across the screen.
- Aligned the products to the left.
- Used
calcfor product card width, so any trailing odd-numbered card keeps the same width as the others. - Addressed some stylelint warnings in
admin.scss.
The PHP7.4 WP Nightly test is repeatedly failing, something to do with composer dependencies – I don't believe it's related to the changes in this PR.
|
Thanks @andfinally, I like your approach better than the previous calculations based on margins. I can see in the designs that there's 84px space between WordPress menu and product list, so I've added this on larger screens. Other than this, I think we're good to. |
|
Hi @madeincosmos, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|

All Submissions:
Changes proposed in this Pull Request:
How to test the changes in this Pull Request:
wp-admin/admin.php?page=wc-addons§ion=payment-gateways(nav menu isn't implemented at the momentOther information:
Screenshots
FOR PR REVIEWER ONLY: