-
Notifications
You must be signed in to change notification settings - Fork 108
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] UI - Cart: Product rows #12749
Conversation
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
|
@ViewBuilder | ||
private func checkoutButton() -> some View { | ||
Button("Checkout") { | ||
viewModel.submitCart() | ||
} | ||
.padding(.all, 20) | ||
.frame(maxWidth: .infinity, idealHeight: 120) | ||
.font(.title) | ||
.foregroundColor(Color.primaryBackground) | ||
.background(Color.white) | ||
.cornerRadius(10) | ||
} |
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.
I suppose @ViewBuilder is not needed. Since there are not if
statements etc.
It might be a personal preference, but I prefer having private vars for creating view components like this, so private var checkoutButton: some View
instead of a `function.
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.
@@ -20,6 +20,12 @@ extension Color { | |||
return Color(red: 142.0 / 255.0, green: 208.0 / 255.0, blue: 240.0 / 255.0) | |||
} | |||
|
|||
/// Tertiary POS background color |
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 the comment ;) I suppose it was a copy paste :D
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.
Oops 😂 Fixed: 84e7f7f
No need to review it for now @bozidarsevo , I'll wait until the framework has been removed to merge back trunk into this branch and fix any conflict that emerges. Most likely tomorrow 🙇 |
# Conflicts: # WooCommerce/Classes/POS/Presentation/ProductCardView.swift
This is ready @bozidarsevo , the merge conflict was very straightforward and the only change was on renaming It currently targets 18.8, but feel free to update the milestone and merge it into 18.7 if you see this before the code freeze, otherwise we'll merge it next week! 👍 |
Thanks for the review!
Yeah, we saw some problems last week with the views that seem related to this. I'll ping you in the thread, reference: p1715934814114829-slack-C025A8VV728 |
Closes #12724
Closes #12706
Description
This PR updates the design for the product rows within the cart view, so they're closer to the initial wireframe. I've used the figma values of
120
for height,56
for circled buttons (+, x, .. ), and20
/32
for padding.Ref: TfaZ4LUkEwEGrxfnEFzvJj-fi-6_1657
Testing instructions
Cart
title aligned and using.title
Adding and removing products from the cart should behave normally.