Skip to content
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

feat: address-list-section updates #426

Merged
merged 2 commits into from
Dec 18, 2024
Merged

feat: address-list-section updates #426

merged 2 commits into from
Dec 18, 2024

Conversation

chanceaclark
Copy link
Collaborator

What/why?

Tip

Hide whitespace might help reviewing.

Adds two bits of functionality to the AddressListSection component:

  • Makes setting the default address optional as some systems may not have that ability.
  • Adds a minimumAddressCount prop to enforce how many addresses can be deleted.

Set Default Logic

Below is the matrix on the prop logic:

defaultAddress value Functionality
undefined No default address functionality will be shown
{ id: null } Shows the Set Default button in a situation where a customer doesn't have a default address set
{ id: '1' } Renders the Set Default button on every address that is not the default. Shows the default label on the default address.

Testing

Set Default Logic:

Screenshot 2024-12-18 at 15 26 57
Screenshot 2024-12-18 at 15 27 10
Screenshot 2024-12-18 at 15 27 23

Minimum Address Count:

Screen.Recording.2024-12-18.at.15.42.14.mov

Copy link

vercel bot commented Dec 18, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
vibes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Dec 18, 2024 10:31pm

@chanceaclark chanceaclark changed the title Account address feat: address-list-section updates Dec 18, 2024
Copy link
Collaborator

@jorgemoya jorgemoya left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes sense to me. Looking good!

@chanceaclark chanceaclark enabled auto-merge (rebase) December 18, 2024 22:28
@chanceaclark chanceaclark merged commit 7e4ffb7 into main Dec 18, 2024
4 checks passed
@chanceaclark chanceaclark deleted the account-address branch December 18, 2024 22:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants