Skip to content

Commit

Permalink
fix: Fix alignment of long RPC labels in Networks menu (#28244)
Browse files Browse the repository at this point in the history
## **Description**

Fixes alignment for long RPC labels in the networks list

[![Open in GitHub
Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/28244?quickstart=1)

## **Related issues**

Fixes:

## **Manual testing steps**

1. Add BNB Chain to MetaMask
2. Create a second RPC for it with the label `BNB Smart Chain
(previously Binance Smart Chain Mainnet)`
3. See the label left-aligned


## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

![image
(2)](https://github.com/user-attachments/assets/eeb1a3e4-257b-42db-9130-abc79928553c)

### **After**

<img width="407" alt="SCR-20241104-iwaw"
src="https://github.com/user-attachments/assets/55435958-616e-4874-9a5c-9ef1f0554b3e">




## **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.
  • Loading branch information
darkwing authored Nov 4, 2024
1 parent 08d1854 commit 63ea629
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/components/multichain/network-list-item/index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -37,4 +37,8 @@
&__delete {
visibility: hidden;
}

&__rpc-endpoint {
max-width: 100%;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,7 @@ export const NetworkListItem = ({
as="button"
variant={TextVariant.bodySmMedium}
color={TextColor.textAlternative}
ellipsis
>
{rpcEndpoint.name ?? new URL(rpcEndpoint.url).host}
</Text>
Expand Down

0 comments on commit 63ea629

Please sign in to comment.