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: added clear button for asset input #1027

Merged
merged 7 commits into from
Aug 19, 2022

Conversation

MatthewCYLau
Copy link
Contributor

@MatthewCYLau MatthewCYLau commented Aug 15, 2022

image

@MatthewCYLau MatthewCYLau changed the title Feat: added clear button for asset input Feat: Closes #836 added clear button for asset input Aug 15, 2022
@MatthewCYLau MatthewCYLau changed the title Feat: Closes #836 added clear button for asset input Feat: added clear button for asset input Aug 15, 2022
@github-actions
Copy link

github-actions bot commented Aug 16, 2022

✅ CI run has succeded!
You can find tests and deployment logs at https://github.com/aave/interface/actions/runs/2870000039'

@github-actions
Copy link

github-actions bot commented Aug 16, 2022

📦 Next.js Bundle Analysis

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

⚠️ Global Bundle Size Increased

Page Size (compressed)
global 505.62 KB (🟡 +189 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!

Three Pages Changed Size

The following pages changed size from the code in this PR compared to its base branch:

Page Size (compressed) First Load
/governance 63.46 KB (🟢 -63 B) 569.08 KB
/governance/proposal 104.42 KB (🟢 -63 B) 610.04 KB
/governance/proposal/[proposalId] 59.15 KB (🟢 -63 B) 564.77 KB
Details

Only the gzipped size is provided here based on an expert tip.

First Load is the size of the global bundle plus the bundle for the individual page. If a user were to show up to your website and land on a given page, the first load size represents the amount of javascript that user would need to download. If next/link is used, subsequent page loads would only need to download that page's bundle (the number in the "Size" column), since the global bundle has already been downloaded.

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

Next to the size is how much the size has increased or decreased compared with the base branch of this PR. If this percentage has increased by 20% or more, there will be a red status indicator applied, indicating that special attention should be given to this.

@github-actions
Copy link

Copy link
Collaborator

@grothem grothem left a comment

Choose a reason for hiding this comment

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

Thanks for the PR! I added a couple of comments.

src/components/transactions/AssetInput.tsx Outdated Show resolved Hide resolved
src/components/transactions/AssetInput.tsx Outdated Show resolved Hide resolved
@github-actions
Copy link

github-actions bot commented Aug 16, 2022

✅ CI run has succeded!
You can find tests and deployment logs at https://github.com/aave/interface/actions/runs/2870880475'

@github-actions
Copy link

@grothem
Copy link
Collaborator

grothem commented Aug 16, 2022

@iamanastasia preview link

@iamanastasia
Copy link
Contributor

Hey @grothem Thanks for the link. Although something is not working there. The X icon is not clickable.

@MatthewCYLau
Copy link
Contributor Author

MatthewCYLau commented Aug 17, 2022

Interesting - it is certainly functionally locally on my development laptop (classic)

My wallet is sadly empty. Is there a way to render Asset Input in the above feature branch environment? I'm keen to poke around myself as well thanks! 🙏

@grothem
Copy link
Collaborator

grothem commented Aug 17, 2022

@MatthewCYLau you can run the UI against a tenderly fork so you can play around without using real funds. There's a section in the contributing file that explains how to do that: https://github.com/aave/interface/blob/main/CONTRIBUTING.md#run-on-a-fork

You would do those steps after you've created the fork. You should be able to create a free account and make a fork through tenderly https://tenderly.co

Let me know if you run into any issues!

@MatthewCYLau
Copy link
Contributor Author

MatthewCYLau commented Aug 17, 2022

Thank you, @grothem 🙏

However, I'm still confused to why this seemingly small button is working fine on my local feature branch, but apparently not clickable on the feature branch environment 😅

Would any developers know if I've missed something obvious on how I'm using IconButton? Or that my logic to evaluate disabled is incorrect?

@grothem
Copy link
Collaborator

grothem commented Aug 17, 2022

Oh I see the issue, the button is being disabled if isMaxSelected. So if you manually input a number, it works. I think it makes sense to keep the button enabled in that case.

@MatthewCYLau
Copy link
Contributor Author

MatthewCYLau commented Aug 17, 2022

Okay cool! I've updated condition to only disable button when disable props is truthy. Please let me know if it now works better 🙏

@github-actions
Copy link

github-actions bot commented Aug 18, 2022

✅ CI run has succeded!
You can find tests and deployment logs at https://github.com/aave/interface/actions/runs/2879674894'

@github-actions
Copy link

@iamanastasia
Copy link
Contributor

iamanastasia commented Aug 18, 2022

@MatthewCYLau @grothem It works! Amazing! Now I don't have to struggle on mobile screens :D

I wonder can we also add these changes:

  1. Change color on hover state. Color style will change from 'Text muted' -> 'Text secondary'.

Screenshot 2022-08-18 at 13 22 50

  1. Abbreviate large numbers when input is not active, so it looks more nice.

Screenshot 2022-08-18 at 13 20 07

@MatthewCYLau
Copy link
Contributor Author

MatthewCYLau commented Aug 18, 2022

@iamanastasia thank you for the feedback 🙏 I've updated the code based on your suggestions. Please let me know what you think 🙏

  • On-hover, secondary text color is used 👇
    image

  • Active 👇
    image

  • Not active 👇 over-flow text is shown in ellipsis i.e. ...
    image

@github-actions
Copy link

github-actions bot commented Aug 18, 2022

✅ CI run has succeded!
You can find tests and deployment logs at https://github.com/aave/interface/actions/runs/2883908555'

@github-actions
Copy link

@iamanastasia
Copy link
Contributor

@MatthewCYLau that was fast 🤔 It works, and it looks great, thank you so much!

@MatthewCYLau
Copy link
Contributor Author

Amazing - thank you for the UI review 🎉

@grothem do let me know if this could be approved, and merged 🙏

Copy link
Collaborator

@grothem grothem left a comment

Choose a reason for hiding this comment

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

Thanks! Looks good 👍

@grothem grothem requested review from bojanaave and MareskoY August 18, 2022 21:19
Copy link
Collaborator

@defispartan defispartan 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!

@defispartan defispartan merged commit d820aef into aave:main Aug 19, 2022
@MatthewCYLau MatthewCYLau deleted the feat/836-add-clear-button-input branch August 19, 2022 06:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add clear button for amount inputs
5 participants