-
Notifications
You must be signed in to change notification settings - Fork 682
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] Checkout Page Price Adjustments #2366
[feature] Checkout Page Price Adjustments #2366
Conversation
Signed-off-by: sirugh <[email protected]>
|
Signed-off-by: sirugh <[email protected]>
Signed-off-by: sirugh <[email protected]>
Makes input static and removes "add another" button.
Signed-off-by: sirugh <[email protected]>
Signed-off-by: sirugh <[email protected]>
Signed-off-by: sirugh <[email protected]>
@sirugh Had a look at the work, it looks good overall. Had a couple of points to raise.
|
@soumya-ashok thanks for your feedback! To preface my response it seems like the backend we are using for CI is extremely slow right now, much more so than what I experienced during development. I'll have to check with @dpatil-magento to see what's happening.
I looked into this. For gift cards we disable other interactions such as clicking "review order" or clicking "remove" on the same or other gift cards. For coupon we only disable the "review order" button but we don't disable the "remove" button for the coupon you have attempted to remove. Additionally we don't show loading spinners but we do change button backgrounds and text colors when a button is disabled. If you look closely when clicking "remove" on gift cards you can see the difference. If the disabled change is not enough of an indicator we should investigate a stylistic update for the entire application. TL;DR - I'll make sure we disable the "remove" button on coupons when the mutation is in flight. We can modify the 'disable' styles for buttons/text for the entire app but we should do so in a different ticket/story.
Looks like graphql does provide a message for us: "The coupon code isn't valid. Verify the code and try again." So I'll display that message if the server response contains it to indicate that the coupon code is not valid. For other errors are you OK with the default messaging of "An error occurred. Please try again." or do you want something else? Please let me know :)
Ah I must have crossed some wires. I'll clear it after apply but not after "check balance".
I think it'll be self explanatory when they apply the coupon. Once the user realizes only one can be applied they can easily click "remove" and then apply a different coupon if they want. Maybe do some UAT on these options for the next UI iteration. To summarize this all, my main asks are: a) Let's open a ticket for text/button disabled styles to better indicate loading state. |
My feedback was not regarding the disabled styles actually. It is that when I click the remove button, things don't look like they registered a change. They disable after a couple of seconds of delay, but by then I've tried to click the button again because I thought nothing happened the first time. Does that paint a clearer picture? I tried to get a screen-grab for you but it won't accept my coupon code :(
For coupon codes, this text works fine - "The coupon code isn't valid. Verify the code and try again."
Yes, we could. We can leave it the way it is for now. |
@soumya-ashok and I spoke on bluejeans - I fixed the |
Signed-off-by: sirugh <[email protected]>
Signed-off-by: sirugh <[email protected]>
Signed-off-by: sirugh <[email protected]>
@sirugh All changes are UX approved Note: If the entered gift card is invalid, we will not be clearing the input field because the user may have made a minor error in typing the number out. However, once the card has been entered and is valid, the input field will be cleared. |
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.
Minor suggestions for cleanup that appear to have been there before you touched things. Willing to consider them optional, nice work 👍
packages/venia-ui/lib/components/CartPage/GiftCards/giftCards.js
Outdated
Show resolved
Hide resolved
packages/venia-ui/lib/components/CartPage/GiftCards/giftCards.js
Outdated
Show resolved
Hide resolved
packages/venia-ui/lib/components/CartPage/GiftCards/giftCards.css
Outdated
Show resolved
Hide resolved
packages/peregrine/lib/talons/CartPage/PriceAdjustments/useCouponCode.js
Outdated
Show resolved
Hide resolved
packages/peregrine/lib/talons/CartPage/GiftCards/useGiftCards.js
Outdated
Show resolved
Hide resolved
Signed-off-by: sirugh <[email protected]>
Signed-off-by: sirugh <[email protected]>
Signed-off-by: sirugh <[email protected]>
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.
😎
Description
This PR uses the Cart page adjustments features (minus shipping estimator). Infact without the styling changes to the PR that is the only thing to point out - there is a Checkout Page specific Price Adjustments component since the Cart page adjustments component had the estimator.
So the major changes to this PR are styling updates. You can find reference to the specific changes in the JIRA issue.
Related Issue
Closes PWA-248.
Acceptance
Verification Stakeholders
Specification
Verification Steps
/cart
page. Go through price adjustments entering coupon code, gift card, and selecting some gift options. Changes to the price should update the summary.apollo-cache-persist
and refresh the checkout page.Screenshots / Screen Captures (if appropriate)
Checklist