-
Notifications
You must be signed in to change notification settings - Fork 687
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
[feature]: Order confirmation Page #2288
[feature]: Order confirmation Page #2288
Conversation
Signed-off-by: sirugh <rugh@adobe.com>
d4b8a0a
to
170aee9
Compare
|
Signed-off-by: sirugh <rugh@adobe.com>
@@ -19,7 +23,8 @@ const ItemsReview = props => { | |||
const talonProps = useItemsReview({ | |||
queries: { | |||
getItemsInCart: LIST_OF_PRODUCTS_IN_CART_QUERY | |||
} | |||
}, | |||
data: props.data |
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 want to re-use this component's UI and other logic but not the queries. I'm open to other approaches but this one seemed the most direct. If data is passed to the talon it will use it instead of making a query. Everything else remains the same.
packages/venia-ui/lib/components/CheckoutPage/checkoutPage.gql.js
Outdated
Show resolved
Hide resolved
Signed-off-by: sirugh <rugh@adobe.com>
…om create account talon
….com/magento/pwa-studio into rugh/pwa-186-order-confirmation-page
* and then, on success, invokes the `onSubmit` prop, which is usually the action. | ||
* | ||
* This talon is almost identical to the other useCreateAccount but does not | ||
* return `isSignedIn`. |
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 was a great discussion on our internal slack today around this. For now I will leave the implementations of the useCreateAccount
talons in place but at some point we will want to come back and extract the logic into a utility hook.
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.
Agree. Good to have it documented here in a comment.
Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
Signed-off-by: sirugh <rugh@adobe.com>
Looks good to me. Probably want @jimbo 's sign off on a new dependency though. |
@@ -1,34 +1,122 @@ | |||
import React from 'react'; | |||
import React, { useEffect } from 'react'; | |||
import { propType } from 'graphql-anywhere'; |
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.
Maybe rename this on import? Open to suggestions here, but I find this pretty vague.
import { propType } from 'graphql-anywhere'; | |
import { propType as queryData } from 'graphql-anywhere'; |
As for the new dependency, it's fine as long as it's only being used for its |
Signed-off-by: sirugh <rugh@adobe.com>
Couldn't find the source code for |
@sirugh Pls check the conflict and following observation > on clicking |
…Fixes test Signed-off-by: sirugh <rugh@adobe.com>
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
The order confirmation page displays data from the order that was just placed. It's different from most of our other recent components in that it must render "past" data that is no longer stored/cached.
I approached this by prefixing a query on the submission handler that fetches current order details right before placing the order. The details are then passed to the order confirmation component for rendering. The only queries/mutations that exist within the order confirmation page and its children are those around creating an account.
Note:
We combined the subscribe and create account forms into a single form due to restrictions from graphql.
Refer a friend is also deferred.
Related Issue
Closes PWA-186.
Acceptance
Verification Stakeholders
Specification
Verification Steps
If shipping info/method/payment info sections are not merged you may need to manually submit this information to the cart through graphql queries. I'll provide some that should work, just replace cart id with your own from the store.
To add shipping address/method
Go to the
/cart
page and estimate your shipping. That will attach a fake address as well as select a shipping method for your cart.To add payment method:
To add billing address:
Screenshots / Screen Captures (if appropriate)
Checklist