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
My Account Sign In. #2590
My Account Sign In. #2590
Conversation
|
Performance Test Results The following fails have been reported by WebpageTest. These numbers indicates a possible performance issue with the PR which requires further manual testing to validate. https://pr-2590.pwa-venia.com : LH Performance Expected 0.85 Actual 0.34, LH Accessibility Expected 1 Actual 0.97, LH Best Practices Expected 1 Actual 0.93, WPT Cache Expected 90 Actual 32 |
@revanth0212 this looks really good. UX approved. |
* signed in. | ||
*/ | ||
if (!isUserSignedIn) { | ||
setView(VIEWS.SIGNIN); |
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.
What if I'm creating an account, get an error, and then accidentally close the dropdown by clicking outside of it? When I go to re-open the form through the account trigger all of my input values will be gone! I think this needs some re-thinking. Since state is persistent we could keep whatever was previously opened as the rendered child and provide navigation buttons similar to how the left drawer nav works with account chip.
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.
It was a UX requirement to reset the view when the dropdown is closed. The point you raised it reasonable. @schensley any thoughts on this?
Co-authored-by: Stephen <sirugh@users.noreply.github.com>
b471bbc
to
5954897
Compare
} else { | ||
setView('SIGNIN'); | ||
} | ||
if (isUserSignedIn) { |
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.
Instead of writing 2 if cases, 1 for accountMenuIsOpen
is true and 1 for false, i took the approach of adding accountMenuIsOpen
to dependency array even though it is not used in the effect. This works but a new approach we haven't seen before in our code base. Let me know what you guys think.
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 do this in the affect immediately above this with location.pathname
. And you've already left a comment to that affect above here so I'm fine with it.
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 think the technique is fine. Good idea.
Not sure I would have chosen to reset the view to Sign In when the menu opens or closes—I might have preferred to leave it on the current view—but if that's what UX wants I'm not going to push to change it here.
} else { | ||
setView('SIGNIN'); | ||
} | ||
if (isUserSignedIn) { |
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 do this in the affect immediately above this with location.pathname
. And you've already left a comment to that affect above here so I'm fine with it.
packages/venia-ui/lib/components/AccountMenu/accountMenuItems.css
Outdated
Show resolved
Hide resolved
@sirugh I take your point generally speaking for clearing a form isn't always ideal (actually it depends on the expectations of the user), in this case account sign-in needs only a few bits of information, and the shopper is not required to do so to use the site. Persisting the error once the module is closed and re-opened seems to give the impression that either the shopper has been locked out or sign-in is broken. I think adding navigation elements to the module would introduce clutter and confusion to an otherwise simple and straightforward interaction. |
packages/venia-ui/lib/components/AccountMenu/__tests__/accountMenu.spec.js
Outdated
Show resolved
Hide resolved
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.
Approving! There are some spelling corrects to make, but besides that, good job! Thanks for the perseverance here, I know I sent you back and forth with the error handling stuff.
…Menu.spec.js Co-authored-by: Stephen <sirugh@users.noreply.github.com>
Co-authored-by: Stephen <sirugh@users.noreply.github.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.
This looks pretty good now. 👍
|
||
exports[`it renders SignIn component when the view is SIGNIN 1`] = ` | ||
<aside> | ||
<Singin Component /> |
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.
Snapshot probably needs to be updated.
} else { | ||
setView('SIGNIN'); | ||
} | ||
if (isUserSignedIn) { |
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 think the technique is fine. Good idea.
Not sure I would have chosen to reset the view to Sign In when the menu opens or closes—I might have preferred to leave it on the current view—but if that's what UX wants I'm not going to push to change it here.
"<Link>Communications</Link>", | ||
"<Link>Account Information</Link>", | ||
<div> | ||
<Link>Order History</Link> |
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.
What's going on here? 🤔
@revanth0212 Resolve the conflicts pls. |
Done dude. |
Description
Added singin section to the new My account trigger in the header section.
Related Issue
Closes PWA-625
Verification Stakeholders
@soumya-ashok
@schensley
@jimbo
Verification Steps
Sign In
trigger in the header.Screenshots / Screen Captures (if appropriate)
Checklist