-
Notifications
You must be signed in to change notification settings - Fork 112
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
[Woo POS] Variation pagination #14849
Conversation
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
|
The switch statement now requires that newly added POSItems are specifically handled.
Works great! I noticed an infinite scroll issue from the trigger state which I will fix separately.
I agree, the initial load could just use the PTR resync IMO. The difference between initial load and reload seems to be just resetting the internal states in the reload, which works for the initial load as well. I will try including this in the PTR work next. |
@@ -85,7 +86,7 @@ public final class PointOfSaleItemService: PointOfSaleItemServiceProtocol { | |||
variationID: variation.productVariationID)) | |||
}), | |||
// TODO-14696: pagination support for variations lists |
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.
nit: we can remove this TODO comment now
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.
Update: removed in 3b33919.
Part of: #14696
Description
This PR adds pagination support for variations in POS.
The feature works fully, but I think we can iterate on it a little in a future PR. There's a lot of duplication between the initial sync and next page sync – from a quick experiment, we could remove the initial sync and rely on defaults, especially since there's a separate resync function for PTR.
Steps to reproduce
Open the POS, and select a variable product to open.
Note that the first page is loaded, and if you have enough variations, scrolling down will load subsequent pages until all variations are loaded.
Testing information
N.B. The page size is still 100 in this PR; in #14843 it will be reduced to 25.
For testing, I recommend reducing it to 15 so you can see more pages loaded. If you choose too small a number that doesn't fill the screen, the scroll observation to trigger next page load won't work.
Additionally, variations will only show up if you're using WC 9.6, which is not yet released. You can work around this by commenting out ProductsRemote line 214, so that the root products list is not filtered to simple products only.
Screenshots
variation.pagination.mp4
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: