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
Fix promotions filtering by tab #44884
Conversation
Test Results SummaryCommit SHA: 0d6ef62
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. |
Hi @corsonr, @mcliwanow, 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: |
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.
All good, I can confirm that the tabs act like a filter as intended to.
I'm wondering if this part:
@media only screen and (min-width: 600px) {
.woocommerce-marketplace__notice {
margin-bottom: 40px;
}
}
Shouldn't be removed at all in plugins/woocommerce-admin/client/marketplace/components/notice/notice.scss
since we agreed on 32px
Thanks @corsonr – the design had 32px on mobile, and 40px on bigger screens, that's why we have the media query. |
Using reference to WC_Admin_Marketplace_Promotions::TRANSIENT_NAME when outputting JS data for promotions, instead of transient string. Better initialisation of wc global object in the inline script.
23768c1
to
8aa210d
Compare
* Fixing filtering by tabs in `Promotions` component. Using reference to WC_Admin_Marketplace_Promotions::TRANSIENT_NAME when outputting JS data for promotions, instead of transient string. Better initialisation of wc global object in the inline script. * Changelog. * Using global var for marketplace. * More tentative reference to global object. * icon TS error
Submission Review Guidelines:
Changes proposed in this Pull Request:
Promotions
component which checks for tab parameter to decide whether or not to show a notice on a given page. When thepages
array of a promotion specifies a page with notab
property, the code is currently showing the promotion even on pages with tab parameters.WC_Admin_Marketplace_Promotions::TRANSIENT_NAME
when outputting JS data for promotions, instead of transient string.wc
global object to creating a new global objectwcMarketplace
, aswc
was not being created on some external test sites.Closes 19573-gh-Automattic/woocommerce.com.
Related: #44840
Related: #44655
How to test the changes in this Pull Request:
fetch_marketplace_promotions
on this line to the URL here: 339ad-pb/. This is a gist providing dummy data. If you can't access that URL and you have a GitHub account, create a gist of your own, paste in this content, and use the raw URL of that gist:wp-env run cli wp transient delete --all
.Extensions Discover tab
Extensions Browse tab
Extensions Themes tab
Extensions My Subscriptions tab – no notice
Changelog entry
Significance
Type
Message
Comment