-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Reintroduce JITMs in the WC Admin. #34383
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
Conversation
Test Results SummaryCommit SHA: d403c76
To view the full E2E test report, click here. To view all test reports, visit the WooCommerce Test Reports Dashboard. |
|
|
||
| // Wrap the notices in a hidden div to prevent flickering before | ||
| // they are moved elsewhere in the page by WordPress Core. | ||
| echo '<div class="woocommerce-layout__notice-list-hide" id="wp__notice-list">'; |
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 think (requires testing) if we remove this, then we will probably completely disable all of the admin-notices-cleanup work that WC Admin does (e.g. any notices injected by any plugin will come back on all screens). JITMs do also support being inserted into a different container (<div id="jp-admin-notices" />) so maybe we'd be better off keeping the existing cleanup, and then carefully placing that container?
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.
Hi @beaulebens, thank you for your comment,
I've been working on this PR. Since the class woocommerce-layout__notice-list-hide essentially only adds a display none (so it's not being shown), I removed the class and replaced the div id with jp-admin-notices, otherwise, we would add the JITMs twice and hide one of them.
I couldn't find a scenario where that change breaks the experience, but if we can find one I'll leave that div as it is now and add a new one with the id jp-admin-notices.
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.
Thanks for adding this back in, this is testing very well now, I am only seeing the Jetpack notices.
7e1dcdf to
d57c8fa
Compare
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.
This tested well for me and code looks good!
I will approve this after we get a consensus on this comment: https://github.com/woocommerce/woocommerce/pull/34383/files#r959890093
As these changes will show all the notices again, like this Paypal payments for example:

Users might indeed get a pleasant surprise, as I noticed that one of my older sites had several notices that would otherwise be hidden. But shown on WP > Dashboard.
I wonder if we could wrap these notices in a nicer format that matches our designs better (cc @jarekmorawski, @pmcpinto ), but that would be out of scope if we wanted to get this in by Thursday (for the code freeze).
It might be nicer to have them part of some kind of dropdown on any WooCommerce screens so it's less intrusive.
The preference here was definitely to show JITMs again, but not to suddenly start showing all notices (which should ideally still be collected up and tucked away, as before. |
e5c2540 to
d2fcc3b
Compare
|
Thank you @louwie17 and @beaulebens for your feedback, |
louwie17
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.
Nice work @octaedro, this seems to test well now, I don't see all the notices but only the JITM's.
I just left one small comment on the styling, but otherwise this is great!
|
|
||
| // Wrap the notices in a hidden div to prevent flickering before | ||
| // they are moved elsewhere in the page by WordPress Core. | ||
| echo '<div class="woocommerce-layout__notice-list-hide" id="wp__notice-list">'; |
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.
Thanks for adding this back in, this is testing very well now, I am only seeing the Jetpack notices.
| &__jitm { | ||
| .jitm-card { | ||
| margin-left: 1.25rem !important; | ||
| margin-bottom: 2.5rem; |
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.
|
@beaulebens there's a few legacy JITMs hiding in the system that should be tested before this goes live. I've documented these here. They're pretty old, so there's no telling how they might look when reintroduced or if the links still work properly. I wouldn't be opposed to disabling these altogether and starting with a clean slate. |
@Timstreep I just went through that list and managed to get all of them besides one to show up. The only one I was having trouble with was the |
louwie17
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.
Thanks for sticking with the several styling updates @octaedro, this is testing well for me and looking great! Thanks so much for your hard work on this.
You got my approval and is good to merge from my perspective as long as all the checks pass :)
de99182 to
1c8803a
Compare
louwie17
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.
Re-approving after rebase.
|
Hi @octaedro, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:
|
|
Hi there! Can you tell me why we're bringing the notices back to wc-admin? Most merchants find them overwhelming, and with the Inbox and the task list in place, I am not sure why we would need another notification system. What are we hoping to achieve with this? What's our long-term goal? Do we imagine this being limited to Jetpack or open to all extensions? cc @beaulebens |
|
They are being brought back because they provide more contextual messaging, available on each specific screen. Note that the visuals you see here are just the basic/default theme since this was originally created by Jetpack; we will be using Woo messaging/designs, and this is not available to other plugins (100% controlled by us). We can and should definitely iterate on the design to make it something that fits into WC Admin better, but right now we wanted to at least re-enable it so that we could experiment with it in different contexts. |
|
I understand the value of JITMs and would love to find a better way to show them in the system. However, as demonstrated by the recent Inbox note bug ( |

All Submissions:
Changes proposed in this Pull Request:
Enable the JITMs in the Admin sections.
The JITMs haven't been added to the Onboarding wizard in order to keep the same experience. We can add them later if we want.
Closes # 60-gh-woocommerce/mothra-private
How to test the changes in this Pull Request:
&test_jitm=/1/at the end of a WooCommerce URL. It will work on every WooCommerce page except for:Products > Categories,Products > Tags,Products > Attributes, andProducts > Reviews.Other information:
pnpm changelog add --filter=<project>?FOR PR REVIEWER ONLY: