Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: percentage increase feature #24223

Merged
merged 3 commits into from
Jun 21, 2024
Merged

Conversation

salimtb
Copy link
Contributor

@salimtb salimtb commented Apr 24, 2024

Description

This pull request introduces a new feature to the MetaMask extension that enhances user experience by displaying the percentage increase or decrease for each token directly within the UI. This update aims to provide users with immediate visual feedback on the performance of their tokens, helping them make more informed decisions based on recent market trends.

core PR: MetaMask/core#4206

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

  1. Go to the wallet view
  2. You should see the percentage of increase/decrease

Screenshots/Recordings

Before

Screenshot 2024-04-24 at 15 03 39

After

Screenshot 2024-04-24 at 14 53 25

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.

@salimtb salimtb requested a review from a team as a code owner April 24, 2024 13:09
@salimtb salimtb added team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead team-assets needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. labels Apr 24, 2024
Copy link
Contributor

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.

@salimtb salimtb force-pushed the percentage-increase-feature branch 6 times, most recently from 1705047 to d8a6f0b Compare April 24, 2024 14:24
@salimtb salimtb marked this pull request as draft April 24, 2024 15:02
@salimtb salimtb force-pushed the percentage-increase-feature branch 8 times, most recently from ac1c835 to 0c1792c Compare April 25, 2024 22:17
@metamaskbot
Copy link
Collaborator

Builds ready [0e141e0]
Page Load Metrics (842 ± 578 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint57162862813
domContentLoaded8331253
load4529508421203578
domInteractive8331253
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 3.7 KiB (0.06%)
  • common: 95 Bytes (0.00%)

Copy link

codecov bot commented Apr 26, 2024

Codecov Report

Attention: Patch coverage is 95.58824% with 3 lines in your changes missing coverage. Please review.

Project coverage is 65.42%. Comparing base (2115516) to head (6035cce).
Report is 16 commits behind head on develop.

Files Patch % Lines
...and-amount-change/percentage-and-amount-change.tsx 94.44% 2 Missing ⚠️
app/scripts/lib/util.ts 90.91% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24223      +/-   ##
===========================================
+ Coverage    65.39%   65.42%   +0.04%     
===========================================
  Files         1382     1384       +2     
  Lines        54764    54830      +66     
  Branches     14369    14391      +22     
===========================================
+ Hits         35809    35872      +63     
- Misses       18955    18958       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@salimtb salimtb marked this pull request as ready for review April 26, 2024 14:21
@salimtb salimtb force-pushed the percentage-increase-feature branch from 0e141e0 to cd04145 Compare May 2, 2024 08:06
@salimtb salimtb requested review from legobeat, darkwing and a team May 2, 2024 08:12
@salimtb salimtb force-pushed the percentage-increase-feature branch from cd04145 to c1cf600 Compare May 2, 2024 08:35
ui/selectors/selectors.js Outdated Show resolved Hide resolved
.storybook/test-data.js Outdated Show resolved Hide resolved
@salimtb salimtb marked this pull request as draft May 31, 2024 13:23
@salimtb salimtb force-pushed the percentage-increase-feature branch from 2360d66 to 59e5fc1 Compare June 14, 2024 22:22
@salimtb salimtb dismissed darkwing’s stale review June 14, 2024 22:25

comments resolved

@metamaskbot
Copy link
Collaborator

Builds ready [59e5fc1]
Page Load Metrics (109 ± 135 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6314181178
domContentLoaded811910
load381335109281135
domInteractive811910
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 6.25 KiB (0.09%)
  • common: 0 Bytes (0.00%)

@salimtb salimtb requested a review from bergeron June 14, 2024 23:26
@salimtb salimtb marked this pull request as ready for review June 14, 2024 23:26
Copy link
Contributor

@darkwing darkwing left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Some nits but overall looks great!

@salimtb salimtb force-pushed the percentage-increase-feature branch from 59e5fc1 to 7163e90 Compare June 19, 2024 13:47
@metamaskbot
Copy link
Collaborator

Builds ready [7163e90]
Page Load Metrics (48 ± 4 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint64927874
domContentLoaded9231242
load40644884
domInteractive9231242
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 6.5 KiB (0.09%)
  • common: 77 Bytes (0.00%)

@salimtb salimtb dismissed darkwing’s stale review June 19, 2024 21:48

comments resolved

@metamaskbot
Copy link
Collaborator

Builds ready [6035cce]
Page Load Metrics (53 ± 6 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint7212186105
domContentLoaded10171221
load4110453136
domInteractive10171121
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 6.49 KiB (0.09%)
  • common: 195 Bytes (0.00%)

Copy link
Contributor

@bergeron bergeron left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me. Tested some different chains, and tokens with/without prices.

I noticed the false positive scam warning on linea, but that's fixed by #25436

@EtherWizard33
Copy link

nice feature
code LGTM

@EtherWizard33 EtherWizard33 self-requested a review June 21, 2024 09:24
@salimtb salimtb merged commit f327c95 into develop Jun 21, 2024
74 checks passed
@salimtb salimtb deleted the percentage-increase-feature branch June 21, 2024 09:25
@github-actions github-actions bot locked and limited conversation to collaborators Jun 21, 2024
@metamaskbot metamaskbot added the release-12.1.0 Issue or pull request that will be included in release 12.1.0 label Jun 21, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
needs-assets-ux-review A shared label between the Assets and UX team to flag PRs ready for consolidated team review. release-12.1.0 Issue or pull request that will be included in release 12.1.0 team-assets team-extension-ux DEPRECATED: please use "team-wallet-ux" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants