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 2023-04-17] [$1000] Keyboard’s Caps button blink when textfield focus changed #16685

Closed
1 of 6 tasks
kavimuru opened this issue Mar 29, 2023 · 33 comments
Closed
1 of 6 tasks
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 External Added to denote the issue can be worked on by a contributor

Comments

@kavimuru
Copy link

kavimuru commented Mar 29, 2023

If you haven’t already, check out our contributing guidelines for onboarding and email [email protected] to request to join our Slack channel!


Action Performed:

  1. Open mobile app on iOS
  2. navigate to settings > profile > display name
  3. tap into First Name so that the keyboard pulls up
  4. then tap into Last Name (keyboard should stay up)
  5. tap between FN and LN a few times

Expected Result:

Keyboard shouldn’t blink when focus is changed. (Confirmed by testing that the keyboard doesn't blink when a similar action is taken on other iOS apps)

Actual Result:

Keyboard blinks when focus is changed.

Workaround:

unknown

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android / native
  • Android / Chrome
  • iOS / native - iPhone 11 ( I was able to reproduce on my iPhone X once only)
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number:
Reproducible in staging?: Needs reproduction
Reproducible in production?: Needs reproduction
If this was caught during regression testing, add the test name, ID and link from TestRail:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Notes/Photos/Videos: Any additional supporting documentation

RPReplay_Final1680036222.MP4

Expensify/Expensify Issue URL:
Issue reported by: @DinalJivani
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1680036558448869

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ae90ccdfa2dded8a
  • Upwork Job ID: 1643257859466801152
  • Last Price Increase: 2023-04-04
@kavimuru kavimuru added Daily KSv2 Needs Reproduction Reproducible steps needed Bug Something is broken. Auto assigns a BugZero manager. labels Mar 29, 2023
@MelvinBot
Copy link

Triggered auto assignment to @sonialiap (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.

@MelvinBot
Copy link

MelvinBot commented Mar 29, 2023

Bug0 Triage Checklist (Main S/O)

  • This "bug" occurs on a supported platform (ensure Platforms in OP are ✅)
  • This bug is not a duplicate report (check E/App issues and #expensify-bugs)
    • If it is, comment with a link to the original report, close the issue and add any novel details to the original issue instead
  • This bug is reproducible using the reproduction steps in the OP. S/O
    • If the reproduction steps are clear and you're unable to reproduce the bug, check with the reporter and QA first, then close the issue.
    • If the reproduction steps aren't clear and you determine the correct steps, please update the OP.
  • This issue is filled out as thoroughly and clearly as possible
    • Pay special attention to the title, results, platforms where the bug occurs, and if the bug happens on staging/production.
  • I have reviewed and subscribed to the linked Slack conversation to ensure Slack/Github stay in sync

@melvin-bot melvin-bot bot added the Overdue label Apr 3, 2023
@MelvinBot
Copy link

@sonialiap Eep! 4 days overdue now. Issues have feelings too...

@sonialiap
Copy link
Contributor

I can't reproduce with Browserstack, I think it's too slow to notice a blinking. I'm not seeing this behavior on my Android device. Seeing if someone with an ios device can help me test https://expensify.slack.com/archives/C01SKUP7QR0/p1680609850680069

@MelvinBot
Copy link

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

@sonialiap sonialiap added Engineering and removed Engineering Needs Reproduction Reproducible steps needed labels Apr 4, 2023
@sonialiap
Copy link
Contributor

Dylan helped test iOS and was able to reproduce the blinking issue. He also confirmed that the keyboard doesn't blink on other iOS apps

@yuwenmemon yuwenmemon added the External Added to denote the issue can be worked on by a contributor label Apr 4, 2023
@melvin-bot melvin-bot bot changed the title Keyboard’s Caps button blink when textfield focus changed [$1000] Keyboard’s Caps button blink when textfield focus changed Apr 4, 2023
@MelvinBot
Copy link

Job added to Upwork: https://www.upwork.com/jobs/~01ae90ccdfa2dded8a

@MelvinBot
Copy link

Current assignee @sonialiap is eligible for the External assigner, not assigning anyone new.

@MelvinBot
Copy link

Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Apr 4, 2023
@MelvinBot
Copy link

Current assignee @yuwenmemon is eligible for the External assigner, not assigning anyone new.

@akinwale
Copy link
Contributor

akinwale commented Apr 5, 2023

Proposal

Please re-state the problem that we are trying to solve in this issue.

The caps lock indicator key on the soft keyboard rapidly blinks when switching between the First Name and Last Name text input fields on the page for editing a user's Display Name.

What is the root cause of that problem?

The soft keyboard state appears to be briefly reset while switching between the input fields. Due to the default keyboardType behaviour for text inputs in React Native, the Caps lock key is initially activated, because the text input just gained focus. However, once the system recognises that it's right after the first character in the text input, the Caps lock key is deactivated.

What changes do you think we should make in order to solve the problem?

Setting the keyboardType for the First Name and Last Name text inputs to name-phone-pad fixes the problem. I have tested and verified this to be working properly. Since the property is iOS only, it would not have an effect on the Android soft keyboard.
The changes will be in the file: https://github.com/Expensify/App/blob/main/src/pages/settings/Profile/DisplayNamePage.js#L98-L115

Reference: https://reactnative.dev/docs/textinput#keyboardtype

What alternative solutions did you explore?

Setting the autoCapitalize property for the First Name and Last Name text inputs to words fixes the problem without disabling auto-capitalisation entirely for the text inputs.

Video showing proposed fix

Screen.Recording.2023-04-05.at.08.21.21.mov

@sobitneupane
Copy link
Contributor

@akinwale Thanks for the proposal.

Can you please help us understand your proposal.

Due to the default keyboardType behaviour for text inputs in React Native, the Caps lock key is initially activated, because the text input just gained focus.

It sounds reasonable but can you please include some reference for your above statement.

Setting the keyboardType for the First Name and Last Name text inputs to name-phone-pad fixes the problem.

What other behaviors will be different from existing keyboard? Will it still capitalize the first character?

@akinwale
Copy link
Contributor

akinwale commented Apr 6, 2023

@sobitneupane Thank you for your response.

It sounds reasonable but can you please include some reference for your above statement.

This is an educated guess based on the behaviour that I observed while testing. I don't have a reference for this. It certainly has to do with the capitalisation state after a text input gains focus.

What other behaviors will be different from existing keyboard? Will it still capitalize the first character?

The only behavioural change for this value based on the UIKit reference documentation is that it will not support auto-capitalisation.

Taking this into consideration, it will not capitalise the first character. However, instead of changing keyboardType to name-phone-pad, we can set the autoCapitalize property to words which equally solves the issue. Just tested and this will certainly prevent the caps lock from flickering. I will update my proposal to reflect this.

Video demo with autoCapitalize="words"
https://user-images.githubusercontent.com/4160319/230308779-443df596-4d2c-4ec1-942c-50ab5da8b24e.mov

@sobitneupane
Copy link
Contributor

Thanks for the update @akinwale.

I like your proposal of using autoCapitalize="words". It solves the issue and it makes sense to autocapitalize each word of a name.

🎀👀🎀 C+ reviewed

cc: @yuwenmemon

@akinwale
Copy link
Contributor

akinwale commented Apr 6, 2023

@sobitneupane @yuwenmemon The PR is ready for review.

I have followed the instructions for the CLA signing, but I am not quite sure how to re-run the Github action, or is there no need for this? Thanks.

@yuwenmemon
Copy link
Contributor

yuwenmemon commented Apr 7, 2023

Wait, @sobitneupane what makes you think we want to support auto-capitalization? I don't think we want to neccesarily enforce this on a name field. For instance, many dutch names start with a lowercase letter (Sofie de Vreese is an example, who is an employee at Expensify). Apologies for not following the conversation closer but I would prefer @akinwale's original proposal, not the alternative solution.

Screenshot 2023-04-07 at 10 34 09 AM

@sobitneupane
Copy link
Contributor

@yuwenmemon With the original proposal, even the first character won't autocapitalize(Existing behavior is first character autocapitalize). If that' okay, we can go with the original proposal.

@yuwenmemon
Copy link
Contributor

Ah, you're saying auto capitalized on the keyboard?

@sobitneupane
Copy link
Contributor

Ah, you're saying auto capitalized on the keyboard?

Yes.

@yuwenmemon
Copy link
Contributor

Ah nevermind me, I had misunderstood! Approved!

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Daily KSv2 labels Apr 10, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Keyboard’s Caps button blink when textfield focus changed [HOLD for payment 2023-04-17] [$1000] Keyboard’s Caps button blink when textfield focus changed Apr 10, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Apr 10, 2023
@MelvinBot
Copy link

Reviewing label has been removed, please complete the "BugZero Checklist".

@MelvinBot
Copy link

MelvinBot commented Apr 10, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.97-2 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 2023-04-17. 🎊

After the hold period is over and BZ checklist items are completed, please complete any of the applicable payments for this issue, and check them off once done.

  • 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

@MelvinBot
Copy link

MelvinBot commented Apr 10, 2023

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 / @yuwenmemon] The PR that introduced the bug has been identified. Link to the PR:
  • [@sobitneupane / @yuwenmemon] 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:
  • [@sobitneupane / @yuwenmemon] 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:
  • [@sonialiap] Determine if we should create a regression test for this bug.
  • [@sobitneupane] If we decide to create a regression test for the bug, please propose the regression test steps to ensure the same bug will not reach production again.
  • [@sonialiap] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Apr 17, 2023
@akinwale
Copy link
Contributor

@sobitneupane @sonialiap @yuwenmemon Not sure who exactly to ping as this is my first issue, but is there anything left to do on this issue? Payment was due yesterday, but I haven't received payment yet nor have I been selected for the Upwork job.

@sobitneupane
Copy link
Contributor

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:

  • The PR that introduced the bug has been identified. Link to the PR:

I don't think the issue we are trying to solve here is due to bug introduced in our app. But it is something that is present in upstream.

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  • Open the mobile app on iOS
  • Navigate to Settings > Profile > Display name
  • Tap into the First name field so that the soft keyboard pulls up
  • Tap into the Last name (keyboard should stay up)
  • Type some letters in First name field and Last name field
  • Switch between the First name and Last name fields by tapping repeatedly (at least 3 or more times) between the fields.
  • Verify that the Caps Lock indicator on the soft keyboard doesn't keep changing its state

Do we agree 👍 or 👎

@kadiealexander
Copy link
Contributor

kadiealexander commented Apr 19, 2023

Jumping in to help with payments while @sonialiap is OOO.

Assigned issue: Apr 7 3:28am (GMT+13)
PR merged: Apr 8th 6:44am (GMT+13)

This one qualifies for a speed bonus! I've sent contracts to @akinwale, @sobitneupane and @DinalJivani

ETA: everyone has been paid.

@sobitneupane
Copy link
Contributor

@kadiealexander Accepted the offer.

@DinalJivani
Copy link

@kadiealexander
Accepted the offer.

@melvin-bot melvin-bot bot added the Overdue label Apr 21, 2023
@sonialiap
Copy link
Contributor

Thanks @kadiealexander for handling the payments while I was OOO!

@sobitneupane just one small change, since this test isn't about typing letters in the fields but about switching between them I suggest moving Type some letters in First name field and Last name field up in the step list, like so:

  1. Open the mobile app on iOS
  2. Navigate to Settings > Profile > Display name
  3. Make sure both the First name and Last name fields have some characters entered
  4. Tap into the First name field so that the soft keyboard pulls up
  5. Tap into the Last name (keyboard should stay up)
  6. Switch between the First name and Last name fields by tapping repeatedly (at least 3 or more times) between the fields.
  7. Verify that the Caps Lock indicator on the soft keyboard doesn't keep changing its state

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Apr 21, 2023
@melvin-bot melvin-bot bot removed the Overdue label Apr 24, 2023
@sonialiap
Copy link
Contributor

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 External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants