Skip to content

Commit 5514da9

Browse files
authored
fix: update padding for the gas fee pill component (#32170)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR aims to update the gas fee pill component padding accordingly to the [figma](https://www.figma.com/design/ZQhseNxkXtyPFfngynkpDj/Choose-gas-token?node-id=1149-21826&t=SkCW2aHM5BorIxkq-4). <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/32170?quickstart=1) ## **Related issues** Fixes: MetaMask/MetaMask-planning#4605 ## **Manual testing steps** Need to have more tokens. 1. Go to this the test dapp 2. Click on Send EIP 1559 Transaction ## **Screenshots/Recordings** ![Screenshot from 2025-04-22 14-09-57](https://github.com/user-attachments/assets/eeb71a33-bcd5-4bbf-9303-7d0c915f0cee) <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I've followed [MetaMask Contributor Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Extension Coding Standards](https://github.com/MetaMask/metamask-extension/blob/main/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/main/.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 449dea1 commit 5514da9

File tree

10 files changed

+24
-23
lines changed

10 files changed

+24
-23
lines changed

ui/pages/confirmations/components/confirm/info/__snapshots__/info.test.tsx.snap

+6-6
Original file line numberDiff line numberDiff line change
@@ -280,9 +280,9 @@ exports[`Info renders info section for approve request 1`] = `
280280
$0.08
281281
</p>
282282
<div
283-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
283+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
284284
data-testid="selected-gas-fee-token"
285-
style="cursor: default;"
285+
style="cursor: default; padding-inline-end: 6px;"
286286
>
287287
<div
288288
class="mm-box"
@@ -619,9 +619,9 @@ exports[`Info renders info section for contract interaction request 1`] = `
619619
$0.04
620620
</p>
621621
<div
622-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
622+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
623623
data-testid="selected-gas-fee-token"
624-
style="cursor: default;"
624+
style="cursor: default; padding-inline-end: 6px;"
625625
>
626626
<div
627627
class="mm-box"
@@ -1082,9 +1082,9 @@ exports[`Info renders info section for setApprovalForAll request 1`] = `
10821082
$0.08
10831083
</p>
10841084
<div
1085-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
1085+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
10861086
data-testid="selected-gas-fee-token"
1087-
style="cursor: default;"
1087+
style="cursor: default; padding-inline-end: 6px;"
10881088
>
10891089
<div
10901090
class="mm-box"

ui/pages/confirmations/components/confirm/info/approve/__snapshots__/approve.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -346,9 +346,9 @@ exports[`<ApproveInfo /> renders component for approve request 1`] = `
346346
0.0001
347347
</p>
348348
<div
349-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
349+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
350350
data-testid="selected-gas-fee-token"
351-
style="cursor: default;"
351+
style="cursor: default; padding-inline-end: 6px;"
352352
>
353353
<div
354354
class="mm-box"

ui/pages/confirmations/components/confirm/info/base-transaction-info/__snapshots__/base-transaction-info.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,9 @@ exports[`<BaseTransactionInfo /> renders component for contract interaction requ
262262
$0.04
263263
</p>
264264
<div
265-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
265+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
266266
data-testid="selected-gas-fee-token"
267-
style="cursor: default;"
267+
style="cursor: default; padding-inline-end: 6px;"
268268
>
269269
<div
270270
class="mm-box"

ui/pages/confirmations/components/confirm/info/native-transfer/__snapshots__/native-transfer.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -412,9 +412,9 @@ exports[`NativeTransferInfo renders correctly 1`] = `
412412
$0.08
413413
</p>
414414
<div
415-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
415+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
416416
data-testid="selected-gas-fee-token"
417-
style="cursor: default;"
417+
style="cursor: default; padding-inline-end: 6px;"
418418
>
419419
<div
420420
class="mm-box"

ui/pages/confirmations/components/confirm/info/nft-token-transfer/__snapshots__/nft-token-transfer.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -442,9 +442,9 @@ exports[`NFTTokenTransferInfo renders correctly 1`] = `
442442
$0.08
443443
</p>
444444
<div
445-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
445+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
446446
data-testid="selected-gas-fee-token"
447-
style="cursor: default;"
447+
style="cursor: default; padding-inline-end: 6px;"
448448
>
449449
<div
450450
class="mm-box"

ui/pages/confirmations/components/confirm/info/set-approval-for-all-info/__snapshots__/set-approval-for-all-info.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -282,9 +282,9 @@ exports[`<SetApprovalForAllInfo /> renders component for approve request 1`] = `
282282
$0.08
283283
</p>
284284
<div
285-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
285+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
286286
data-testid="selected-gas-fee-token"
287-
style="cursor: default;"
287+
style="cursor: default; padding-inline-end: 6px;"
288288
>
289289
<div
290290
class="mm-box"

ui/pages/confirmations/components/confirm/info/shared/edit-gas-fees-row/__snapshots__/edit-gas-fees-row.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,9 @@ exports[`<EditGasFeesRow /> renders component 1`] = `
7373
</div>
7474
</div>
7575
<div
76-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
76+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
7777
data-testid="selected-gas-fee-token"
78-
style="cursor: default;"
78+
style="cursor: default; padding-inline-end: 6px;"
7979
>
8080
<div
8181
class="mm-box"

ui/pages/confirmations/components/confirm/info/shared/gas-fees-section/__snapshots__/gas-fees-section.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,9 @@ exports[`<GasFeesSection /> renders component for gas fees section 1`] = `
6868
$0.04
6969
</p>
7070
<div
71-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
71+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
7272
data-testid="selected-gas-fee-token"
73-
style="cursor: default;"
73+
style="cursor: default; padding-inline-end: 6px;"
7474
>
7575
<div
7676
class="mm-box"

ui/pages/confirmations/components/confirm/info/shared/selected-gas-fee-token/selected-gas-fee-token.tsx

+2-1
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,11 @@ export function SelectedGasFeeToken() {
5959
borderRadius={BorderRadius.pill}
6060
display={Display.InlineFlex}
6161
alignItems={AlignItems.center}
62-
paddingInline={2}
62+
paddingInlineStart={1}
6363
gap={1}
6464
style={{
6565
cursor: hasGasFeeTokens ? 'pointer' : 'default',
66+
paddingInlineEnd: '6px',
6667
}}
6768
>
6869
<GasFeeTokenIcon

ui/pages/confirmations/components/confirm/info/token-transfer/__snapshots__/token-transfer.test.tsx.snap

+2-2
Original file line numberDiff line numberDiff line change
@@ -423,9 +423,9 @@ exports[`TokenTransferInfo renders correctly 1`] = `
423423
$0.08
424424
</p>
425425
<div
426-
class="mm-box mm-box--padding-inline-2 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
426+
class="mm-box mm-box--padding-inline-start-1 mm-box--display-inline-flex mm-box--gap-1 mm-box--align-items-center mm-box--background-color-background-alternative mm-box--rounded-pill"
427427
data-testid="selected-gas-fee-token"
428-
style="cursor: default;"
428+
style="cursor: default; padding-inline-end: 6px;"
429429
>
430430
<div
431431
class="mm-box"

0 commit comments

Comments
 (0)