Skip to content

feat(shared): add full-address tooltip to CopyAddress - #418

Merged
therealjhay merged 3 commits into
Betta-Pay:mainfrom
Deyanju23:feat/copy-address-tooltip
Jul 28, 2026
Merged

feat(shared): add full-address tooltip to CopyAddress#418
therealjhay merged 3 commits into
Betta-Pay:mainfrom
Deyanju23:feat/copy-address-tooltip

Conversation

@Deyanju23

Copy link
Copy Markdown
Contributor

Closes #299

Summary

Improve the CopyAddress component by exposing the full wallet address via a tooltip while preserving the existing truncated display and copy functionality.

Problem

The component currently displays truncated addresses (e.g., GBX...4Q3), making it impossible for users to verify the full address without copying it. This also limits accessibility for keyboard and screen reader users.

Solution

  • Add a tooltip (or native title attribute) displaying the full address.
  • Show the tooltip on hover and keyboard focus.
  • Add an aria-label containing the full address.
  • Preserve the existing truncated display and copy behavior.

Implementation Details

Component

Updated:

  • components/shared/CopyAddress.tsx

Changes include:

  • Displaying the full address in a tooltip or title attribute.
  • Adding an accessible aria-label with the complete address.
  • Preserving the existing truncation logic and copy interaction.

Accessibility

  • Full address available to screen readers via aria-label.
  • Tooltip accessible through both mouse hover and keyboard focus.
  • Existing focus behavior retained.

Testing Checklist

  • Truncated address still renders correctly.
  • Tooltip/title displays the full address.
  • aria-label exposes the complete address.
  • Copy functionality remains unchanged.
  • Keyboard accessibility is preserved.
  • No visual regressions introduced.

Screenshots

N/A (Small UI enhancement)

- Add SystemHealthCard component with real-time health indicators
- Add useSystemHealth hook for polling health status
- Add health checkers library (lib/health/checkers.ts)
- Add health types (lib/types/health.ts)
- Add /api/admin/health route handler
- Integrate SystemHealthCard into admin overview page
- Add SystemHealthCard unit tests
- Create components/ui/tooltip.tsx — thin @base-ui/react Tooltip wrapper
  matching the project's Popover wrapper style (Provider/Root/Trigger/Content)
- Update CopyAddress: wrap trigger in Tooltip so the full address is revealed
  on hover and keyboard focus for both the default and showIconOnly variants
- Add aria-label="Wallet address: <full>" to both variants for screen readers
- Add keyboard handler (Enter/Space) on the default variant's div trigger
- Remove old generic title attributes; tooltip now carries the address content
- Add __tests__/CopyAddress.test.tsx with 16 tests covering:
  truncation display, tooltip content, aria-label, clipboard copy (success &
  failure), keyboard activation, showIconOnly variant, and truncate=false path
@vercel

vercel Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Deyanju23 is attempting to deploy a commit to the therealjhay's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jul 28, 2026

Copy link
Copy Markdown

@Deyanju23 Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@therealjhay
therealjhay merged commit a5347c1 into Betta-Pay:main Jul 28, 2026
0 of 5 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.

CopyAddress component truncates addresses but does not show the full address in a tooltip

2 participants