Skip to content
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]: Cart Coupons #2108

Merged
merged 13 commits into from
Jan 29, 2020
Merged

[feature]: Cart Coupons #2108

merged 13 commits into from
Jan 29, 2020

Conversation

sirugh
Copy link
Contributor

@sirugh sirugh commented Jan 17, 2020

Description

Adds the Coupon functionality to price adjustments.
Also updates price summary when a cart is added or removed.

Related Issue

Closes PWA-75.

Acceptance

Verification Stakeholders

Specification

Verification Steps

  1. Add a product and go to /cart.
  2. Add a coupon, pwa1423 if you are on the AWS deployed app.
  3. See price summary updated and coupon appears with "remove" button.
  4. Click remove
  5. See price summary updated and coupon is removed.

Additional Steps:

The Field component did not provide adequate spacing for a scenario where two fields are aligned next to each other in a grid and one field has a label (or error message and the other doesn't).

In order to remedy this I added a min-height value to the field label style and made field components align their content to the start rather than be stretched by default.

Please ensure that Fields across Venia still appear correctly and that there are no regressions.

Screenshots / Screen Captures (if appropriate)

Checklist

  • I have updated the documentation accordingly, if necessary.
  • I have added tests to cover my changes, if necessary.

@sirugh sirugh added the version: Minor This changeset includes functionality added in a backwards compatible manner. label Jan 17, 2020
@PWAStudioBot
Copy link
Contributor

PWAStudioBot commented Jan 17, 2020

Messages
📖

Access a deployed version of this PR here. Make sure to wait for the "pwa-pull-request-deploy" job to complete.

📖 DangerCI Failures related to missing labels/description/linked issues/etc will persist until the next push or next nightly build run (assuming they are fixed).
📖

Associated JIRA tickets: PWA-75.

Generated by 🚫 dangerJS against 6965e02

@sirugh
Copy link
Contributor Author

sirugh commented Jan 22, 2020

@dpatil-magento do you have a coupon enabled on the PR deployment that @schensley can use to test out the UI?

@dpatil-magento
Copy link
Contributor

dpatil-magento commented Jan 22, 2020

@sirugh I will create some and pass it to you all.

@sirugh sirugh marked this pull request as ready for review January 22, 2020 16:13
@schensley
Copy link

@sirugh UI looks good.
One (or two tiny things)

  1. Please remove the parentheses around the "subtracted" amount in the Pricing Summary and denote the discount with the negative sign alone.
  2. Please style the "Remove" action for (removing the coupon once it's been applied) to look like a link consistent with the current Venia styling of links.

Once done, this is approved by UX.

Thnx

@sirugh
Copy link
Contributor Author

sirugh commented Jan 22, 2020

Please remove the parentheses around the "subtracted" amount in the Pricing Summary and denote the discount with the negative sign alone.

Done!

Please style the "Remove" action for (removing the coupon once it's been applied) to look like a link consistent with the current Venia styling of links.

I set the color of the text for the "remove link" to --venia-text. We don't have a --venia-link that I could tell. This direction will probably come from the style guide and be updated in the future (as a new ticket/work item).

Thanks!

@sirugh
Copy link
Contributor Author

sirugh commented Jan 24, 2020

Might have just found a bug -- when you add a coupon it doesn't show the remove view, at least not on the aws deployed version. I'll have to fix that and check why the tests didn't catch it.

@jimbo
Copy link
Contributor

jimbo commented Jan 24, 2020

Might have just found a bug -- when you add a coupon it doesn't show the remove view, at least not on the aws deployed version. I'll have to fix that and check why the tests didn't catch it.

Did your latest commit fix this?

Copy link
Contributor

@jimbo jimbo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. We'll eventually have an official "quiet" style for our buttons defined in the styleguide; this works for now.

Copy link

@schensley schensley left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved by UX.

@dpatil-magento dpatil-magento merged commit 4ffd33b into develop Jan 29, 2020
@dpatil-magento dpatil-magento deleted the rugh/cart-coupon branch January 29, 2020 16:23
@awilcoxa awilcoxa linked an issue Feb 6, 2020 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pkg:peregrine pkg:venia-ui version: Minor This changeset includes functionality added in a backwards compatible manner.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feature]: Coupons Component
5 participants