Skip to content

[$500] Web - Private Note - Input is not focused after reloading the page. #27695

Closed

Description

@kbecciv

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. Go to any Report => Report Details => Private Notes.
  2. Click My Notes => Reload the page.
  3. Notice that the Input is not focused.

Expected Result:

Input should be focused after reloading the page.

Actual Result:

Input is not focused after reloading the page.

Workaround:

Unknown

Platforms:

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

  • Android / native
  • Android / Chrome
  • iOS / native
  • iOS / Safari
  • MacOS / Chrome / Safari
  • MacOS / Desktop

Version Number: 1.3.71.4
Reproducible in staging?: y
Reproducible in production?: new feature
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

Screen.Recording.2023-09-17.at.11.27.44.mov
Recording.4575.mp4

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

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~012866eed98442daeb
  • Upwork Job ID: 1703807251460964352
  • Last Price Increase: 2023-10-02

Activity

  1. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Sep 18, 2023
  2. dukenv0307 commented on Sep 18, 2023

    @dukenv0307
    Contributor

    Proposal

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

    Dev: Web - Private notes - Delay in displaying the "Notes" field and "Save" button when refreshing the Private

    What is the root cause of that problem?

    We focus the input when the onEntryTransitionEnd is triggered. But when we reload the page, sometimes this is not triggered.

    onEntryTransitionEnd={() => focusAndUpdateMultilineInputRange(privateNotesInput.current)}

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

    We should use useFocusEffect and InteractionManager.runAfterInteractions in the same way we operate in EditRequestAmountPage to make the input is always focused when the page is focused.

    useFocusEffect(
        useCallback(() => {
            InteractionManager.runAfterInteractions(() => {
                focusAndUpdateMultilineInputRange(privateNotesInput.current);
            })
        }, []),
    );
    

    What alternative solutions did you explore? (Optional)

    NA

    Result

    Screencast.from.17-09-2023.21.17.33.webm
  3. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Sep 18, 2023
  4. melvin-bot commented on Sep 18, 2023

    @melvin-bot

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

  5. melvin-bot commented on Sep 18, 2023

    @melvin-bot

    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
  6. melvin-bot commented on Sep 18, 2023

    @melvin-bot
  7. changed the title [-]Web - Private Note - Input is not focused after reloading the page.[/-] [+][$500] Web - Private Note - Input is not focused after reloading the page.[/+] on Sep 18, 2023
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Sep 18, 2023
  9. melvin-bot commented on Sep 18, 2023

    @melvin-bot

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

  10. melvin-bot commented on Sep 18, 2023

    @melvin-bot

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

  11. kbecciv commented on Sep 18, 2023

    @kbecciv
    Author

    Proposal by: @hungvu193
    Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1694924854779879

    Proposal

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

    Private Note - Input is not focused after reloading the page.

    What is the root cause of that problem?

    We're focusing the input after transition end, however while the page is reloading, privateNotesInput.current will be null first focusAndUpdateMultilineInputRange will early return.

    onEntryTransitionEnd={() => focusAndUpdateMultilineInputRange(privateNotesInput.current)}

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

    Incase privateNotesInput is set yet and screen did end transition, we should focus the Input. So we should update the TextInput's ref as below:

        ref={(el) => {
            if (!el) {
                return;
            }
            if (!privateNotesInput.current && didScreenTransitionEnd) {
                focusAndUpdateMultilineInputRange(el);
            }
            privateNotesInput.current = el;
        }}

    What alternative solutions did you explore? (Optional)

    N/A

  12. 7 remaining items

  13. kadiealexander commented on Sep 22, 2023

    @kadiealexander
    Contributor

    @Ollyws could you please take a look at the proposals above?

  14. kadiealexander commented on Sep 25, 2023

    @kadiealexander
    Contributor

    Bumped in Slack!

  15. Ollyws commented on Sep 25, 2023

    @Ollyws
    Contributor

    Seems like this was already fixed by #27702

  16. hungvu193 commented on Sep 25, 2023

    @hungvu193
    Contributor

    Agree. I couldn't reproduce as well

  17. melvin-bot commented on Sep 25, 2023

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  18. Ollyws commented on Sep 27, 2023

    @Ollyws
    Contributor

    @kadiealexander We're good to close this one as it's already been fixed, thanks.

  19. melvin-bot commented on Oct 2, 2023

    @melvin-bot

    @Ollyws @kadiealexander this issue was created 2 weeks ago. Are we close to approving a proposal? If not, what's blocking us from getting this issue assigned? Don't hesitate to create a thread in #expensify-open-source to align faster in real time. Thanks!

  20. melvin-bot commented on Oct 2, 2023

    @melvin-bot

    📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

  21. melvin-bot commented on Oct 3, 2023

    @melvin-bot

    @Ollyws, @kadiealexander Huh... This is 4 days overdue. Who can take care of this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributorHelp WantedApply this label when an issue is open to proposals by contributors

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions