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

refactor component LoginForm into functional component #68

Closed
wants to merge 2 commits into from

Conversation

ameersami
Copy link

based on #58

Copy link
Member

@razvanilin razvanilin left a comment

Choose a reason for hiding this comment

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

Looks good!
Thanks for the PR, this component is a bit messy and the refactor definitely helps to simplify it in the future.

@ameersami
Copy link
Author

@razvanilin thanks! I totally agree, if you want to make a separate issue for breaking this component up I could take a crack at it. I would recommend moving the OneaccountSVG, renderField, and the socialSignin into separate components to clean it up further.

@razvanilin
Copy link
Member

@razvanilin thanks! I totally agree, if you want to make a separate issue for breaking this component up I could take a crack at it. I would recommend moving the OneaccountSVG, renderField, and the socialSignin into separate components to clean it up further.

I'm thinking at a complete re-write of the whole renderField stuff. It's done with redux-form which I'm not really a fan of. Better to have a custom and simple validation that validates everything when the login button is pressed.

I agree re the social signing. It will need to be in a separate component.

I'll have a look into this more after I finish with the beta13 feature changes

Copy link
Member

@razvanilin razvanilin left a comment

Choose a reason for hiding this comment

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

Just gave it a test and it's not working as intended. I believe there must be something going on with how the state is assigned and how redux-form handles the input.

The behaviour is the following:

  • Click on the email field and start typing
  • The field gets deselected after the first letter
  • If focused again, it works to type the whole thing in
  • Pressing Tab to move down to the password field does not work as intended (requires 2-3 presses for it to happen)
  • Password field acts the same way as the email

Have you tested the changes you made locally and worked for you?

@razvanilin
Copy link
Member

Closing as this was already refactored

@razvanilin razvanilin closed this Jul 1, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants