[Woo POS] Improve card reader software update image #15855
Merged
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.

WOOMOB-114
Description
The card reader update images are represented in poor quality and blink when progress changes
Solution
The image quality can be easily fixed by updating
UIGraphicsBeginImageContextWithOptions(rect.size)toUIGraphicsBeginImageContextWithOptions(rect.size, false, 0.0), which makes sure that the correct scale image is picked.However, we cannot ensure smooth animation by generating new images every time a progress value changes.
SwiftUIdoesn't know how to properly animate between two images.The solution to have a smooth animation was to create a
PointOfSaleCardPresentPaymentReaderUpdateProgressView, which can animate the update progress within a circle.Steps to reproduce
POS
Terminal.shared.simulatorConfiguration.availableReaderUpdate = .requiredwithinStripeCardReaderServiceIPP
Verify IPP works correctly. I only updated the image color since it used old brand colors, I haven't replaced it with new animation.
Testing information
Tested on iPad Air 18.5 and 20.6 simulator
Screenshots
POS
progress.view.mov
IPP
RELEASE-NOTES.txtif necessary.