-
Notifications
You must be signed in to change notification settings - Fork 137
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
[Shipping Labels Revamp] Update Carrier and Saved packages data for better state control #13104
Conversation
Generated by 🚫 Danger |
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #13104 +/- ##
============================================
- Coverage 40.51% 40.47% -0.04%
Complexity 6190 6190
============================================
Files 1287 1287
Lines 74229 74286 +57
Branches 10169 10192 +23
============================================
- Hits 30074 30069 -5
- Misses 41544 41598 +54
- Partials 2611 2619 +8 ☔ View full report in Codecov by Sentry. |
Good work @ThomazFB ! I checked that: ✅ The Carrier and Saved tabs display their loading feedback properly Some notes from my testing not related to the changes in this PR:
Screen_recording_20241211_230523.mp4Adding a custom package works, but we need to add some feedback (loading state) |
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.
LGTM!
import org.assertj.core.api.Assertions.assertThat | ||
import kotlin.test.Test | ||
|
||
class PackageDataTest { |
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!
Hey @atorresveiga! Thank you so much for testing 🙇 Regarding the scroll, I actually fixed that yesterday but noticed that the fix went with the other PR 🤦 To avoid doing git cherry picks or complicating things, I'll leave this to be fixed in that PR since the adjustment is already there, WDYT? 😬
I agree with your point! There's one thing, though. When I left the Custom package creation without loading feedback, the reasoning was how we could avoid making the user wait for the package to be saved. We could be "optimistic" about the request and just move forward with the Shipping Labels form. With that, when we hit the |
@atorresveiga I'll move forward with this PR merge to unblock the next one, and depending on what we decide from the discussion here, I can introduce some fixes through the next PR. Hope that's ok! |
My only concern is what will happen if the save request fails? If we move to the shipping label form, we cannot recover from that, and the package will not be saved. WDYT? |
Summary
Partially fix issue #12747 by introducing a series of adjustments to the Carrier and Saved packages data to allow a complete state control with loading and error handling.
The upcoming PR will be focused on triggering the selected package to the main Shipping Labels UI.
Screenshots
Screen_recording_20241211_194209.mp4
How to Test
Select a Package
buttonAdd Package
button is only enabled for the tab with an actual selected PackageUpdate release notes:
RELEASE-NOTES.txt
if necessary.Reviewer (or Author, in the case of optional code reviews):
Please make sure these conditions are met before approving the PR, or request changes if the PR needs improvement: