-
Notifications
You must be signed in to change notification settings - Fork 2k
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
People: First pass at disabling the invite form until invitee added #3172
Conversation
eed4030
to
f79d23c
Compare
@lezama – I think this is ready to go for now. I'd like to iterate on what happens after submitting the form and handling I will create other issues for those. |
8a40840
to
5417626
Compare
|
||
// If there are invitees, and there are no errors, let's check | ||
// if there are any pending validations. | ||
return some( usernamesOrEmails, ( value ) => { |
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.
I think this would read clearer if we use every
instead of some
.
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.
We quickly discussed this in Slack, and the condition would be ! every( /* Logic here */ )
. I'm not sure that that is more readable. So, we're going to go ahead and ship.
LGTM if you don't feel like my suggestion is an improvement :) |
…e-button People: First pass at disabling the invite form until invitee added
Previously, a user could land on the
/people/new/$site
route and submit the form right away. This change ensure that there is at least one username or email address before allowing submission.In the near future, we'll also want to handle these conditions.
What happens after a form is submitted? Disable the form until another username or email is added?What iflocalStorage
was cleared and site is not set?