-
Notifications
You must be signed in to change notification settings - Fork 121
[Local catalog] Animate updates to the item list #16418
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
Open
joshheald
wants to merge
24
commits into
trunk
Choose a base branch
from
woomob-1491-woo-poslocal-catalog-animate-updates-to-the-item-list
base: trunk
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+234
−160
Open
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
1816b32
Enable animation on item lists
joshheald c89c7e3
Rename Identifier<T> to POSItemIdentifier and remove siteID
joshheald ea8f0b5
Update item mappers to use POSItemIdentifier
joshheald f064c79
Add posItemIdentifier to CartItem protocol
joshheald c0c7707
Enable coupon duplicate detection using posItemIdentifier
joshheald 5a83e8a
Update preview helpers and mocks for POSItemIdentifier
joshheald 68616cc
Fix hardcoded itemID and update test mocks for POSItemIdentifier
joshheald 08732bf
Update all test files to use POSItemIdentifier
joshheald 4db8129
Add .error case to POSItemIdentifier.UnderlyingType
joshheald 7c10049
Update preview helpers and views to use POSItemIdentifier
joshheald 0f7018b
Make identifier copyable and fakable
joshheald 6b34d33
Update MockPOSOrderableItem to use POSItemIdentifier
joshheald 93810fb
Update MockPointOfSaleCouponService to use POSItemIdentifier
joshheald fe6d2ff
Update POSCartItemTests.makeCartItem to use POSItemIdentifier
joshheald 6abb8be
Fix POSItemActionHandlerFactoryTests helper functions
joshheald 9e25821
Fix CartViewHelperTests to use correct Cart item constructors
joshheald 3aa8ceb
Add POSItemIdentifier import to POSItemActionHandlerTests
joshheald 3741ea4
Fix TotalsViewHelperTests to use POSItemIdentifier
joshheald 33569f4
Add POSItemIdentifier imports to test files
joshheald a02954c
Fix PointOfSaleOrderControllerTests to use dual-identifier architecture
joshheald bfd4b2d
Add missing POSItemIdentifier import to TotalsViewHelperTests
joshheald c5362dd
Fix test helper functions in PointOfSaleObservableItemsControllerTests
joshheald ca33409
Add missing POSItemIdentifier import to PointOfSaleItemsControllerTests
joshheald f076409
Fix import in aggregate model tests
joshheald File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,7 @@ import Foundation | |
| import Networking | ||
| import WooFoundation | ||
| import enum NetworkingCore.OrderStatusEnum | ||
| import struct Networking.PagedItems | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This one can be removed, we're already importing Networking. |
||
| import struct NetworkingCore.Address | ||
| import struct NetworkingCore.MetaData | ||
| import struct NetworkingCore.Order | ||
|
|
@@ -58,6 +59,21 @@ extension Yosemite.JustInTimeMessage { | |
| } | ||
| } | ||
|
|
||
| extension Yosemite.POSItemIdentifier { | ||
| public func copy( | ||
| underlyingType: CopiableProp<POSItemIdentifier.UnderlyingType> = .copy, | ||
| itemID: CopiableProp<Int64> = .copy | ||
| ) -> Yosemite.POSItemIdentifier { | ||
| let underlyingType = underlyingType ?? self.underlyingType | ||
| let itemID = itemID ?? self.itemID | ||
|
|
||
| return Yosemite.POSItemIdentifier( | ||
| underlyingType: underlyingType, | ||
| itemID: itemID | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| extension Yosemite.POSOrder { | ||
| public func copy( | ||
| id: CopiableProp<Int64> = .copy, | ||
|
|
@@ -111,7 +127,7 @@ extension Yosemite.POSOrder { | |
|
|
||
| extension Yosemite.POSSimpleProduct { | ||
| public func copy( | ||
| id: CopiableProp<UUID> = .copy, | ||
| id: CopiableProp<POSItemIdentifier> = .copy, | ||
| name: CopiableProp<String> = .copy, | ||
| formattedPrice: CopiableProp<String> = .copy, | ||
| productImageSource: NullableCopiableProp<String> = .copy, | ||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
This hints that we could create the
POSItemIdentifierinternally within thePOSItemrather than injecting it, have you had the chance to explore it, and if makes sense to do so?