Skip to content

Commit 3fedf45

Browse files
authored
fix: Properly ellipsize long token names (#28392)
## **Description** Long token names were not being ellilpsized properly; this PR fixes that issue. [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28392?quickstart=1) ## **Related issues** Fixes: ## **Manual testing steps** 1. Import token contract `0x1121AcC14c63f3C872BFcA497d10926A6098AAc5` on Mainnet 2. See super long token list item title 3. See it properly ellipsized 4. Hover over to see full name ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** ![CleanShot 2024-11-08 at 11 42 53@2x](https://github.com/user-attachments/assets/f19c516d-c93b-421e-a359-77f083ecc453) ### **After** <img width="364" alt="SCR-20241108-nquw" src="https://github.com/user-attachments/assets/c90bd571-72e0-414a-9222-56a0ec706aff"> ## **Pre-merge author checklist** - [ ] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [ ] I've completed the PR template to the best of my ability - [ ] I’ve included tests if applicable - [ ] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [ ] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.
1 parent 4752afd commit 3fedf45

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ui/components/multichain/token-list-item/token-list-item.tsx

+1
Original file line numberDiff line numberDiff line change
@@ -302,6 +302,7 @@ export const TokenListItem = ({
302302
as="span"
303303
fontWeight={FontWeight.Medium}
304304
variant={TextVariant.bodyMd}
305+
display={Display.Block}
305306
ellipsis
306307
>
307308
{isStakeable ? (

0 commit comments

Comments
 (0)