-
Notifications
You must be signed in to change notification settings - Fork 685
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
Implement order confirmation page #430
Conversation
This pull request is automatically deployed with Now. |
036e92b
to
5a1f9e3
Compare
@zetlen, @jimbo I grouped all code related to order confirmation page by file type in the last commit , so you can compare both approaches. @zetlen I need to know what do you think about grouping code by features. I received an email with a response on this question from @jimbo, so I am waiting for the response from you. |
447bb9d
to
724161f
Compare
@Starotitorov Thank you for your patience with this pull request. Because it is large, and the scope of the changes is more than just order confirmation page implementation, it's difficult to review. I've tested the UI flow itself and it looks great, but there are some discrepancies in the changeset:
After I've pushed some changes, I'll add a more complete review. |
cddd262
to
137218c
Compare
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 pull request is full of interesting ideas. I'm not criticizing the ideas themselves when I say that the pull request is not in an acceptable state. As a team, we should be clearer about our expectations surrounding pull requests--we seem to be relying on unspoken assumptions and we owe it to you to clarify them. Nevertheless: it is an industry-wide courtesy to limit pull requests to the narrowest scope that meets acceptance criteria.
A pull request called "Implement order confirmation page" must not contain significant work apart from implementing the order confirmation page. It should not include a new routing concept unless strictly necessary to reach the acceptance criteria of the story. We can see that it's not strictly necessary to add routing in order to make a "Create Account" button which displays a CreateAccount form, because it was not necessary to do so in #293, which is already merged and functional. So it was inappropriate to include it.
You may have legitimate objections to the implementation in #293 or anything else that is merged to the default branch. You may have an idea for a better pattern. That is normal, and welcome. I've encouraged you and the rest of the EPAM team to open issues and pull requests for architectural concerns. However, this pull requests is the wrong venue for an architecture change. Those must be evaluated independently to accurately judge their effect. Yet when I load the deployed instance of this branch and attempt to do UAT, I can't tell what behavior comes from the feature, what comes from the reorganization, and what comes from the routing change. Our team priority is to review and merge a contribution to resolve #267.
Furthermore, this practice is unfair to your other proposals. In order to consider your ideas clearly and neutrally, we need to see them by themselves. When you combine a proposed refactor, a proposed code reorganization, and a new feature into a single changeset, you inadvertently obscure your own ideas. You introduce more regressions and you cause delays in review,
Your PR asks code reviewers to distinguish between your three separate intentions as they read each line of code. As I read it, I had to frequently ask myself "Is this code part of the organization-by-feature, part of the routing change, or part of the order confirmation page?" This slowed my review down by a factor of three, which is the number of separate purposes in this changeset that I can identify. Your PR has compelled me to examine lower-priority code changes before I can review the feature itself for completeness. Furthermore, some of the functionality isn't even working--the routed CreateAccount page has validation problems that the original does not.
So I can't approve this pull request; in fact, I recommend closing this pull request and reorganizing your changeset into three separate branches. I recommend that you first create a branch starotitorov/order-confirmation-page
with the minimal order confirmation changeset which adheres to current code conventions, and open a new PR for that.
Before that PR is even merged, you can branch from it: git checkout -b starotitorov/organize-venia-by-feature starotitorov/order-confirmation-page
. In that branch, you can add code reorganization by feature. When we merge starotitorov/order-confirmation-page
, the changeset in starotitorov/organize-venia-by-feature
will get smaller automatically, because the default branch has "caught up". Queueing pull requests by individual idea in this way can keep you unblocked even when code review is delayed. If a pull request in your queue is rejected, you may have to do a difficult rebase, but at least your other ideas are preserved in a separate branch. But perhaps most importantly, a queue of minimal changesets is much easier for code reviewers to think about and help you. Please create minimal PRs and queue larger ideas in downstream branches from now on.
I know you have been waiting ten days for this, which feels like a long time in your process. But this delay comes directly from the choices you made in this PR. I know because I have been guilty of this mistake myself--and on this very project, in the year 2018. In my pull request:
- I included multiple features that I considered to be related
- I added over 8000 lines of code
- It took 41 days to merge
So this kind of mistake is not rare, and I'm sure you can correct it quickly. I'm marking this PR as "Request changes", and if you wish you can reduce the changes to the minimal order confirmation page, but I do recommend closing the PR and opening a new one from a fresh branch.
Thanks again for all your effort to improve our project, all your creative thinking, and your patience. I hope you can change your practices for the next submission. Let me know if you have any questions.
@@ -0,0 +1,22 @@ | |||
--- |
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 mentioned this before in a prior technical review meeting when I saw you had written pwa-devdocs
in this pull request. Thank you for your diligence! However, in our process, we don't write documentation directly in pwa-devdocs
. The fault here is ours for failing to communicate that policy clearly to you, so I've just opened #463 to add clarity.
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 problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://github.com/magento-research/pwa-studio/wiki/Documentation-Guidelines According to the documentation guidelines, pwa-devdocs/src/_drafts is preferred folder to put docs in. Could you, please, update this document in case there are any changes.
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.
@zetlen, @jcalcaben Could you, please, update documentation guidelines according to the new requirements to writing docs.
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.
@Starotitorov We have updated those guidelines here..
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.
Sorry, @zetlen, I guess you need to discuss this with @jcalcaben, because initially he approved this pull requests.
|
||
await dispatch(resetCheckout()); | ||
|
||
history.push(`/create-account${objectToQueryString(accountInfo)}`); |
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.
You can replace this with:
history.push(`/create-account?${new URLSearchParams(accountInfo)}`);
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.
But perhaps more importantly, when I click the Create Account button from the confirmation page, the form never validates--the submit button stays gray. When I examine the state of the form, the inputs are unbound. This does not happen when I go through the navigation menu.
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.
The bug is related to our common Input component, I have already create an issue on github #416 . Our create account form in navigation drawer has exactly the same validation bug.
Steps to reproduce https://magento-venia.now.sh/:
- Open navigation drawer.
- Fill email field in sing in form.
- Press create account button.
- Email field should be prefilled.
- Fill other form fields.
- You can see that create account button is disabled.
packages/venia-concept/src/components/CreateAccountPage/helpers.js
Outdated
Show resolved
Hide resolved
@zetlen, thank you for the code review. Actually, Each feature has it separate branch, this branch was merged into feature/order-confirmation-page, I opened a pull request for each branch. This pull requests was not reviewed, we was blocked, we needed to proceed working on the feature, so I had to merge that pull requests. |
@zetlen, so this branch is a branch for all code related to implementation of order confirmation story, in thjis story I affected routing, create account form and added code related only to order confirmation page. When you rebase branches on each other, you build a big chain and it becomes difficult to work on the feature taking into account the fact that pull requests for each separate branches are not reviewed quickly. |
@zetlen our create account form in navigation drawer has exactly the same validation bug, you reproduce this using the next steps https://magento-venia.now.sh/:
I create an issue on github. The problem is with handling initial values in our common Input component #416 |
a403111
to
0894118
Compare
89bd2f0
to
fd1ffb4
Compare
b564e89
to
2e452d7
Compare
2e452d7
to
55cb996
Compare
dcbd624
to
cbfbc74
Compare
cc9b3d4
to
b83cc68
Compare
* Connect order confirmation page to Redux * Add tests to checkoutReceipt redux domain * Add handle create account test
b83cc68
to
4600f50
Compare
4600f50
to
313bd4c
Compare
I moved code to #505 |
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.
@Starotitorov Great work updating this PR in response to feedback. 👍
I've left some more comments now that I've had a detailed look. I will also try to set up stylelint next sprint to help codify some of our CSS conventions.
This PR is a:
[x] New feature
[ ] Enhancement/Optimization
[ ] Refactor
[ ] Bugfix
[ ] Test for existing code
[ ] Documentation
Summary
Implement order confirmation page #267
Additional information