Add copy to clipboard button on every address#498
Open
iyanumajekodunmi756 wants to merge 2 commits into
Open
Conversation
Expose a screen-reader-only label mode so placeholder-driven inputs can still meet WCAG 2.1 AA programmatic naming requirements via htmlFor/id. Closes CredenceOrg#381 Co-authored-by: Cursor <cursoragent@cursor.com>
- Create AddressDisplay component with truncation, hover/focus full address, and copy button - Use AddressDisplay in Dashboard for wallet address - Use AddressDisplay in Transactions for transaction hashes - Add confirmation toast on copy Closes CredenceOrg#383
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
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
Vitest test that asserts toasts dismiss FIFO and overlap is capped at 3.
Background
Test coverage in this area is currently thin: regressions can land without a failing build. Adding the cases below will lock the contract in place, document the expected behaviour through executable examples, and shorten review cycles when this code changes again.
Acceptance criteria
The change matches the summary above.
The new test fails on the current main before the fix (if this is a regression test) and passes after.
Tests run on every CI matrix entry, not just the local default.
Lint, type-check, and tests all pass locally.
PR description references this issue with Closes #.
Implementation hints
Pick the right test layer: unit tests inside the affected module for pure logic, integration tests under tests/ for cross-module behaviour.
Cover the happy path and at least one explicit sad path; the title of this issue describes the boundary that needs to be locked in.
Where the project uses proptest/fast-check/fc, prefer a property test over many hand-written cases. Commit any failing seed back to the repo.
Keep test names assertive (returns_zero_when_balance_is_zero), not interrogative.
New tests should be deterministic: no Date.now()/Math.random() without an injected fake.
Repo-specific notes
Run npm run lint, npm run build, and the unit tests locally before pushing.
If you change a public component prop, update the matching Storybook story and the docs/COMPONENTS.md entry.
Respect the design tokens (CSS variables / Tailwind config); do not hard-code colours, spacing, or radii.
Out of scope
Unrelated refactors in adjacent files.
Stylistic-only changes (formatting, renaming) that are not required by the fix.
Anything beyond the acceptance criteria above; surface follow-ups as separate issues.
How to claim and submit
Comment on this issue saying you'd like to take it on; wait for a maintainer to assign you (avoids duplicated effort).
Open a PR that references this issue (Closes #).
Make sure CI is green and request review from a CODEOWNERS maintainer.
PRs that close this issue and pass review may qualify for a reward — see the MAYBE REWARDED label and the GrantFox OSS campaign page.
closes #388