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
[feature]: Replace ProductQuantity on Product Page with QuantityFields stepper #2690
Conversation
|
@huykon while this work does make the "stepper" quantity control more consistent with the control as it exists in cart, that its size (width) seems to only be restricted by the with of the area it exists in can present a bit of a problem in terms of recognition of the control or user expectations (see screen shot).
|
@schensley Thank for your comment so what should I do now:
|
grid-template-columns: auto 1fr auto; | ||
padding: 0 1rem; |
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.
@huykon - I would suggest this change given @schensley's feedback on sizing. This is no longer a dropdown, so I don't think anything else needs changed other than the width.
grid-template-columns: auto 1fr auto; | |
padding: 0 1rem; | |
grid-template-columns: auto 4rem auto; | |
justify-content: start; |
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 have just updated code as your recommend.
HI @huykon sorry I didn't get back to you, but it looks like you've done an excellent job. Thanks. UX approved. |
@schensley thank you |
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.
Change looks good 👍 ProductQuantity
can safely be deprecated now, but I'll create a followup to make QuantityStepper
@api and deprecate that old guy. Nice work!
@huykon @tjwiebell Let me know if we need to create follow up tickets or these needs to be handled here -
|
@dpatil-magento I will wait the confirmation from @tjwiebell to decide whether we should update or not. Thanks for your reporting |
@huykon - Let's add an optional
|
I have just updated. Please check again @tjwiebell @dpatil-magento |
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.
Tiny change to make this more consistent with the code base then this looks good to go 🚀
packages/venia-ui/lib/components/CartPage/ProductListing/quantity.js
Outdated
Show resolved
Hide resolved
Thanks @huykon @tjwiebell , there are still some breaking flows - 2 (continuing) - Make qty blank and click outside (I think at this step only good to make qty display back to 1) and enter 3 - Add an item to cart and then increase the qty and directly (keeping cursor in qty field only) hit Add to cart again - Previous qty being added agian and not newly entered one |
QA Approved. |
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.
One comment but I won't hold the PR up on it as I don't have context around discussions with UX on this change.
@@ -29,41 +30,46 @@ export const QuantityFields = props => { | |||
maskInput | |||
} = talonProps; | |||
|
|||
const errorMessage = message ? <Message>{message}</Message> : null; |
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 looks good - my only concern is that the message is a bit close to the field and not red.
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.
We stuck with the same UX from the dropdown treatment, which you recently implemented 😉 it looks pretty identical to me.
@@ -12,7 +12,7 @@ import Button from '../Button'; | |||
import Carousel from '../ProductImageCarousel'; | |||
import FormError from '../FormError'; | |||
import { fullPageLoadingIndicator } from '../LoadingIndicator'; | |||
import Quantity from '../ProductQuantity'; |
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.
Oh also, can we throw a @deprecated
label on the old ProductQuantity
component? After this PR it will only be used in the legacy mini cart.
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.
There were two things I wanted to do as a followup, prefer to just merge this:
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.
Created PWA-960, thanks for the reminder; would have missed actually creating that in the backlog.
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.
@tjwiebell please mention to me when you create that issue. I hope I can resolve that :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.
Do I have write access to approve?
Description
The quantity selector on PDP and cart don't currently match either in the way they look or in the way they behave.
The cart stepper is the latest design, and the quantity selector on PDP should be updated to match this.
Related Issue
Closes #2679.
Acceptance
Verification Stakeholders
@tjwiebell
Specification
Verification Steps
Screenshots / Screen Captures (if appropriate)
Checklist