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

Fix address input field validation #2360

Merged
merged 4 commits into from
Sep 20, 2024

Conversation

adamgall
Copy link
Member

fixes #2355

The only sucky thing here is that it requires the user to click out of the address input field in order for the validation to work. Spoke with @Da-Colon about potential alternative approaches to "fix" this, but I don't want to put more time into it.

To test (and compare behavior between dev/prod and this PR)

  1. load up a DAO which has some treasury assets, and you're able to create proposals on
  2. go to the Treasury page
  3. click the "send assets" button or whatever it's called
  4. Play around with typing valid and invalid ENS names into the recipient field.

The behavior should be more "consistent" on this branch. Behavior meaning, input validation and the "create proposal" button becoming enabled.

Copy link

netlify bot commented Sep 20, 2024

Deploy Preview for decent-interface-dev ready!

Name Link
🔨 Latest commit 02d4c86
🔍 Latest deploy log https://app.netlify.com/sites/decent-interface-dev/deploys/66edd64b0b2bfb0009121be6
😎 Deploy Preview https://deploy-preview-2360.app.dev.decentdao.org
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site configuration.

@adamgall
Copy link
Member Author

there are still some issues with this code... Here's what I'm experiencing:

  1. go to Treasury
  2. open Send Assets modal
  3. select asset and type valid amount
  4. type valid ENS name
  5. debouncing works as expected, and the address is properly validated, and the "Submit Proposal" button becomes active!! yay!
  6. BUT, then, it takes TWO clicks on the Submit Proposal button until that action is registered. Clicking it once, as far as I can tell, will make the form re-validate one more time, but it doesn't actually trigger the action to happen. Gotta click it one more time after that. Kinda weird.

@Da-Colon
Copy link
Contributor

there are still some issues with this code... Here's what I'm experiencing:

  1. go to Treasury
  2. open Send Assets modal
  3. select asset and type valid amount
  4. type valid ENS name
  5. debouncing works as expected, and the address is properly validated, and the "Submit Proposal" button becomes active!! yay!
  6. BUT, then, it takes TWO clicks on the Submit Proposal button until that action is registered. Clicking it once, as far as I can tell, will make the form re-validate one more time, but it doesn't actually trigger the action to happen. Gotta click it one more time after that. Kinda weird.

that is weird. I'll look into it

@Da-Colon
Copy link
Contributor

there are still some issues with this code... Here's what I'm experiencing:

  1. go to Treasury
  2. open Send Assets modal
  3. select asset and type valid amount
  4. type valid ENS name
  5. debouncing works as expected, and the address is properly validated, and the "Submit Proposal" button becomes active!! yay!
  6. BUT, then, it takes TWO clicks on the Submit Proposal button until that action is registered. Clicking it once, as far as I can tell, will make the form re-validate one more time, but it doesn't actually trigger the action to happen. Gotta click it one more time after that. Kinda weird.

Just attempted a few times not getting htat behavior

@adamgall
Copy link
Member Author

there are still some issues with this code... Here's what I'm experiencing:

  1. go to Treasury
  2. open Send Assets modal
  3. select asset and type valid amount
  4. type valid ENS name
  5. debouncing works as expected, and the address is properly validated, and the "Submit Proposal" button becomes active!! yay!
  6. BUT, then, it takes TWO clicks on the Submit Proposal button until that action is registered. Clicking it once, as far as I can tell, will make the form re-validate one more time, but it doesn't actually trigger the action to happen. Gotta click it one more time after that. Kinda weird.

Just attempted a few times not getting htat behavior

Hmmmmm really? I'm consistently reproducing it on my side. Screenshare?

@adamgall
Copy link
Member Author

Seems like a Frame issue, not gonna worry about it.

@adamgall adamgall merged commit 80be2fe into develop Sep 20, 2024
6 of 7 checks passed
@adamgall adamgall deleted the fix-address-input-field-validation branch September 20, 2024 20:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Send Assets recipient input is kind of flakey when using ENS name
2 participants