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 2024-08-09] [$250] Not able to dismiss keyboard on invite workspace member page #46134

Closed
1 of 6 tasks
m-natarajan opened this issue Jul 24, 2024 · 27 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 External Added to denote the issue can be worked on by a contributor

Comments

@m-natarajan
Copy link

m-natarajan commented Jul 24, 2024

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


Version Number: 9.0.11-3
Reproducible in staging?: Yes
Reproducible in production?: Yes
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
Expensify/Expensify Issue URL:
Issue reported by: @allgandalf
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1721832207268919

Action Performed:

  1. Create a workspace
  2. Go to members
  3. Click invite members > search for any user
  4. Click next
  5. On the Invite message page try to dismiss the keyboard

Expected Result:

User able to dismiss the keyboard by tapping Return key

Actual Result:

Unable to dismiss the keyboard

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

RPReplay_Final1721832050.MP4
RPReplay_Final1721839996.MP4

Add any screenshot/video evidence

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01ad48ce8ad9a0c2ca
  • Upwork Job ID: 1816194231400089538
  • Last Price Increase: 2024-07-24
Issue OwnerCurrent Issue Owner: @Christinadobrzyn
@m-natarajan m-natarajan added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

Triggered auto assignment to @Christinadobrzyn (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@allgandalf
Copy link
Contributor

Note

I can take over as C+ as i reported the bug and have more context

@bernhardoj
Copy link
Contributor

bernhardoj commented Jul 24, 2024

Proposal

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

Can't close keyboard in invite workspace message page.

What is the root cause of that problem?

The input ref callback calls updateMultilineInputRange which will focus on the input.

ref={(element: AnimatedTextInputRef) => {
if (!element) {
return;
}
inputCallbackRef(element);
updateMultilineInputRange(element);
}}

Every time the ref callback is called, the input is focused, so we can't close the keyboard because it keeps getting refocused.

I checked and this happens in some pages too that follows the same pattern as above.

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

We need to call updateMultilineInputRange only once for the first time it's called. We can create a ref to flag it.

if (isInputInitialized.current) {
    return;
}
isInputInitialized.current = true;
updateMultilineInputRange(el);

What alternative solutions did you explore? (Optional)

The reason we put it inside the ref callback is that we want to call it on the mount, however, the input is wrapped in a FormProvider which uses withOnyx hook. If we call it on the mount, it's possible that the form is not rendered yet because withOnyx is still "loading". We can migrate form from withOnyx to useOnyx and then calls updateMultilineInputRange in a useEffect (on mount) instead in the ref callback, but this solution is risky because we are modifying the form component.

@bernhardoj
Copy link
Contributor

Added an alternative solution.

@neonbhai
Copy link
Contributor

neonbhai commented Jul 24, 2024

Proposal

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

Not able to dismiss keyboard on invite workspace member page

What is the root cause of that problem?

We added an ios only fix here that called focus on the input on every update:

/*
* Adding this iOS specific patch because of the scroll issue in native iOS
* Issue: does not scroll multiline input when text exceeds the maximum number of lines
* For more details: https://github.com/Expensify/App/pull/27702#issuecomment-1728651132
*/
if (shouldAutoFocus) {
input.focus();
}

This has since been fixed in react native and the ios only code is no longer needed. We can remove it.

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

We should remove the file here with the ios only hack:

const updateMultilineInputRange: UpdateMultilineInputRange = (input, shouldAutoFocus = true) => {

Result

This works perfectly:

iOS
Screen.Recording.2024-07-24.at.11.49.02.PM.mov
Web
Screen.Recording.2024-07-24.at.11.49.46.PM.mov

@Christinadobrzyn
Copy link
Contributor

I can reproduce this, and I think it's part of VIP-VSB. I think this can be external so adding some labels.

@Christinadobrzyn Christinadobrzyn added the External Added to denote the issue can be worked on by a contributor label Jul 24, 2024
@melvin-bot melvin-bot bot changed the title Not able to dismiss keyboard on invite workspace member page [$250] Not able to dismiss keyboard on invite workspace member page Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 24, 2024
Copy link

melvin-bot bot commented Jul 24, 2024

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

@allgandalf
Copy link
Contributor

hey @Christinadobrzyn , can i be the C+ here? i reported the issue and have context, mentioned about it here

@aimane-chnaif
Copy link
Contributor

Was there any discussion about being C+ on the issue if they reported that bug?

@aimane-chnaif
Copy link
Contributor

There are 2 root causes which make this bug happen:

  • iOS hack to focus manually on ref callback
  • ref callback is called multiple times as the input is wrapped in FormProvider

@aimane-chnaif
Copy link
Contributor

@neonbhai your solution causes regression - #21654

This has since been fixed in react native and the ios only code is no longer needed. We can remove it.

I am not sure what's fixed. Focus always worked in old RN. We added that line just to fix #21654.

@aimane-chnaif
Copy link
Contributor

@bernhardoj's proposal (main solution) looks good to me.
I think alternative solution is too risky to fix this iOS specific bug. Maybe we can further investigate on a separate issue.
🎀👀🎀 C+ reviewed

Copy link

melvin-bot bot commented Jul 24, 2024

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

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Jul 24, 2024
@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 25, 2024
@bernhardoj
Copy link
Contributor

PR is ready

cc: @aimane-chnaif

@Christinadobrzyn
Copy link
Contributor

update for melvin - PR is under review

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 2, 2024
@melvin-bot melvin-bot bot changed the title [$250] Not able to dismiss keyboard on invite workspace member page [HOLD for payment 2024-08-09] [$250] Not able to dismiss keyboard on invite workspace member page Aug 2, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 2, 2024
Copy link

melvin-bot bot commented Aug 2, 2024

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

Copy link

melvin-bot bot commented Aug 2, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.0.15-9 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 2024-08-09. 🎊

For reference, here are some details about the assignees on this issue:

  • @bernhardoj requires payment through NewDot Manual Requests
  • @aimane-chnaif requires payment through NewDot Manual Requests
  • @allgandalf requires payment (Needs manual offer from BZ)

Copy link

melvin-bot bot commented Aug 2, 2024

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:

  • [@aimane-chnaif] The PR that introduced the bug has been identified. Link to the PR:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] 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:
  • [@aimane-chnaif] Determine if we should create a regression test for this bug.
  • [@aimane-chnaif] 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.
  • [@Christinadobrzyn] Link the GH issue for creating/updating the regression test once above steps have been agreed upon:

@Christinadobrzyn
Copy link
Contributor

Christinadobrzyn commented Aug 6, 2024

Payouts due (needs review).

@allgandalf can you confirm the role you played in this job? Also, what is your Upwork profile?

@aimane-chnaif do we need a regression test?

@aimane-chnaif
Copy link
Contributor

@aimane-chnaif do we need a regression test?

I don't think so as this is iOS specific bug and super minor, not affecting product.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Aug 8, 2024
@bernhardoj
Copy link
Contributor

Requested in ND.

@JmillsExpensify
Copy link

$250 approved for @bernhardoj

@Christinadobrzyn
Copy link
Contributor

We're at payday. @aimane-chnaif can you please request $250 payment through NewDot?

Otherwise, I think we can close this since there's no regression test. Let me know if I'm missing anything!

Copy link

melvin-bot bot commented Aug 9, 2024

Payment Summary

Upwork Job

BugZero Checklist (@Christinadobrzyn)

  • I have verified the correct assignees and roles are listed above and updated the neccesary manual offers
  • I have verified the payment summary above is correct

@melvin-bot melvin-bot bot added the Overdue label Aug 12, 2024
@Christinadobrzyn
Copy link
Contributor

This is pending NewDot payment to @aimane-chnaif but we can close while that is processing.

Let me know if I've missed anything.

@aimane-chnaif
Copy link
Contributor

@Christinadobrzyn I am still using upwork. Can you please reopen and sort payment? Thanks

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 External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

8 participants