Repository navigation
feat(AssetBadge): display issuer ID on hover and prevent text overflo… - #1005
Merged
k-deejah merged 1 commit intoOct 17, 2026
Merged
Conversation
|
@adams813 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! 🚀 |
Contributor
Author
|
@k-deejah , pls review pr |
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.
Description
Closes #915
Closes #914
Closes #913
Closes #916
This PR updates
AssetBadgeandAssetPillto display the issuer account address in an interactive tooltip on hover/focus with a 1-click copy action, prevents long custom asset codes from overflowing badge boundaries, and adds network-aware badge color variant styling along with comprehensive unit tests.Problem
AssetBadgedid not surface the issuer account address in a tooltip on hover or keyboard focus, nor did they provide a quick way to copy the full issuer public key.AssetBadge.test.tsxlacked unit test coverage verifying testnet vs. mainnet badge color variants.What Changed & How It Was Implemented
src/components/AssetBadge.tsx):AssetBadgeelements that have anassetIssuerin the shared<Tooltip>primitive (delayDuration={0}).truncateAddress(balance.assetIssuer, 6, 4)) alongside a 1-click copy button (navigator.clipboard.writeTextwith adocument.execCommand("copy")fallback for non-secure contexts and a 2-second status reset timer).tabIndex={0}and focus ring styling to non-button badges with an issuer so keyboard users can focus the badge to trigger the tooltip.src/components/AssetBadge.tsx):truncate max-w-[12ch]andtitle={code}to the asset code label insideAssetBadgeandAssetPill, and ensured flex containers includemin-w-0so long codes ellipsis cleanly without breaking layout.src/components/AssetBadge.tsx):networkprop ("mainnet" | "testnet" | (string & {})) toAssetBadgePropsandAssetPillPropsso testnet assets render with theme-aware warning tokens (bg-warning-dim text-warning) unless overridden bycolorMap.src/components/AssetBadge.test.tsx):XLM) andliquidity_pool_shares(LP) badges do not render an issuer tooltip.truncateandmax-w-[12ch]classes on long asset codes (> 12chars) for bothAssetBadgeandAssetPill.testnetvs.mainnetbadge color variants andcolorMapprecedence.Testing
npx vitest run src/components/AssetBadge.test.tsx) — all tests pass.npm run validate) — zero errors