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

feat(ui): login & sign-up page for IDPE #17049

Merged
merged 8 commits into from
Mar 9, 2020
Merged

feat(ui): login & sign-up page for IDPE #17049

merged 8 commits into from
Mar 9, 2020

Conversation

asalem1
Copy link
Contributor

@asalem1 asalem1 commented Feb 28, 2020

This PR is the final part in a series of PRs geared at integrating a new sign-up/ log-in flow for cloud users. The view of this page is supposed to mirror the refactored version that exists as a branch on Quartz (and will eventually become the main log-in & sign-up page for Cloud2). This PR was broken down into a separate branch and worked upon in the following PRs:

@asalem1
Copy link
Contributor Author

asalem1 commented Mar 5, 2020

Once this feature gets merged, we can start the process of rolling out the new config variables:

https://github.com/influxdata/k8s-idpe/pull/444

rgba(191, 47, 229, 0.4) 100%
) !important;
background-color: #13002d !important;
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

might be worth doing div.clockface--app-wrapper, may not be possible if more than divs are used

email: string
passwordValidation: FormFieldValidation
password: string
handleInputChange: (e: ChangeEvent<HTMLInputElement>) => void
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

event instead of e

handleInputChange,
handleForgotPasswordClick,
}) => {
const [visible, toggleIcon] = useState(false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change visible to isVisible

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change toggleIcon to toggleVisibility

size={ComponentSize.Large}
status={
emailValidation.isValid
? ComponentStatus.Error
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch the logic so that isValid displays the status when the email isValid

lastNameValidation: FormFieldValidation
password: string
passwordValidation: FormFieldValidation
handleInputChange: (e: ChangeEvent<HTMLInputElement>) => void
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

passwordValidation,
handleInputChange,
}) => {
const [visible, toggleIcon] = useState(false)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see above

]}
leave={{height: 0}}
>
{show =>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

see below

errors.confirmPasswordError = confirmPasswordError
}

const isValid = !Object.values(errors).some(error => !!error)
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change some to every to check for an empty string

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change isValid to actually mean that there are no errors, right now it's indicating that there are errors

this.setState({buttonStatus: ComponentStatus.Default})
return
}
// log the user into Quartz
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

login to auth0, not Quartz

}

private displayErrorMessage = (errors, auth0Err) => {
if (auth0Err.code.includes('error in email')) {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

switch this back to regex from Quartz

}
}

private handleInputChange = (e: ChangeEvent<HTMLInputElement>) => {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

change e to event

@asalem1 asalem1 requested a review from hoorayimhelping March 6, 2020 23:53
}

private displayErrorMessage = (errors, auth0Err) => {
if (/error in email/.test(auth0Err.code)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Copy link
Contributor

@hoorayimhelping hoorayimhelping left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice! way to dig deep on this last (exhausting) push over the finish line

asalem1 and others added 7 commits March 9, 2020 09:49
@asalem1 asalem1 merged commit 4b3b130 into master Mar 9, 2020
@asalem1 asalem1 deleted the login-epic branch March 9, 2020 17:33
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.

2 participants