-
Notifications
You must be signed in to change notification settings - Fork 8
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: improve validation and UI/UX #187
Conversation
The changes are somewhat interconnected by I can split them up if the single commit is a problem. |
* fix: centered layout in home page * fix: don't mention E.164 in phone number validation E.164 is unknown to most users. Besides, the validation never checked for it anyway and the majority of past onboardings were performed with no international prefix. * feat: accept spaces in phone numbers to lower the chance for error and improve the UX. * feat: better PA picker (Fixes italia#158) The PA picker in home page does not flicker when typing, provides loading feedback, it's properly aligned and doesn't rely on the readonly support fields anymore. The result are shown in a more intuitive way. Also, the input is debounced and makes less calls to Elasticsearch. * fix: ability to edit the form on error (Fixes italia#159) When the server side validation fails, the user can now fix what's wrong right there instead of starting over. * refactor: simplify the validators (Fixes italia#138) * feat: code hosting URL validation The validation now rejects non HTTPS URLs and URLs that don't look like a code hosting organization. (ie. https://github.com/foobar/repo will be rejected, but https://github.com/foobar won't)
* @param {string} ipa | ||
* @param {string} url | ||
*/ | ||
function checkDups(ipa, url) { | ||
function isAlreadyOnboarded(ipa, url) { |
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.
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.
@libremente the regex should already be checking for an organization, making it impossible to add a single repo
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.
That regex is fine, however we still have the org
vs user
issue, since that checks only the form of the URL and not the substance, right?
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.
@libremente That's correct but for us to tell those two cases apart we have to use the code hostings' APIs (ie, we can address that in a separate patch).
fix: centered layout in home page
fix: don't mention E.164 in phone number validation
E.164 is unknown to most users.
Besides, the validation never checked for it anyway and the
majority of past onboardings were performed with no international
prefix.
feat: accept spaces in phone numbers to lower the chance for
error and improve the UX.
feat: better PA picker (Fixes Rethink the PA picker widget #158)
The PA picker in home page does not flicker when typing,
it's properly aligned and doesn't rely on the readonly support
fields anymore.
The results are shown in a more intuitive way.
Also, the input is debounced and makes less calls to Elasticsearch.
fix: ability to edit the form on error (Fixes Can't continue the compilation on error #159)
When the server side validation fails, the user can now fix what's
wrong right there instead of starting over.
refactor: simplify the validators (Fixes Refactor the validation logic #138)
feat: code hosting URL validation
The validation now rejects non HTTPS URLs and URLs that don't
look like a code hosting organization.
(ie. https://github.com/foobar/repo will be rejected, but
https://github.com/foobar won't)