-
Notifications
You must be signed in to change notification settings - Fork 0
feat(contact): improve contact UI and multi-address support #119
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
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d2557c0 to
4931764
Compare
- Add ContactAvatar component with Avataaars-based avatars - Implement 8-char base64 avatar encoding for QR code embedding - Add snapdom for DOM screenshot download functionality - Remove memo from shared QR content (privacy: memo is private) - Fix store initialization: ensure contacts visible across all pages - Add AddressBookSuggestionProvider for decoupled AddressInput - Add E2E test for contact-to-transfer flow validation
- Create AppInitializer for unified store initialization at App level - Remove defensive initialization from AddressBookPage, ContactPickerJob, AddressBookSuggestionProvider - This ensures single source of truth: initialization happens once in App, components only read
- Add recentContactIds to preferences store (stores only IDs, not copies) - Add trackRecentContact action to update recent list after transfer - Update TransferTab to lookup contacts by ID from addressBookStore - Track contact on successful transfer in SendPage This follows single source of truth principle: - Contact data lives only in addressBookStore.contacts - recentContactIds is just an ordered list of ID references - Display reads from contacts using IDs, ensuring data consistency
… of truth - Delete contact-suggestion-context.tsx (unnecessary middleware layer) - AddressInput now directly uses useStore(addressBookStore) - All contact-related components read from the same addressBookStore: - AddressBookPage - AddressInput (dropdown suggestions) - ContactPickerJob (bottom sheet) - TransferTab (recent contacts) This ensures true single source of truth: - No Context Provider copying/caching data - All components directly subscribe to addressBookStore - Data consistency guaranteed across all views
- Show all contacts in picker/dropdown, disable invalid addresses - Use isValidAddressForChain() for real-time address validation - Add 3-address limit per contact (QR capacity constraint) - Add noValidAddress i18n translation - Update keyboard nav to skip disabled addresses
BREAKING CHANGE: ContactAddress no longer has chainType field - Remove chainType from ContactAddress interface - Add custom label field (e.g. 'Main', 'Exchange') - Use detectAddressFormat for chain validation instead of stored type - Update all components to display label or detected chain type - Add addressLabel input in ContactEditJob - Update QR protocol to use label instead of chainType - Limit contacts to max 3 addresses (QR capacity)
- Show custom label only (no fallback to chain type) - Multi-address input with label before address (max 3) - ContactPicker: group addresses by contact with better spacing - AddressInput: show matched contact avatar and name - Allow avatar change when editing contact (random seed) - BioForest chains are mutually compatible for address validation - Breaking: storage version 3, no migration from older versions
- Add Contact.md with ContactAvatar, ContactCard, ContactPicker specs - Update state management doc with AddressBookStore - Update component index
572cdc8 to
9be0724
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Improve contact UI, implement multi-address support, and add Avataaars-based avatar system.
Changes
Avatar System
ContactAvatarcomponent with Avataaars-based avatarsavatar:HASHURL schemeMulti-Address Support
Address Validation
AddressInput Enhancement
Breaking Changes
chainTypefield fromContactAddressDocumentation
Testing