-
Notifications
You must be signed in to change notification settings - Fork 72
[Disputes] Introduce a loading state to the “Challenge dispute” (new evidence) flow #11037
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
base: develop
Are you sure you want to change the base?
Conversation
Test the buildOption 1. Jetpack Beta
Option 2. Jurassic Ninja - available for logged-in A12s🚀 Launch a JN site with this branch 🚀 ℹ️ Install this Tampermonkey script to get more options. Build info:
Note: the build is updated when a new commit is pushed to this PR. |
Size Change: +288 B (0%) Total Size: 871 kB
ℹ️ View Unchanged
|
Closing since this change is needed to stabilize flaky tests in #11036 |
This reverts commit 9370ddc.
Re-opening, see 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.
I tested the changes and they seem to work fine, but I couldn’t actually reproduce the bad behavior in develop
. From your comments, it looks like this only happens in E2E tests when d?.evidence
isn’t fully loaded yet. Adding the extra complexity to handle that across all fields feels like a heavy workaround. A cleaner alternative might be to show a loading state until the dispute is fully loaded. Thoughts?
Thanks for the review @rtio, I’ll give the loading state approach a try. |
d3c1eed
to
6c08612
Compare
6c08612
to
4c350a0
Compare
Hi @rtio, I added the loading state as you suggested in this comment, and it’s ready for review. @lucyneb, it would be great to get your input as well since you were involved in the redesign of the disputes flow. For context: I added a loading state (screen recording attached in the description) to address an issue that surfaced during E2E runs. The tests run so fast that the form state can be unexpected. This wasn’t affecting “real” users, but it’s something we needed to address. In my view, the loading state not only fixes the issue but also improves the UX. Curious to hear your thoughts. Thanks 🙏 |
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.
Just tested. Feels like an huge improvement! Thank you for working on that.
Hi @htdat, I saw the pr: needs author reply label was added. I might be overlooking something, but I don’t see any pending feedback. Could you point me to what needs my attention? |
@mgascam - I thought that you're waiting for feedback from Design :) Feel free to merge, I do not have any further comment. |
Fixes #WOOPMNT-5307
Changes proposed in this Pull Request
This PR introduces a loading state that helps to fix a race condition in the disputes E2E tests. In the "Save for later" flow, the description is changed from "Beanie" to "my product description" and saved. However, when the dispute is revisited later, the form incorrectly shows the old value ("Beanie") instead of the updated one. Run logs
Introducing the initial loading state removes the UI race that caused flakiness and also improves the perceived performance and UX flow.
Here's a screen recording of the new spinner in action:
Screen.Recording.2025-09-08.at.17.15.49.mov
Testing instructions
Manual tests of the flow should work as expected:
npm run changelog
to add a changelog file, choosepatch
to leave it empty if the change is not significant. You can add multiple changelog files in one PR by running this command a few times.Post merge