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

Log in - Validation messages are hidden behind keyboard #4080

Closed
isagoico opened this issue Jul 15, 2021 · 27 comments
Closed

Log in - Validation messages are hidden behind keyboard #4080

isagoico opened this issue Jul 15, 2021 · 27 comments
Assignees
Labels
Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Weekly KSv2

Comments

@isagoico
Copy link

isagoico commented Jul 15, 2021

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Action Performed:

  1. In the log in screen enter an account that has 2FA enabled
  2. Enter the correct password in the password field
  3. Enter a incorrect 2FA code in the code field

Expected Result:

The message about incorrect data entry should be clearly visible

Actual Result:

Message hidden under keyboard when I entered a wrong password

Workaround:

Unknown

Platform:

Where is this issue occurring?

Web
iOS ✔️
Android
Desktop App
Mobile Web

Version Number: 1.0.78-0

Logs: https://stackoverflow.com/c/expensify/questions/4856

Notes/Photos/Videos: Any additional supporting documentation
Device: Apple iPhone XS Max - iOS 14.0.1

Bug5152879_keyboard.mp4

Expensify/Expensify Issue URL:

View all open jobs on Upwork

view this job on upwork

@MelvinBot
Copy link

Triggered auto assignment to @pecanoro (Engineering), see https://stackoverflow.com/c/expensify/questions/4319 for more details.

@isagoico isagoico changed the title Wrong password message is hidden behind keyboard Log in - Wrong password message is hidden behind keyboard Jul 15, 2021
@pecanoro pecanoro removed their assignment Jul 15, 2021
@pecanoro pecanoro added the External Added to denote the issue can be worked on by a contributor label Jul 15, 2021
@MelvinBot
Copy link

Triggered auto assignment to @jboniface (External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.

@pecanoro pecanoro added the Improvement Item broken or needs improvement. label Jul 15, 2021
@rdjuric
Copy link
Contributor

rdjuric commented Jul 15, 2021

Proposal

We can add a Keyboard.dismiss() to our validateAndSubmitForm that is called after we tap the Sign In button, this way we show the full page again and there's space for any errors.

@MelvinBot MelvinBot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 16, 2021
@MelvinBot
Copy link

Triggered auto assignment to @Julesssss (Exported), see https://stackoverflow.com/c/expensify/questions/7972 for more details.

@nikul6
Copy link

nikul6 commented Jul 16, 2021

Proposal:

We need to hide the keyboard when click on Sign In button.

@Major-Usama
Copy link

Proposal :
We can use KeyboardAwareScrollView on the whole view and then we can do Keyboard. dismiss on Sign In the button click

@masoudsm31
Copy link

Proposal:
I suggest to put the whole screen under react-native-keyboard-aware-scroll-view.
Or we can use KeyboardAvoidingView too.

https://www.npmjs.com/package/react-native-keyboard-aware-scroll-view
https://reactnative.dev/docs/keyboardavoidingview

@Julesssss
Copy link
Contributor

I think we should move the error message so that it sits beneath the input that failed.

We can add a Keyboard.dismiss()

And also do this.

@Julesssss
Copy link
Contributor

I suggest to put the whole screen under react-native-keyboard-aware-scroll-view.

The content already scrolls in this case.

@parasharrajat
Copy link
Member

There are two things that should be done here.

  1. Move the error message under the input fields.
  2. use our custom KeyboardAvoidingView to show the button over the keyboard.

@rdjuric
Copy link
Contributor

rdjuric commented Jul 16, 2021

I think we should move the error message so that it sits beneath the input that failed.

I think there was a thread on Slack about this. The error message also shows up below the button in the previous screen if the e-mail is invalid.

@UHaider
Copy link

UHaider commented Jul 16, 2021

Proposal

We should not dismiss the keyboard so that user can type in again the correct one. We can do the following

  1. We should use scrollToEnd() on existing ScrollView when there is error.

@parasharrajat
Copy link
Member

@rdjuric
Copy link
Contributor

rdjuric commented Jul 16, 2021

Thanks @parasharrajat! That's it.

So yea, I think we should change this across the login flow as it happens in other pages as well.

@dotfelixb
Copy link

For scenarios like showing a message in this case, a popup or toast is most appropriate, it captures the user's attention far better than the current implementation

@isagoico
Copy link
Author

Issue reproducible during KI retests.

@Julesssss
Copy link
Contributor

Julesssss commented Jul 19, 2021

For scenarios like showing a message in this case, a popup or toast is most appropriate, it captures the user's attention far better than the current implementation

I'm not sure I agree that a toast is a better solution than a well-placed text label.

@Julesssss Julesssss changed the title Log in - Wrong password message is hidden behind keyboard Log in - Validation messages are hidden behind keyboard Jul 19, 2021
@Julesssss
Copy link
Contributor

Julesssss commented Jul 19, 2021

As @rdjuric mentioned, this also occurs on the email/phone login step. I think it makes sense to solve these issues too, so here are the updated requirements:

  • The message about incorrect data entry should be moved above the form submit button, so that it is always visible to the user
  • Use KeyboardAvoidingView
  • If the user clicks 'Forgot Password', the validation error message should be hidden

Ideally we should display the label beneath the relevant input for each case, but this requires wider changes so let's just fix the stated issue for now

@rdjuric
Copy link
Contributor

rdjuric commented Jul 19, 2021

@Julesssss So something like

  1. Wrap our Login steps in a KeyboardAvoidingView
  2. Move our Text for state.formError to stay above our submit Button
  3. Set the state.formError to false if the user taps on forgot password

@Julesssss
Copy link
Contributor

Julesssss commented Jul 19, 2021

Thanks for the proposals and suggestions.

@parasharrajat and @rdjuric, you both helped to refine and suggest good solutions. I'll accept @rdjuric's proposal this time, as you have been assigned fewer issues than Rajat recently, and both proposals are similar.

@parasharrajat
Copy link
Member

parasharrajat commented Jul 19, 2021

@Julesssss I never meant to propose a solution for this. Otherwise it would have been stated as PROPOSAL. I just thought of giving it a right direction bcz I saw many proposal trying to take it into different directions.

@Julesssss
Copy link
Contributor

Ah, no worries. Thanks for the help anyway.

@jboniface
Copy link

invite sent to @rdjuric

@rdjuric
Copy link
Contributor

rdjuric commented Jul 21, 2021

Sent a proposal on Upwork @jboniface

@isagoico
Copy link
Author

Issue reproducible during KI retests

@arielgreen arielgreen removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 26, 2021
@isagoico
Copy link
Author

isagoico commented Aug 2, 2021

Issue not reproducible during KI retests (Fixed 🎉)

@Julesssss
Copy link
Contributor

PR was merged and deployed to prod, not sure why it remained open 😕

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Engineering External Added to denote the issue can be worked on by a contributor Improvement Item broken or needs improvement. Weekly KSv2
Projects
None yet
Development

No branches or pull requests