[Woo POS][Design System] Updates from design review: skeleton item card view, cash view #15244
+90
−75
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.
Parts of #15234
Description
This pull request includes several changes to the presentation and layout of views in the WooCommerce POS module. The updates focus on improving the visual appearance and responsiveness of the user interface.
GhostItemCardView Improvements:
This addresses the design review feedback qJpoXnTMMBPsgHBedaBWGv-fi-20_4288#1143087383.
@State
property to track the view width and adjusted the layout to use this width for better scaling of elements.PointOfSaleCollectCashView Enhancements:
It took me some time to figure out why there's extra padding as in the design review qJpoXnTMMBPsgHBedaBWGv-fi-18_4220#1143096631. It was because:
TotalsView
is applying a padding that shouldn't be for the cash view, this was now disabled inTotalsViewHelper
.PointOfSaleCollectCashView
's bottom padding was using the keyboard height, which is observed correctly. However, the cash view is shown outside the safe area and the bottom safe area inset contributes to the final extra padding. This is now fixed withinPointOfSaleCollectCashView
to set the bottom padding that accounts for keyboard height, safe area bottom inset, and floating control height.Changes:
GeometryReader
(despite the issues GeometryReader has like taking up remaining space, I'd still use it for one single view in the same view hierarchy level whose geometry is being read) to dynamically adjust the layout based on the available space and safe area insets. Spacer's don't always work in scroll view when the content view height doesn't have a contstraint. Now the scroll view content height has a minimum of the scroll view height so that the button can be pinned to the bottom. [1] [2]posSurfaceBright
for better visual consistency.TotalsView Adjustments:
posSurfaceBright
.TotalsViewHelper Update:
Steps to reproduce
GhostItemCardView Improvements
Cash view improvements
Cash payment
--> the cash view should have the same background color as in design (surface bright)Testing information
Screenshots
Skeleton item card view:
Cash view:
Simulator.Screen.Recording.-.iPad.Pro.11-inch.M4.-.2025-02-24.at.11.11.39.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: