lightning-browser-extension
lightning-browser-extension copied to clipboard
fix(lnurlpay): disable input fields buttons #1572
Describe the changes you have made in this PR
On tapping Confirm, while loading Amount, Comment, Name, Email, Buttons, Cancel button should be disabled
Link this PR to an issue [optional]
Fixes #1572
Type of change
(Remove other not matching type)
-
fix
: Bug fix (non-breaking change which fixes an issue)
Screenshots of the changes [optional]
On tapping Confirm all these options get disabled as they should be, as details have already been specified.
How has this been tested?
Open this on your browser, tap on getAlby extension, click Send Satoshis, now on the next window after adding Amount, Comment, Name, and Email, and click on Confirm all these fields should be disabled. It's working as it should be as specified in issue.
Checklist
- [x] My code follows the style guidelines of this project and performed a self-review of my own code
- [x] New and existing tests pass locally with my changes
- [x] I checked if I need to make corresponding changes to the documentation (and made those changes if needed)
🚀 Thanks for the pull request!
Here are the current build files for testing:
Download and unzip the file for your browser. Refer to the readme for detailed install instructions.
This build is brought to you by: Adam Fiscor (who recently dropped 1337 sats)
:
The future is bright. We just have a lot of work to do.
Want to sponsor the next build? send some sats to ⚡️[email protected] (don't forget to provide your name)
Don't forget: keep stacking sats!
Instead of adding multiple disabled props to all kinds of components could we wrap the "formy" parts in a
form
like we do here?: https://github.com/getAlby/lightning-browser-extension/blob/master/src/app/screens/Send/index.tsxThis could help improve these things I hope:
- a user could send the form via "enter" (if we also move the confirm-function to the form submit)
- we could add a
fieldset
around the "input-components" and could try to only disable that, which should automatically disable all fields within: https://developer.mozilla.org/en-US/docs/Web/HTML/Element/fieldset#attr-disabled
I updated the changes. After wrapping all inputs & others with form and fieldset, the user is able to send the form also using Enter. I realised as a user, pressing enter is much user friendly than using a mouse click.
Unit tests ✅