interface icon indicating copy to clipboard operation
interface copied to clipboard

fix: fix number overall on modal repay window

Open 0x4Graham opened this issue 1 year ago • 7 comments

General Changes

Fixes bug https://github.com/aave/interface/issues/1351

1351

Developer Notes

Add any notes here that may be helpful for reviewers.


Author Checklist

Please ensure you, the author, have gone through this checklist to ensure there is an efficient workflow for the reviewers.

  • [ ] The base branch is set to main
  • [ ] The title is using Conventional Commit formatting
  • [ ] The Github issue has been linked to the PR in the Development section
  • [ ] The General Changes section has been filled out
  • [ ] Developer Notes have been added (optional)

If the PR is ready for review:

  • [ ] The PR is in Open state and not in Draft mode
  • [ ] The Ready for Dev Review label has been added

Reviewer Checklist

Please ensure you, as the reviewer(s), have gone through this checklist to ensure that the code changes are ready to ship safely and to help mitigate any downstream issues that may occur.

  • [ ] End-to-end tests are passing without any errors
  • [ ] Code style generally follows existing patterns
  • [ ] Code changes do not significantly increase the application bundle size
  • [ ] If there are new 3rd-party packages, they do not introduce potential security threats
  • [ ] If there are new environment variables being added, they have been added to the .env.example file as well as the pertinant .github/actions/* files
  • [ ] There are no CI changes, or they have been approved by the DevOps and Engineering team(s)
  • [ ] Code changes have been quality checked in the ephemeral URL
  • [ ] QA verification has been completed
  • [ ] There are two or more approvals from the core team
  • [ ] Squash and merge has been checked

0x4Graham avatar Mar 08 '23 12:03 0x4Graham

This pull request has been linked to 1 task:

💡Tip: Add "Close T-3458" to the pull request title or description, to a commit message, or in a comment to mark this task as "Done" when the pull request is merged.

height[bot] avatar Mar 08 '23 12:03 height[bot]

Link T-3458

0x4Graham avatar Mar 08 '23 12:03 0x4Graham

📦 Next.js Bundle Analysis

This analysis was generated by the next.js bundle analysis action 🤖

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 503.02 KB (🟡 +113 B)
Details

The global bundle is the javascript bundle that loads alongside every page. It is in its own category because its impact is much higher - an increase to its size means that every page on your website loads slower, and a decrease means every page loads faster.

Any third party scripts you have added directly to your app using the <script> tag are not accounted for in this analysis

If you want further insight into what is behind the changes, give @next/bundle-analyzer a try!

github-actions[bot] avatar Mar 08 '23 13:03 github-actions[bot]

  • Ipfs hash: bafybeihb7xoscqsaspt7gvonlnrwyqlb4uuaxlpzocet57jwrk7ft5xarq
  • Ipfs preview link: https://bafybeihb7xoscqsaspt7gvonlnrwyqlb4uuaxlpzocet57jwrk7ft5xarq.ipfs.cf-ipfs.com/

github-actions[bot] avatar Mar 08 '23 13:03 github-actions[bot]

The problem was for users who had 0.022897.

But yes, could be a much easier design.

Sent from Outlook for iOShttps://aka.ms/o0ukef


From: Mark Grothe @.> Sent: Wednesday, March 8, 2023 6:42:46 PM To: aave/interface @.> Cc: 0xGraham @.>; Author @.> Subject: Re: [aave/interface] fix: fix number overall on modal repay window (PR #1524)

@grothem commented on this pull request.


In src/components/transactions/FlowCommons/TxModalDetails.tsxhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faave%2Finterface%2Fpull%2F1524%23discussion_r1129826094&data=05%7C01%7C%7C92ac29d536164d5930c608db1ffc87b1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638138941704794646%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=4LZzEABuME8Qbwn%2F3FFXh6P%2Bd%2FINai%2Bnrfq5rwvwB2o%3D&reserved=0:

@@ -137,7 +137,7 @@ export const DetailsNumberLineWithSub = ({ </> ) : ( <>

  •        <Box sx={{ display: 'flex', alignItems: 'center' }}>
    
  •        <Box sx={{ display: { xs: 'block', lg: 'flex' }, alignItems: 'center' }}>
    

With this change, small and medium screens are going to also be set to block since that is the default value.

I'm wondering if there's a different approach we could take here though. When the amount to repay is less than 1, it defaults to showing 7 decimal places. Maybe on xs screen sizes we could just set the number of decimals to 2 so it won't overflow? Maybe a question for @iamanastasiahttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fiamanastasia&data=05%7C01%7C%7C92ac29d536164d5930c608db1ffc87b1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638138941704794646%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=WHy2s3LyXHYF%2BwZnhMmuEf7JaTDPg%2BguY01bs6XbywQ%3D&reserved=0

— Reply to this email directly, view it on GitHubhttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Faave%2Finterface%2Fpull%2F1524%23pullrequestreview-1331149693&data=05%7C01%7C%7C92ac29d536164d5930c608db1ffc87b1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638138941704794646%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=Yuzx%2BxP4jXeTWLLczStx9K2huygTz1JnOHRw0gin1eg%3D&reserved=0, or unsubscribehttps://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fnotifications%2Funsubscribe-auth%2FABZS7JKKS7ISA22CAKVILOTW3DAJNANCNFSM6AAAAAAVTXPDTU&data=05%7C01%7C%7C92ac29d536164d5930c608db1ffc87b1%7C84df9e7fe9f640afb435aaaaaaaaaaaa%7C1%7C0%7C638138941704794646%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C3000%7C%7C%7C&sdata=UqVtt5%2FFfW9UpJ5%2Bu9PpKoYZcUrqE3l9ZiaexiPsWzo%3D&reserved=0. You are receiving this because you authored the thread.Message ID: @.***>

0x4Graham avatar Mar 08 '23 17:03 0x4Graham

on a small modal view, it becomes take 5 lines we need to reduce the count of numbers to resolve

Screenshot 2023-03-08 at 17 56 20

MareskoY avatar Mar 08 '23 17:03 MareskoY

  • Ipfs hash: bafybeiasrxacnif4u2aohcwjo4eejwvnclntdmdcierko23h4bvf3bsfx4
  • Ipfs preview link: https://bafybeiasrxacnif4u2aohcwjo4eejwvnclntdmdcierko23h4bvf3bsfx4.ipfs.cf-ipfs.com/

github-actions[bot] avatar Mar 20 '23 13:03 github-actions[bot]