-
Notifications
You must be signed in to change notification settings - Fork 16
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
Address actions #2308
Address actions #2308
Conversation
- add delete functionality for address entries - move isUploadingData state to parent component - refactor child components to use shared loading state
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
…ne address form types - Refactored translation key to use ICU select pattern for dynamic translations. - use useMemo to find primary, billing, address - Defined constant ADDRESS_FORM_TYPE for address form actions (add, edit) and associated type.
…ze modal rendering with useMemo and useCallback"
… to the root 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.
Functionality looks good to me.
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.
@sunilsabatp Mostly minor feedback, except for the state management of addressAction
"deleteAddress": "Delete Address", | ||
"delete": "Delete", | ||
"addressConfirmationMessage": "Are you sure you want to set this address as your {addressType, select, mailing {billing} other {{addressType}}} address? {isAddressSet, select, true {This will replace your current {addressType, select, mailing {billing} other {{addressType}}} address.} other {}}", | ||
"deleteAddressConfirmationMessage": "Are you sure you want to delete this address? If you want to use it again, please add it as a new address.", | ||
"confirm": "Confirm", | ||
"address2": "Address 2(optional)", |
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.
Do some of the keys that are currently outside need to be moved/grouped?
For example, I see delete
, and address2
keys
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'll handle this in a separate PR.
src/features/user/Settings/EditProfile/AddressManagment/index.tsx
Outdated
Show resolved
Hide resolved
src/features/user/Settings/EditProfile/AddressManagment/index.tsx
Outdated
Show resolved
Hide resolved
src/features/user/Settings/EditProfile/AddressManagment/index.tsx
Outdated
Show resolved
Hide resolved
src/features/user/Settings/EditProfile/AddressManagment/AddressDeleteModal.tsx
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.
Could you clean up this scss file? Spacing between classes is erratic
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'll cover in this #2312
- fetchUserAddresses -> updateUserAddresses - AddressDeleteModal -> DeleteAddress - AddressTypeConfirmationModal -> UpdateAddressType
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.
@sunilsabatp Made a couple of small changes. LGTM.
This PR handle the address actions (
delete, setPrimary, setBilling
).