-
Notifications
You must be signed in to change notification settings - Fork 130
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
Country support in edit origin address screen #13407
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 #13407 +/- ##
============================================
+ Coverage 41.22% 41.26% +0.03%
- Complexity 6541 6551 +10
============================================
Files 1326 1328 +2
Lines 77687 77765 +78
Branches 10697 10709 +12
============================================
+ Hits 32030 32089 +59
- Misses 42815 42830 +15
- Partials 2842 2846 +4 ☔ View full report in Codecov by Sentry. |
import com.woocommerce.android.ui.orders.wooshippinglabels.address.GetAllCountries | ||
import javax.inject.Inject | ||
|
||
class GetAcceptedOriginCountries @Inject constructor( |
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 created two different use cases so we can reuse the get all countries use case when working on the edit destination address
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 can confirm that both the GetAllCountries
and GetAcceptedOriginCountries
are working as expected, and the list presented in the Origin Address Editing is only the small list accepted by USPS. Selection works just fine too!
LGTM!
import androidx.compose.foundation.text.BasicTextField | ||
import androidx.compose.foundation.text.KeyboardActions | ||
import androidx.compose.foundation.text.KeyboardOptions | ||
import androidx.compose.foundation.verticalScroll | ||
import androidx.compose.material.CircularProgressIndicator |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
import androidx.compose.material.Icon | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material.Scaffold | ||
import androidx.compose.material.SnackbarDuration |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
import androidx.compose.material.Icon | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material.Scaffold | ||
import androidx.compose.material.SnackbarDuration | ||
import androidx.compose.material.SnackbarHost |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
import androidx.compose.material.Icon | ||
import androidx.compose.material.MaterialTheme | ||
import androidx.compose.material.Scaffold | ||
import androidx.compose.material.SnackbarDuration | ||
import androidx.compose.material.SnackbarHost | ||
import androidx.compose.material.SnackbarHostState |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
import androidx.compose.material.SnackbarDuration | ||
import androidx.compose.material.SnackbarHost | ||
import androidx.compose.material.SnackbarHostState | ||
import androidx.compose.material.SnackbarResult |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
import androidx.compose.material.SnackbarHost | ||
import androidx.compose.material.SnackbarHostState | ||
import androidx.compose.material.SnackbarResult | ||
import androidx.compose.material.Surface |
Check warning
Code scanning / Android Lint
material and material3 are separate, incompatible design system libraries Warning
Part of: #12439
Closes: #13561
Description
This PR adds support for country selection in the edit origin address screen. Besides country selection, it also handles the loading state and errors while fetching countries from the API.
Testing information
TC1
TC2
Apply the patch below to delay the countries response and return an error
Patch
The tests that have been performed
Images/gif
Screen_recording_20250129_135535.mp4
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: