-
Notifications
You must be signed in to change notification settings - Fork 3.5k
fix: Login – show only input error if both are present #32944
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
fix: Login – show only input error if both are present #32944
Conversation
|
@cubuspl42 Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
| const formErrorText = useMemo(() => (formError ? translate(formError) : ''), [formError, translate]); | ||
| const serverErrorText = useMemo(() => ErrorUtils.getLatestErrorMessage(props.account), [props.account]); | ||
| const hasError = !_.isEmpty(serverErrorText); | ||
| const hasServerError = !_.isEmpty(serverErrorText) && _.isEmpty(formErrorText); |
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.
What do you think about...
const hasServerError = !_.isEmpty(serverErrorText);
const hasFormError = !_.isEmpty(formErrorText);
const hasOnlyServerError = hasServerError && !hasFormError;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.
shouldShowServerError will also work
| errorText={formErrorText} | ||
| hasError={hasError} | ||
| hasError={hasServerError} |
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.
So is this consistent with this convention?
Adds red bottom border to inputs with form validation error (server error still results in a green border)
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.
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.
Would you raise a discussion 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.
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.
Well, I think we can interpret this that we got a green light here
Reviewer Checklist
Screenshots/VideosWeblogin-multiple-errors-web.mp4Mobile Web - Chromelogin-multiple-errors-android-web-compressed.mp4Mobile Web - SafariUploading login-multiple-errors-ios-web.mp4… DesktopiOSAndroidlogin-multiple-errors-android-compressed.mp4 |
jakub-trzebiatowski
left a comment
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.
Please merge main, otherwise we're good 👍
|
Done, thanks @cubuspl42 |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/lakchote in version: 1.4.14-0 🚀
|
|
🚀 Deployed to staging by https://github.com/lakchote in version: 1.4.14-0 🚀
|
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 1.4.14-6 🚀
|
Details
If both server and input errors are present on the Login page, show only the input one.
Fixed Issues
$ #32559
PROPOSAL: #32559 (comment)
Tests
Same as QA
Offline tests
N/A
QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)myBool && <MyComponent />.src/languages/*files and using the translation methodWaiting for Copylabel for a copy review on the original GH to get the correct copy.STYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))Avataris modified, I verified thatAvataris working as expected in all cases)ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
android-compressed.mp4
Android: mWeb Chrome
chrome-compressed.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
safari.mp4
MacOS: Chrome / Safari
web.mov
MacOS: Desktop
desktop.mov