-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Await triggerNoteAction before navigating when action is clicked #38047
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
|
Hi , @woocommerce/mothra-enhancements 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: 22c4bdd
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. |
mattsherman
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.
This is looking pretty good! I requested a change to hook into our wc-admin routing, to avoid unnecessary full page reloads.
| if ( url && url !== '#' ) { | ||
| window.location.href = url; | ||
| } |
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.
When testing this, I noticed that the entire page gets reloaded if the url is the same as the current page, or if the url is to another wc-admin page.
The following prevents this:
if (
url &&
url !== '#' &&
parseAdminUrl( url ).href !== window.location.href
) {
navigateTo( { url } );
}Using the following imports:
import { navigateTo, parseAdminUrl } from '@woocommerce/navigation';|
@louwie17 I believe it will |
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## trunk #38047 +/- ##
==========================================
- Coverage 51.5% 51.3% -0.2%
- Complexity 17281 17409 +128
==========================================
Files 430 440 +10
Lines 80033 80584 +551
==========================================
+ Hits 41217 41309 +92
- Misses 38816 39275 +459
|
mattsherman
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 the updates, @nathanss !
LGTM! ![]()
|
Still happening in 7.9.0 |
|
Hi, happening with Woocommerce 7.9.0 here as well. |
|
6628287-zen |
|
Hello. There was an additional fix for this: #38967 Please update to 8.0.0 or above and see if it fixes the issue. |
|
Fixed for me in 8.0.2 |
Submission Review Guidelines:
Changes proposed in this Pull Request:
This addresses an issue where certain store alerts can be undismissable based on a race condition.
The issue itself is very hard to reproduce. I was unable to, but we're pretty sure that this was what's causing the issue.
Optional: Check #37710 for all the context that led to this solution.
Closes #36913 .
How to test the changes in this Pull Request:
Using the WooCommerce Testing Instructions Guide, include your detailed testing instructions: