-
-
Notifications
You must be signed in to change notification settings - Fork 152
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
improved UX and error handling for wallet configuration #2594
base: master
Are you sure you want to change the base?
improved UX and error handling for wallet configuration #2594
Conversation
597f80e
to
e0bf598
Compare
e0bf598
to
ca9fcc2
Compare
Now "/" is allowed for host inputs, we use textColor instead of infoModal for invalid input handling (way better UX), outsourced/improved validation logic and added tests. |
4bde5f7
to
6612282
Compare
Latest commit fixes this edge case issue:
|
35d6a5c
to
cf02081
Compare
(rebased) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LNDHub
-
Something weird I noticed, It gives us the error when we type in the host name correctly, and not in case of a random string
-
We can add some margin here between the ErrorMessage and other content
CLNRest / LND Rest
Here as well, Not able to paste correct hostname, I can save wallet config after writing anything in host input
Also, do we get any error message somewhere on typing in incorrect values in macroon/host/rune as mentioned in the issue at some places #2172 , or it will just trigger the red text to show the error?
Uhm yeah, when URLs end with "/" we should probably allow it. I'll look into it. Random strings are allowed because I wanted to allow stuff like "localhost".
I dropped the error message idea, because I think it is better UX without modals (it is annoying to click those away). I think 99.9% of the time user just copied wrong stuff (or pasted in wrong input), so it is obvious right away what is wrong.
I agree, although not really part of this PR. |
Actually, I think we should change the GUI label from
@kaloudis If you agree, I will change all labels and rename the ValidationUtils methods accordingly (e.g. |
So, after some thoughts and reading, it makes sense to allow paths in the server address input (to allow stuff like anysubdomain.btcpayserver.org/some/path/). For paths there are more chars allowed (compared to [sub]domains). So we need to allow these chars for the path segment: Since we do not need query and fragment, we should not allow |
I can get behind this. I also want to potentially but the Port line right below it, instead of the macaroon. We ended up swapping them because of an issue where the keyboard would be covering it. Not sure if we've remedied that yet. LMK what you find. |
The issue with the keyboard covering content is long gone as far as i know. (If you see it anywhere on iOS, let me know...) So yes, good idea to put |
…aths, general improved validation
The HOST_REGEX is kind of crazy, but oh well, tests all pass, so looks good :) I think all issues we talked about are now fixed. Just that error message layout problem is still there, I'll care about that in another PR. |
Sounds good. Looking much better now |
Description
This fixes #2172 (all of it, so issue=PR description).
Additionally fixed
onFocus
and addedonBlur
forTextInput
component.This pull request is categorized as a:
Checklist
yarn run tsc
and made sure my code compiles correctlyyarn run lint
and made sure my code didn’t contain any problematic patternsyarn run prettier
and made sure my code is formatted correctlyyarn run test
and made sure all of the tests passTesting
If you modified or added a utility file, did you add new unit tests?
I have tested this PR on the following platforms (please specify OS version and phone model/VM):
I have tested this PR with the following types of nodes (please specify node version and API version where appropriate):
Locales
Third Party Dependencies and Packages
yarn
after this PR is merged inpackage.json
andyarn.lock
have been properly updatedOther: