Skip to content

Implement address book functionality #396#405

Merged
Mosas2000 merged 20 commits into
mainfrom
feature/address-book
May 15, 2026
Merged

Implement address book functionality #396#405
Mosas2000 merged 20 commits into
mainfrom
feature/address-book

Conversation

@Mosas2000

@Mosas2000 Mosas2000 commented May 15, 2026

Copy link
Copy Markdown
Owner

Summary

This PR implements the address book feature requested in issue #396, allowing users to save and manage frequently used Stacks addresses with custom labels.

Changes

Core Features

  • Add/Edit/Delete: Full CRUD operations for address entries
  • Search: Real-time filtering by label, address, or notes
  • Import/Export: JSON-based backup and restore functionality
  • Compact Mode: Streamlined view for quick address selection in SendTip

Components

  • AddressBook: Main component with full functionality
  • AddressBookEntry: Individual address entry display with actions
  • AddressBookForm: Form for adding and editing addresses
  • AddressBookSearch: Search input with clear functionality
  • AddressBookImportExport: Import/export interface with tabs

Storage & Validation

  • addressBook.js: LocalStorage-based persistence layer
  • addressValidation.js: Validation utilities for entries
  • Duplicate address prevention
  • Input sanitization and length enforcement

Testing

  • Comprehensive unit tests for storage layer (328 lines)
  • Validation tests for all input fields (138 lines)
  • Component tests for UI interactions (237 lines)
  • All tests passing

Styling

  • Full Tailwind CSS integration
  • Dark mode support
  • Responsive design for mobile and desktop
  • Lucide icons for consistent UI

Analytics

  • Track add, update, delete operations
  • Track import/export usage
  • Track search and selection events
  • Metrics included in analytics summary

Accessibility

  • ARIA labels and roles throughout
  • Semantic HTML structure
  • Keyboard navigation support
  • Screen reader friendly

Documentation

  • Comprehensive feature documentation
  • Usage instructions
  • Technical implementation details
  • Troubleshooting guide

Acceptance Criteria

  • Address book UI component
  • LocalStorage storage
  • Add, edit, delete addresses
  • Search and filter functionality
  • Import/export capability
  • Tests for address book

Testing

Run tests with:

npm test addressBook
npm test addressBookValidation
npm test AddressBook

Related Issue

Closes #396

@Mosas2000 Mosas2000 merged commit 0b9cbee into main May 15, 2026
6 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement address book functionality

1 participant