-
Notifications
You must be signed in to change notification settings - Fork 4
refactor(views/SignIn): split component and hooks #114
Conversation
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'm having a hard time correctly configuring this application. I have a file named: .env.development.local
I have been using to configure it, however I'm still getting:
because UserPoolId
is not undefined. I tried having that config file at the root of the application, then I put exports on the variables in the file and imported the variables into the environment. Neither worked. Do me a monster favor and put detailed configuration instructions into the README or the PR instructions (README is better because it will stay there for future reference) and I'll review it again.
cd98a48
to
030c570
Compare
@qtpeters all you need to do is cp .env.test .env.development.local and then enter in the right values for the dev environment. I sent you these values on Slack. |
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.
All tests passing
030c570
to
c7f61c9
Compare
c7f61c9
to
1719b7e
Compare
a7caba0
to
45d663e
Compare
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.
Testing it worked. LGTM
bcc3a48
to
ea2e4ac
Compare
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.
👍
🎉 This PR is included in version 1.4.1 🎉 The release is available on GitHub release Your semantic-release bot 📦🚀 |
Summary
This PR focuses on improving the accessibility and best practices of the existing sign-in view. It splits the SignIn view into multiple files, and pulls out hooks into a custom hook instead of implementing them inside the component itself. It also includes changes related to the file structure, moving all sign-in related files into a single directory.
The main changes are:
react-hook-form
library for managing form state and validation is now consistent throughout the entire form.aria-describedby
attribute, improving accessibility.FormControlInput
that is a reusable form input with react-hook-form controls.PasswordVisibilityToggle
to manage the show/hide password functionality, enhancing code reusability.useSignIn
hook, increasing the code's reliability.Other:
SignInGraphic
intoSignIn.components.tsx
Related Issues
How to test
yarn start
- start the application and log in to verify that the sign in page behaves as expected.Coverage: