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

[HOLD for payment 2022-12-23] [$2000] [Bug] Keyboard being open/closed changes position of ToS on certain mobile platforms - reported by @gadhiyamanan #11277

Closed
mvtglobally opened this issue Sep 26, 2022 · 81 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Improvement Item broken or needs improvement. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review

Comments

@mvtglobally
Copy link

mvtglobally commented Sep 26, 2022

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. Open login page on a fresh install OR after clearing app data
  2. Enter email/phone number.
  3. Open the touch screen keyboard by tapping on the login text input. Notice how the Terms and Licenses don't shift upwards to avoid the keyboard.
  4. Press "Continue" to get to the password form.
  5. Repeat step 3 with the password input. Notice how the Terms and Licenses doesn't shift upwards to avoid the keyboard.

Expected Result:

  • The Terms and Licenses should shift upwards to avoid the keyboard on both the login and password forms.

Actual result:

  • The page becomes scrollable, and you can scroll the login/password input out of view or out of view
  • The Terms and Licenses are not visible

Workaround:

None

Platform:

Where is this issue occurring?

  • iOS Safari
  • iOS Native
  • Android Chrome

Version Number: 1.2.4-0
Reproducible in staging?: need repro
Reproducible in production?: need repro
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

iOS - Both forms are broken
ios.login.broken.mov
ios.password.broken.mov
Mobile Safari - Both forms are broken
mobile.safari.login.broken.mov
mobile.safari.password.broken.mov
Mobile Chrome - Interestingly, it appears to work on the login form, but not the password form
mobile.chrome.password.broken.mov
mobile.chrome.login.mov

Expensify/Expensify Issue URL:
Issue reported by: @gadhiyamanan
Slack conversation: https://expensify.slack.com/archives/C01GTK53T8Q/p1661843853973199

View all open jobs on GitHub

@mvtglobally mvtglobally added AutoAssignerTriage Auto assign issues for triage to an available triage team member Daily KSv2 labels Sep 26, 2022
@melvin-bot
Copy link

melvin-bot bot commented Sep 26, 2022

Triggered auto assignment to @JmillsExpensify (AutoAssignerTriage), see https://stackoverflow.com/c/expensify/questions/4749 for more details.

@melvin-bot melvin-bot bot removed the AutoAssignerTriage Auto assign issues for triage to an available triage team member label Sep 26, 2022
@mvtglobally mvtglobally added Needs Reproduction Reproducible steps needed and removed Daily KSv2 labels Sep 26, 2022
@JmillsExpensify
Copy link

I'm on iOS, so I'm unable to reproduce. That said, can you clarify exactly what you mean by "instruction goes up?" I'm not following what the issue is here. Thank you!

@gadhiyamanan
Copy link
Contributor

@JmillsExpensify here instruction means By logging in, you agree to the... , when you click on the phone field there is a large gap between the continue button and the instruction. after typing any word, space will remove

it's reproduced on android

@melvin-bot melvin-bot bot added the Monthly KSv2 label Sep 29, 2022
@JmillsExpensify
Copy link

Ok thanks. Still unable to reproduce since I don't have an android device. That said, I have a suspicion that this is yet another symptom of our keyboard implementation. @roryabraham do you mind confirming if you think my hunch is right? If so, I'll update the issue title, put this issue on hold, and add it to the main tracker.

@roryabraham
Copy link
Contributor

Okay, I was able to reproduce this, going to update the OP to add some additional details then I agree we should add it to the keyboard tracking issue (cc @tgolen)

@JmillsExpensify
Copy link

Thanks @roryabraham! I'll handle adding to the keyboard tracking issue.

