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

Finance, Token Manager: Forms MAX button #1130

Merged
merged 5 commits into from
May 25, 2020

Conversation

JuanCarlosFrutos
Copy link
Contributor

@JuanCarlosFrutos JuanCarlosFrutos commented Apr 13, 2020

Closes aragon/client#1301

It adds 'MAX' button for selecting max amount available. The button is added on these sections:

  • Finance: Deposit
  • Finance: Withdrawal
  • Token Manager: Add/Remove token

Concerns

  1. I can't input for selecting an amount on the agent app (
    According to the description of the issue, there should be).
  2. I'm not sure about test strategy on this repo so PR hasn't tested.

@welcome
Copy link

welcome bot commented Apr 13, 2020

Thanks for opening this pull request! Someone will review it soon 🔍

@CLAassistant
Copy link

CLAassistant commented Apr 13, 2020

CLA assistant check
All committers have signed the CLA.

bpierre added 2 commits May 25, 2020 22:34
Move the TextInput + “Max” button into its own component, AmountInput.

Other changes (“Max” button):

- Add a pressed state.
- Tweak the interactive area to make it fill the input field.
- Add a radius on the focus ring.
Copy link
Contributor

@bpierre bpierre left a comment

Choose a reason for hiding this comment

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

Hey @JuanCarlosFrutos, thank you for this, it’s feels so much better now! 😍

I added a few changes, nothing big:

  • Move the TextInput + “Max” button into its own component, AmountInput (making it ready to move to aragonUI later 🙌).
  • “Max” button:
    • Add a pressed state.
    • Tweak the interactive area to make it fill the input field.
    • Add a radius on the focus ring.

About your concerns:

I can't input for selecting an amount on the agent app (according to the description of the issue, there should be).

Ah yes this is a mistake, there is no panel in the Agent app.

I'm not sure about test strategy on this repo so PR hasn't tested.

I tested it manually on a few browsers and it’s working well. 👍

Thanks again, and sorry for having taken so long to review this!

@bpierre bpierre merged commit 89404d6 into aragon:master May 25, 2020
@welcome
Copy link

welcome bot commented May 25, 2020

Congrats on merging your first pull request! Aragon is proud of you 🦅
Eagle gif

@john-light
Copy link
Contributor

Just noticed this:

Token Manager: Add/Remove token

For the "add tokens" feature I'm not sure it makes sense to have a "max" button because in our templates there is either a max of 1 or no maximum (and in the latter case I'm not sure what pressing the "Max" button would do).

Thoughts?

@bpierre
Copy link
Contributor

bpierre commented May 28, 2020

@john-light Nice catch! 🙏 I opened a PR to only display it on remove: #1150

ramilexe pushed a commit to ConsiderItDone/aragon-apps that referenced this pull request Dec 9, 2021
A new component has been added locally: AmountInput. It uses TextInput internally, and
can optionally display a “Max” button.
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.

Agent, Finance, Tokens: update forms with 'max' button
4 participants