Skip to content

feat(AddressDisplay): add onCopy callback, select-all on full address…#219

Open
devOgazi wants to merge 2 commits into
Sorokit:mainfrom
devOgazi:feat/address-display-oncopy-selectall-size
Open

feat(AddressDisplay): add onCopy callback, select-all on full address…#219
devOgazi wants to merge 2 commits into
Sorokit:mainfrom
devOgazi:feat/address-display-oncopy-selectall-size

Conversation

@devOgazi

Copy link
Copy Markdown

Summary

Three issues affect AddressDisplay when used in different contexts across the library.

Changes

1. onCopy callbackonCopy?: () => void fires after a successful clipboard write. Embedding components like AccountCard or a receive-funds modal can now react (e.g., show a toast notification).

2. select-all on full address — When showFull={true}, the address span gets className="select-all" so a single click selects the entire 56-char address instead of requiring drag/triple-click.

3. size prop for density controlsize?: "sm" | "md" | "lg" controls font size and icon size:

size font (showFull) icon
sm text-[10px] 10
md text-[11px] 12
lg text-[13px] 14

4. Barrel exportAddressDisplay and AddressDisplayProps are now exported from src/components/index.ts.

Acceptance Criteria

  • onCopy fires after successful clipboard write
  • Full address span has select-all when showFull={true}
  • size prop changes font and icon size appropriately
  • All existing usages continue to work with default size="md"
  • tsc --noEmit passes

Closes #187

devOgazi added 2 commits June 29, 2026 23:47
…, and size prop for density control

- Add onCopy?: () => void prop that fires after successful clipboard write
- Add className="select-all" to address span when showFull={true}
- Add size?: 'sm' | 'md' | 'lg' prop controlling font size and icon size
- Export AddressDisplay and AddressDisplayProps from barrel index.ts
- Add missing dependencies (tailwind-merge, hugeicons, test libs, jsdom)
- Add vitest config with jsdom environment and test setup cleanup
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.

fix(TransactionPanel,SorobanPanel,TopBar): no Try Again button, focus lost after Clear, no auto-dismiss countdown on error banner

1 participant