-
Notifications
You must be signed in to change notification settings - Fork 136
[Bulk Update Orders] Persist selection on configuration change and load more #13227
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
📲 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 #13227 +/- ##
=========================================
Coverage 40.59% 40.60%
+ Complexity 6372 6371 -1
=========================================
Files 1345 1345
Lines 77334 77325 -9
Branches 10617 10615 -2
=========================================
- Hits 31396 31394 -2
+ Misses 43177 43169 -8
- Partials 2761 2762 +1 ☔ View full report in Codecov by Sentry. |
…, using viewModel as its storage.
…gain, show list panel if on bulk selection mode.
JorgeMucientes
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.
Good job @hafizrahman. The solutions we worked on seem to be working in all cases. I'll pre-approve, while we still discuss with Hicham about possible cleaner options 👍🏼
| // Some edge cases in order selection mode, like tapping the screen with 4 fingers or using TalkBack, | ||
| // cause the order's onClick listener to gain focus over the selection tracker. | ||
| // This quick fix will prevent the app from entering an unexpected status when the app is in selection mode. | ||
| private fun shouldPreventDetailNavigation(orderId: Long): Boolean { | ||
| if (tracker?.selection?.size() != 0) { | ||
| tracker?.let { selectionTracker -> | ||
| if (selectionTracker.isSelected(orderId)) { | ||
| selectionTracker.deselect(orderId) | ||
| } else { | ||
| selectionTracker.select(orderId) | ||
| } | ||
| } | ||
| return true | ||
| } | ||
| return false | ||
| } |
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 moving this function out of OrderListFragment to call it exactly when is needed and avoid unwanted side effects.
|
Thanks! @JorgeMucientes I'll merge this once the target is |
Closes: #13218, #13231
Description
This PR adds various fixes and updates to the code so that:
Steps to reproduce
TC 1: Config change
TC 2: Load more
Testing information
The tests that have been performed
Tested this both on phone and tablet simulator for both TCs.
Images/gif
Videos incoming.
RELEASE-NOTES.txtif 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: