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
Marketplace: modernize skeleton loaders #40131
Conversation
|
Hi @bgrgicak, @kdevnel, @poligilad-auto, Apart from reviewing the code changes, please make sure to review the testing instructions as well. You can follow this guide to find out what good testing instructions should look like: |
Test Results SummaryCommit SHA: 03ba981
To view the full API test report, click here. To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
|
I've addressed all of the feedback, so I'd love any more you can provide:
This now also fixes WCCOM#18257 as a skeleton appears in place of the "0 extensions" etc. titles while loading is occuring. Hopefully that covers everything! |
| .woocommerce-marketplace__product-card__vendor, | ||
| .woocommerce-marketplace__product-card__description, | ||
| .woocommerce-marketplace__product-card__price { | ||
| height: calc(13px * 1.5); |
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.
I like to store values like these in variables so that there is at least some description to what they mean.
Otherwise, we can just have the final value.
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.
I tried this, but calc didn't like calculating with a var in the other place we use this value, so I just added a couple of comments.
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, thanks! Pushed a couple of small tweaks in 3ab2db07cec4cdb46d1cec112318044ebaa1e875 and f5725288cd175dfdf1e8880e5a3d6358ba57acc9 – when you call Array.map the index is the second param.
If the tests pass I might have a go at squashing this PR and merging.
…lace with more-standard ones. It also: - Aims to make those skeleton loaders more accurately represent this size and shape of the content that will replace them. - Refactors the code so that components are responsible for hosting their own skeleton code, attached to an `isLoading` variable, making it easier to stay consistent as changes are made in future.
f572528
to
03ba981
Compare
Dan has addressed the points in Kyle's review.
Changes proposed in this Pull Request:
Closes WCCOM#18034. Closes WCCOM#18257.
This PR replaces all "skeleton" loading indicators on the Marketplace with more-standard ones. It also aims to make those skeleton loaders:
isLoadingvariable, making it easier to stay consistent as changes are made in futureHow to test the changes in this Pull Request:
cd plugins/woocommerce-admin && pnpm run start:hot3.Visit http://localhost:8888/wp-admin/admin.php?page=wc-admin&path=%2Fextensions&tab=extensions and see the new skeleton loaders on the Browse page (you might also like to do a search)
Demo video
This demo video artificially slows down loading a lot so the skeletons are very visible:
Screen.Capture.on.2023-10-12.at.14-40-11.mp4
Changelog entry
Significance
Type
Message
Comment
Improved loading indicators on WooCommerce > Extensions so they more-accurately reflect the layout of the content that will replace them.