-
Notifications
You must be signed in to change notification settings - Fork 5k
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
fix: add ellipsis for permit fiat values #26001
fix: add ellipsis for permit fiat values #26001
Conversation
Great PR @OGPoyraz ! Just a small lint error (jsdocs) failing the pipeline. |
475a046
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
This PR introduces ellipsis for fiat values exceeding 15 characters in permit simulations to enhance UI readability.
ui/helpers/utils/util.js
: AddedskipCharacterInEnd
parameter toshortenString
function for flexible string shortening.ui/helpers/utils/util.test.js
: Added test case forshortenString
withskipCharacterInEnd
option.ui/hooks/useFiatFormatter.ts
: Introducedshorten
option to handle long fiat values.ui/pages/confirmations/components/confirm/info/typed-sign/permit-simulation/permit-simulation.tsx
: UpdatedPermitSimulation
component to truncate long fiat values.ui/pages/confirmations/components/simulation-details/fiat-display.tsx
: Addedshorten
prop toIndividualFiatDisplay
for improved fiat value display.
6 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
PR Summary
(updates since last review)
This PR introduces ellipsis for fiat values exceeding 15 characters in permit simulations to enhance UI readability.
ui/helpers/utils/util.js
: AddedskipCharacterInEnd
parameter toshortenString
function for flexible string shortening.ui/pages/confirmations/components/simulation-details/amount-pill.tsx
: UpdatedshortenAssetId
function call to includeskipCharacterInEnd
property.ui/pages/confirmations/components/confirm/info/typed-sign/permit-simulation/permit-simulation.tsx
: UpdatedPermitSimulation
component to truncate long fiat values using the newshorten
prop inIndividualFiatDisplay
.
2 file(s) reviewed, no comment(s)
Edit PR Review Bot Settings
Quality Gate passedIssues Measures |
Builds ready [d4d259e]
Page Load Metrics (251 ± 266 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## develop #26001 +/- ##
===========================================
+ Coverage 69.67% 69.68% +0.01%
===========================================
Files 1401 1404 +3
Lines 49628 49706 +78
Branches 13713 13736 +23
===========================================
+ Hits 34577 34637 +60
- Misses 15051 15069 +18 ☔ View full report in Codecov by Sentry. |
Follow-up PR adds tooltip when ellipsis is shown and updates calculation with decimals |
Cherry-pick PR into 12.1.0 #26515 |
Description
This PR goal is to add ellipsis to the fiat value if it's more than 15 character in permit simulations.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2842
Follow-up Cherry-picked PR:
#26515
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist