-
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
[PWA-632] My Account: Wishlist: Actions Menu and Edit Flow #3049
[PWA-632] My Account: Wishlist: Actions Menu and Edit Flow #3049
Conversation
- create new dialog modals for list actions, and edit wishlist
- add GQL for updateWishlist
- add new dialogs to wishlist page - add button handlers for modals
- add modal styles
- pass id from mockdata to talon - add error handling for updateWishlist - pre-populate edit modal values - add visibility field to customer wishlist query - add visibility field to mock data
- use error message from mutation - update translations - remove generic error handling - update error message styles
|
- update modal styles
- add loading state while updateWishlist is in progress
- add test coverage for new dialogs
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.
Posting what I have so far until #3041 gets us hooked up to live data. This is mostly there, really nice work 👍
packages/venia-ui/lib/components/WishlistPage/wishlistEditFavoritesListDialog.js
Outdated
Show resolved
Hide resolved
packages/venia-ui/lib/components/WishlistPage/__tests__/wishlistEditFavoritesListDialog.spec.js
Outdated
Show resolved
Hide resolved
- remove unnecessary deps - use public interfaces - add names to mocks
- update signature - mock mutation - name function mocks - update snapshots
- clarify check for name field
- create new actionMenu component and hook to separate EE functionality
refetchQueries: [{ query: getCustomerWishlistQuery }], | ||
awaitRefetchQueries: true | ||
}); | ||
await setCurrentDialog(dialogs.NONE); |
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.
As far as I know this is async but awaiting doesn't do anything. May as well remove the await
.
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 is much cleaner now. The wishlist.js
component no longer has a bunch of extra code in the talon. Instead, that responsibility is passed down to the backend-specific component, so the CE wishlist page will be much lighter in that respect.
Good job! I thought it would be more difficult :)
- update tests for new ActionMenu component
- remove unnecessary await
- remove mutation in test
QA Approved. |
Description
Add ability to edit a wishlist's name and visibility (public or private). Add additional action menu panel.
Related Issue
PWA-632
Acceptance
Verification Stakeholders
@dpatil-magento
Specification
Verification Steps
Screenshots / Screen Captures (if appropriate)
Checklist