Skip to content

Conversation

@AnnaMag
Copy link
Contributor

@AnnaMag AnnaMag commented Aug 18, 2022

All Submissions:

Changes proposed in this Pull Request:

Enable the JITMs in the Admin sections.

screenshot-fermarichal jurassic tube-2022 09 09-17_17_47

screenshot-fermarichal jurassic tube-2022 09 09-17_14_11

screenshot-fermarichal jurassic tube-2022 09 09-17_36_36

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:

  1. Install WC on a connected Jetpack site.
  2. To be able to see a testing JITM, you'll need to add &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, and Products > Reviews.
  3. Verify that the JITMs look good using the new navigation.
  4. They should look good also with different browser widths.
  5. Verify that they are not being shown in the Onboarding wizard.

Other information:

  • Have you added an explanation of what your changes do and why you'd like us to include them?
  • Have you written new tests for your changes, as applicable?
  • Have you successfully run tests with your changes locally?
  • Have you created a changelog file for each project being changed, ie pnpm changelog add --filter=<project>?

FOR PR REVIEWER ONLY:

  • I have reviewed that everything is sanitized/escaped appropriately for any SQL or XSS injection possibilities. I made sure Linting is not ignored or disabled.

@github-actions github-actions bot added focus: react admin plugin: woocommerce Issues related to the WooCommerce Core plugin. labels Aug 18, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Aug 18, 2022

Test Results Summary

Commit SHA: d403c76

Test 🧪Passed ✅Failed 🚨Broken 🚧Skipped ⏭️Unknown ❔Total 📊Duration ⏱️
API Tests11800201201m 1s
E2E Tests186001018712m 26s
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.

@AnnaMag AnnaMag added this to the 7.0.0 milestone Aug 19, 2022

// 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">';
Copy link
Contributor

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?

Copy link
Contributor

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.

Copy link
Contributor

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.

@octaedro octaedro force-pushed the add/jitms-in-wcadmin branch from 7e1dcdf to d57c8fa Compare September 9, 2022 19:53
@octaedro octaedro requested a review from a team September 9, 2022 20:41
@octaedro octaedro marked this pull request as ready for review September 9, 2022 20:41
@octaedro octaedro self-assigned this Sep 9, 2022
Copy link
Contributor

@louwie17 louwie17 left a 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:
Screen Shot 2022-09-12 at 12 43 58 PM

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.

@beaulebens
Copy link
Contributor

As these changes will show all the notices again, like this Paypal payments for example

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.

@github-actions github-actions bot added the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Sep 12, 2022
@octaedro octaedro force-pushed the add/jitms-in-wcadmin branch from e5c2540 to d2fcc3b Compare September 12, 2022 18:09
@github-actions github-actions bot removed the release: highlight Issues that have a high user impact and need to be discussed/paid attention to. label Sep 12, 2022
@octaedro
Copy link
Contributor

Thank you @louwie17 and @beaulebens for your feedback,
I just addressed the changes you suggested.
Could you take another look at this PR?

Copy link
Contributor

@louwie17 louwie17 left a 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">';
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

The margin-bottom 2.5rem feels like a lot on the older pages like products list, could we potentially also make this 1.25rem?
Screen Shot 2022-09-12 at 5 05 47 PM

@Timstreep
Copy link
Contributor

@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.

@louwie17
Copy link
Contributor

@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 product_addons one. Not sure if this is related to the required of at-least one order and it not having been synced yet.

louwie17
louwie17 previously approved these changes Sep 13, 2022
Copy link
Contributor

@louwie17 louwie17 left a 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 :)

@octaedro octaedro force-pushed the add/jitms-in-wcadmin branch from de99182 to 1c8803a Compare September 13, 2022 20:15
Copy link
Contributor

@louwie17 louwie17 left a 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.

@octaedro octaedro merged commit 01925e6 into trunk Sep 14, 2022
@octaedro octaedro deleted the add/jitms-in-wcadmin branch September 14, 2022 16:05
@github-actions
Copy link
Contributor

Hi @octaedro, thanks for merging this pull request. Please take a look at these follow-up tasks you may need to perform:

  • Add the release: add testing instructions label

@jarekmorawski
Copy link

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

@beaulebens
Copy link
Contributor

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.

@jarekmorawski
Copy link

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 (p1663270180977999-slack-C2CM2ELTG), people do not react positively to additional messaging in the admin UI. Maybe we could start a high-priority project where we'd focus on the notification system in general and think of ways to balance user and business needs? I'm sure we could find a middle ground and build something that would serve our needs for years to come.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

plugin: woocommerce Issues related to the WooCommerce Core plugin.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

7 participants