-
Notifications
You must be signed in to change notification settings - Fork 84
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
LF-4272 trim sign-up name whitespace #3395
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.
Thank you for working on this!
I think we typically trim strings on the backend using the checkAndTrimString
utility function, so we should do the same here. (@Duncan-Brain please correct me if I'm wrong!)
Good call @SayakaOno forgot all about that -- if that fixes it too that would be more robust. Could also do both FE and BE for visual input correctness in which case the trimStart() on the FE makes sense too while keeping it fully trimmed on BE! |
Thanks for the suggestions, I added the backend trimming for consistency. However, after looking at it some more, there is a regex in the frontend here that was causing the issue. It splits the I found the same bug on the invite user to farm page and checked Google SSO out of curiosity too, but Google thankfully trims whitespace in names. The combined full name field seems to make handling the data a bit awkward. |
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.
Awesome thank you for finding that second instance!
@SayakaOno has gone on holiday so I will request the second reviewer from @kathyavini
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.
The combined full name field seems to make handling the data a bit awkward.
Yeah, I think it has definitely come up in discussion before whether this is the right way to be doing it!
Thank you @kevin-wu01, it looks great!
Description
Previously, when the user tries to create an account with leading spaces in the name field it would cause an error on creation. The issue has been fixed by trimming any leading spaces in the field on blur.
Jira link
Type of change
How Has This Been Tested?
Checklist: