-
Notifications
You must be signed in to change notification settings - Fork 131
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
Handle loading predefined packages error #13618
base: trunk
Are you sure you want to change the base?
Conversation
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the 📝 WalkthroughWalkthroughThe changes update error handling and package management UIs across several files. In the shipping label creation screen, the error display is refactored to directly use a new composable, ErrorMessageWithButton, replacing a custom Column layout. In the package creation screens, parameters related to adding packages were removed while an onRetryClick parameter was added to handle error retries. The ViewModel’s initialization now delegates data fetching to a dedicated loadData() method and includes a new public onRetryClick() method. A new string resource for a package loading error message has also been introduced. Changes
Sequence Diagram(s)sequenceDiagram
participant U as User
participant UI as ErrorMessageWithButton
participant VM as PackageCreationViewModel
participant DS as Data Source
U->>UI: Click "Retry" button
UI->>VM: onRetryClick()
VM->>VM: Show loading dialog
VM->>DS: loadData() to fetch packages
DS-->>VM: Return package data
VM->>VM: Update state and hide loading dialog
VM-->>UI: UI reflects updated data
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
📲 You can test the changes from this Pull Request in WooCommerce-Wear Android by scanning the QR code below to install the corresponding build.
|
@coderabbitai review |
✅ Actions performedReview triggered.
|
📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.
|
...oocommerce/android/ui/orders/wooshippinglabels/packages/components/ErrorMessageWithButton.kt
Dismissed
Show dismissed
Hide dismissed
...oocommerce/android/ui/orders/wooshippinglabels/packages/components/ErrorMessageWithButton.kt
Dismissed
Show dismissed
Hide dismissed
6bfc9c1
to
7a42462
Compare
7a42462
to
d49afbe
Compare
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## trunk #13618 +/- ##
============================================
- Coverage 38.06% 38.05% -0.02%
- Complexity 9058 9059 +1
============================================
Files 2058 2059 +1
Lines 112694 112725 +31
Branches 14286 14293 +7
============================================
- Hits 42898 42896 -2
- Misses 65895 65928 +33
Partials 3901 3901 ☔ View full report in Codecov by Sentry. |
Closes: #13324
Description
This updates the error screen when loading a predefined package case.
Steps to reproduce
To create a fake error response from the endpoint
To test the retry screen
Testing information
It's nice to retest #13608 as well.
The tests that have been performed
Streps above
Images/gif
After video
after.webm
RELEASE-NOTES.txt
if necessary. Use the "[Internal]" label for non-user-facing changes.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: