Skip to content

feat(AddressDisplay): masked display mode, mono font toggle, dl/dt/dd structure when label is provided #366

Description

@k-deejah

Problem

1. AddressDisplay does not support a masked mode that hides the middle of the address — some privacy-focused UIs want to show only the first 4 and last 4 characters (e.g. GBAM...ZJQZ) with the middle completely hidden, unlike truncateAddress which shows more context characters by default.

2. AddressDisplay does not support a monospace font toggle — Stellar addresses are best read in monospace, but the default rendering inherits the parent font. An mono?: boolean prop would apply font-mono to the address span.

3. AddressDisplay wraps label and address in separate DOM layers with no logical grouping — the label span and address span are siblings in a flex column, but there is no <dl>/<dt>/<dd> structure or aria-labelledby linking the label to the value for screen readers.

Solution

  1. Add masked?: boolean prop — when true, shows only the first 4 and last 4 chars with ··· in the middle regardless of start/end props.
  2. Add mono?: boolean prop — applies font-mono to the address <span>.
  3. Wrap the component in a <dl> when label is provided; use <dt> for label and <dd> for address + copy button.

Acceptance Criteria

  • masked mode shows GBAM···ZJQZ format
  • mono prop applies monospace font to the address
  • label provided renders <dl>/<dt>/<dd> structure
  • npm run build and tsc --noEmit pass

Note for Contributors: Write a clear PR description. Include a screenshot of masked mode and the monospace vs non-monospace comparison.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave programenhancementNew feature or request

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions