feat: Update TransactionDetail Gas UI Styles
Description
This PR updates various gas UI styles. There are discrepancies between transaction and gas details. This PR makes the styles more consistent, cleaner, and responsive.
Figma: https://www.figma.com/design/oHNdOauz7w9PEti2zX83Cg/Gas-component?node-id=3-2837&t=wxI1mCX7Hf1TKfRk-0
It might be helpful to note that TransactionDetailITem is used in 13 various components
There is a separate issue to update the gas UI for setApprovalForAll / revoke screens: https://github.com/MetaMask/metamask-extension/issues/24769
This was a meticulous operation as we had numerous combinations to account for with various styling means, including passing nested child components and the props suffixProps and textProps to styles.
With the upcoming confirmation redesign work, we will eventually move away from these styles and TransactionDetail/TransactionDetailItem. In the meantime, we are updating the styles.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2194
Manual testing steps
- Go to Test Dapp
- Test various transactions
- Observe transaction and gas details
Screenshots/Recordings
Before
Some before screenshots can be found in the related Figma
After
Layer 2
Pre-merge author checklist
- [ ] I’ve followed MetaMask Coding Standards.
- [ ] 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 format if applicable
- [ ] I’ve applied the right labels on the PR (see labeling guidelines). 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.
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.
Builds ready [5ed793b]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (879 ± 534 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 61 | 142 | 91 | 24 | 12 |
| domContentLoaded | 9 | 71 | 18 | 15 | 7 | ||
| load | 50 | 2739 | 879 | 1112 | 534 | ||
| domInteractive | 9 | 71 | 18 | 15 | 7 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 2 KiB (0.03%)
- common: 0 Bytes (0.00%)
Builds ready [c27d9a1]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (607 ± 504 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 70 | 217 | 106 | 34 | 16 |
| domContentLoaded | 9 | 23 | 12 | 4 | 2 | ||
| load | 54 | 2836 | 607 | 1049 | 504 | ||
| domInteractive | 9 | 23 | 12 | 4 | 2 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 2.09 KiB (0.03%)
- common: 0 Bytes (0.00%)
Builds ready [c27d9a1]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (607 ± 504 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 70 | 217 | 106 | 34 | 16 |
| domContentLoaded | 9 | 23 | 12 | 4 | 2 | ||
| load | 54 | 2836 | 607 | 1049 | 504 | ||
| domInteractive | 9 | 23 | 12 | 4 | 2 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 2.09 KiB (0.03%)
- common: 0 Bytes (0.00%)
Builds ready [0c233d2]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (696 ± 519 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 66 | 163 | 99 | 26 | 13 |
| domContentLoaded | 9 | 22 | 11 | 3 | 1 | ||
| load | 55 | 2745 | 696 | 1080 | 519 | ||
| domInteractive | 9 | 22 | 11 | 3 | 1 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 2.09 KiB (0.03%)
- common: 0 Bytes (0.00%)
Codecov Report
Attention: Patch coverage is 71.42857% with 4 lines in your changes are missing coverage. Please review.
Project coverage is 65.77%. Comparing base (
85f19c2) to head (40b2a67). Report is 1 commits behind head on develop.
| Files | Patch % | Lines |
|---|---|---|
| ...saction-base/confirm-transaction-base.component.js | 42.86% | 4 Missing :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## develop #24241 +/- ##
===========================================
- Coverage 65.78% 65.77% -0.00%
===========================================
Files 1366 1366
Lines 54258 54260 +2
Branches 14103 14104 +1
===========================================
Hits 35689 35689
- Misses 18569 18571 +2
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [40b2a67]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (555 ± 462 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 66 | 140 | 95 | 19 | 9 |
| domContentLoaded | 8 | 27 | 12 | 5 | 2 | ||
| load | 53 | 2637 | 555 | 962 | 462 | ||
| domInteractive | 8 | 27 | 12 | 5 | 2 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 2.09 KiB (0.03%)
- common: 0 Bytes (0.00%)
Builds ready [40b2a67]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (555 ± 462 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 66 | 140 | 95 | 19 | 9 |
| domContentLoaded | 8 | 27 | 12 | 5 | 2 | ||
| load | 53 | 2637 | 555 | 962 | 462 | ||
| domInteractive | 8 | 27 | 12 | 5 | 2 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 2.09 KiB (0.03%)
- common: 0 Bytes (0.00%)