@JmillsExpensify JmillsExpensify changed the title login page UI not consistent - reported by @gadhiyamanan [Hold #1027e] Keyboard being open/closed changes position of ToS - reported by @gadhiyamanan Oct 4, 2022
@JmillsExpensify JmillsExpensify changed the title [Hold #1027e] Keyboard being open/closed changes position of ToS - reported by @gadhiyamanan [Hold #10273] Keyboard being open/closed changes position of ToS - reported by @gadhiyamanan Oct 4, 2022
@roryabraham
Copy link
Contributor

Added clarification and consistent reproduction steps, removed the Needs Reproduction label.

@roryabraham roryabraham added Engineering Improvement Item broken or needs improvement. and removed Needs Reproduction Reproducible steps needed labels Oct 5, 2022
@roryabraham
Copy link
Contributor

Also for transparency I was testing with a physical Pixel 4a

@JmillsExpensify
Copy link

Thanks @roryabraham.

@JmillsExpensify JmillsExpensify added Weekly KSv2 and removed Monthly KSv2 labels Oct 14, 2022
@JmillsExpensify
Copy link

Still on hold.

1 similar comment
@JmillsExpensify
Copy link

Still on hold.

@JmillsExpensify JmillsExpensify changed the title [Hold #10273] Keyboard being open/closed changes position of ToS - reported by @gadhiyamanan [HOLD #10273] Keyboard being open/closed changes position of ToS - reported by @gadhiyamanan Oct 19, 2022
@JmillsExpensify JmillsExpensify changed the title [HOLD #10273] Keyboard being open/closed changes position of ToS - reported by @gadhiyamanan [HOLD #10273] [Bug] Keyboard being open/closed changes position of ToS - reported by @gadhiyamanan Oct 19, 2022
@puneetlath puneetlath added the Bug Something is broken. Auto assigns a BugZero manager. label Oct 19, 2022
@melvin-bot melvin-bot bot added the Overdue label Oct 26, 2022
@tgolen
Copy link
Contributor

tgolen commented Dec 12, 2022

Wow interesting, when you say "right spot" what do you mean?

You can see here where I've added it. If you don't put it in the right spot in the view hierarchy, then you get a bunch of funky layout issues (like everything smooshed into 50 pixels at the top of the page, or the page not spanning the full vertical height).

ideally, we'd want an over-arching solution that can work for all platforms, but at this point, would it be wrong to consider splitting the login/password forms into different components for each platform?

I appreciate the thought, but I think that would be one of the worst solutions 😬 so I would want to avoid that at all costs.

I also find that isShown isn't working for mobile Chrome too (eg. it's always false), which doesn't surprise me a whole lot.

I think all that we should focus on right now are:

  • Getting the terms to display above the keyboard for both iOS and Android native on both login and password forms

I've updated my PR to achieve this, but some of the styles need cleaned up. I accomplish it by adding some margin to the bottom of the terms container when the keyboard is open. However, this has several drawbacks:

  1. It makes the animation a little janky because the margin isn't added until the keyboard animation ends
  2. Android doesn't show the extra margin as nicely as iOS does and leaves extra space below the terms (this could be fixed by only applying the 60px of margin to iOS)
iOS - shows the janky animation
2022-12-12_14-28-54.mp4
Android - shows the extra margin at the bottom
2022-12-12_14-30-53.mp4

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Dec 12, 2022

I appreciate the thought, but I think that would be one of the worst solutions 😬 so I would want to avoid that at all costs.

hehe yup, my brain went there, but it just felt soooo wrong 😆

I also find that isShown isn't working for mobile Chrome too (eg. it's always false), which doesn't surprise me a whole lot.

Yup, the withKeyboardState HOC doesn't work at all with any of the mobile web platforms, because React Native's Keyboard library it uses only works on native platforms :/

I've updated my PR to achieve this, but some of the styles need cleaned up. I accomplish it by adding some margin to the bottom of the terms container when the keyboard is open. However, this has several drawbacks:

Gotcha, thanks for clarifying. Sorry I haven't had the chance to dive into your PR, but my next steps are clear. I'll help you look into those styling issues today. I'll also add myself as a reviewer. Thanks for those screen recordings!

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Dec 13, 2022

To clarify, Tim opened a PR earlier that included fixes for this issue on iOS Native. So on Tim's PR, the TermsAndLicenses component successfully avoids the keyboard on the following platforms:

  • iOS Native ✅
  • Android Native ✅
  • Mobile Chrome
    • login form ✅
    • the password form (❌ , but I will outline why we probably shouldn't fix this in another comment below)
  • Mobile Safari ❌
    • We have agreed to leave this for now. As long as the view is still scrollable and people can blur the text input, then the usability of the page is not really diminished.

@jasperhuangg
Copy link
Contributor

jasperhuangg commented Dec 13, 2022

For the password form on Mobile Chrome, the TermsAndLicenses component does actually shift up to avoid the keyboard. It turns out that there's just too many items occupying space on the screen for it to remain in view.

When I mean "too many items", compare these screenshots of the password form on the same Android emulator on both Android Native (right) and Mobile Chrome (left):

Screen Shot 2022-12-13 at 4 43 56 PM Screen Shot 2022-12-13 at 4 43 44 PM

Notice how Mobile Chrome (left) includes a nav bar and a password bar, all which occupy just enough height for the TermsAndLicenses component to get cut off by the keyboard.

We could reduce the margins/padding of everything on the screen to get it to fit, but since you can still scroll down to see the TermsAndLicenses, I think we should just do nothing here like we are for Mobile Safari.

cc @tgolen Do you agree with my read on this one?

@tgolen
Copy link
Contributor

tgolen commented Dec 13, 2022

Hey, that's a good comparison and summary, @jasperhuangg. I agree with you that there isn't anything more we need to do.

From talking about it with Shawn in Slack, these changes are probably get thrown out at some point because we are going to be adding a footer with links to these pages which will be below the fold.

Because of that, I think I can go ahead and clean up my PR, and we can merge it with the fixes it contains, and close this out. What do you think?

@jasperhuangg
Copy link
Contributor

Totally agree! I definitely think we should keep the changes from your PR since we'll probably need them later on anyways when we add the footer. Thanks for keeping everyone on the same page and your help on this issue!

@jasperhuangg jasperhuangg added the Planning Changes still in the thought process label Dec 14, 2022
@jasperhuangg jasperhuangg changed the title [$2000] [Bug] Keyboard being open/closed changes position of ToS on certain mobile platforms - reported by @gadhiyamanan [HOLD] [$2000] [Bug] Keyboard being open/closed changes position of ToS on certain mobile platforms - reported by @gadhiyamanan Dec 14, 2022
@jasperhuangg jasperhuangg changed the title [HOLD] [$2000] [Bug] Keyboard being open/closed changes position of ToS on certain mobile platforms - reported by @gadhiyamanan [$2000] [Bug] Keyboard being open/closed changes position of ToS on certain mobile platforms - reported by @gadhiyamanan Dec 14, 2022
@jasperhuangg jasperhuangg removed the Planning Changes still in the thought process label Dec 14, 2022
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Dec 14, 2022
@melvin-bot melvin-bot bot changed the title [$2000] [Bug] Keyboard being open/closed changes position of ToS on certain mobile platforms - reported by @gadhiyamanan [HOLD for payment 2022-12-23] [$2000] [Bug] Keyboard being open/closed changes position of ToS on certain mobile platforms - reported by @gadhiyamanan Dec 16, 2022
@melvin-bot
Copy link

melvin-bot bot commented Dec 16, 2022

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.40-3 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

If no regressions arise, payment will be issued on 2022-12-23. 🎊

After the hold period, please check if any of the following need payment for this issue, and if so check them off after paying:

  • External issue reporter
  • Contributor that fixed the issue
  • Contributor+ that helped on the issue and/or PR

As a reminder, here are the bonuses/penalties that should be applied for any External issue:

  • Merged PR within 3 business days of assignment - 50% bonus
  • Merged PR more than 9 business days after assignment - 50% penalty

@melvin-bot
Copy link

melvin-bot bot commented Dec 16, 2022

BugZero Checklist: The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed:

  • [@sobitneupane / @tgolen / @jasperhuangg] The PR that introduced the bug has been identified. Link to the PR: NA, this has been a problem since it was built
  • [@sobitneupane / @tgolen / @jasperhuangg] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: NA
  • [@sobitneupane / @tgolen / @jasperhuangg] A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: NA
  • [@JmillsExpensify] A regression test has been added or updated so that the same bug will not reach production again. Link to the GH issue for creating the test here:

@tgolen
Copy link
Contributor

tgolen commented Dec 16, 2022

I'm checking off most of those as NA since this has been an issue ever since the page was built

@JmillsExpensify
Copy link

Great thank you! I'll circle back on the regression test/payment once I return on Tuesday.

@JmillsExpensify
Copy link

Alright, circling back on this issue for the payment. It's due tomorrow, so let's make sure all is in order before then. @sobitneupane I've just invited you to the Upwork job. Mind accepting?

@JmillsExpensify
Copy link

@gadhiyamanan You're also eligible for the reporting bonus. Please apply to the Upwork job.

@gadhiyamanan
Copy link
Contributor

@JmillsExpensify applied

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Dec 22, 2022
@JmillsExpensify
Copy link

Thanks offer sent!

Also I closed the loop on the regression test, so I'm crossing that off above in the BZ checklist.

@JmillsExpensify
Copy link

JmillsExpensify commented Dec 22, 2022

Summarizing how payments will shape out.

@JmillsExpensify
Copy link

Just realized that I didn't get around to paying this out before the Christmas holiday in the US, so I've just circled back and paid out both Contributors per the payments above. We already have a keyboard regression test is play, so I'm closing out this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Improvement Item broken or needs improvement. Internal Requires API changes or must be handled by Expensify staff Reviewing Has a PR in review
Projects
None yet
Development

No branches or pull requests