Skip to content

[HOLD for payment 2024-11-29] [$250] Search - The cursor is displayed on different sides in the search text box #52382

Closed

Description

@IuliiaHerets

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.60-0
Reproducible in staging?: Y
Reproducible in production?: Y
If this was caught during regression testing, add the test name, ID and link from TestRail: https://expensify.testrail.io/index.php?/tests/view/5200040
Issue reported by: Applause Internal Team

Action Performed:

  1. Sign in to the STG website with a Gmail account.
  2. Tap on the search icon in the top right corner.

Expected Result:

The cursor must always appear at the beginning of the search text box.

Actual Result:

The cursor is displayed inconsistently on several sides of the search box each time the function is opened.
Issue happens only on iOS mWeb/Chrome.

Workaround:

Unknown

Platforms:

  • Android: Standalone
  • Android: HybridApp
  • Android: mWeb Chrome
  • iOS: Standalone
  • iOS: HybridApp
  • iOS: mWeb Chrome
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6662018_1731377309304.Search.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021856557909155722434
  • Upwork Job ID: 1856557909155722434
  • Last Price Increase: 2024-11-13
Issue OwnerCurrent Issue Owner: @kadiealexander

Activity

  1. added
    BugSomething is broken. Auto assigns a BugZero manager.
    on Nov 12, 2024
  2. melvin-bot commented on Nov 12, 2024

    @melvin-bot

    Triggered auto assignment to @jliexpensify (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.

  3. bernhardoj commented on Nov 12, 2024

    @bernhardoj
    Contributor

    Proposal

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

    The caret of the input is on the right. In my cases, it's moves to the left at the end.

    What is the root cause of that problem?

    I remember we had this kind of issue before on iOS safari which happens when we auto focus immediately while the input is sliding. I don't remember which issue that is, but if I remember correctly, they fix it by adding a delay. From my testing, this happens specifically because of the list heavy rendering which interrupt the caret moving. If we remove the list, then everything is smooth.

    <SearchRouterInput
    value={textInputValue}
    isFullWidth={shouldUseNarrowLayout}
    updateSearch={onSearchChange}
    onSubmit={() => {
    onSearchSubmit(textInputValue);
    }}
    routerListRef={listRef}
    shouldShowOfflineMessage
    wrapperStyle={[styles.border, styles.alignItemsCenter]}
    outerWrapperStyle={[shouldUseNarrowLayout ? styles.mv3 : styles.mv2, shouldUseNarrowLayout ? styles.mh5 : styles.mh2]}
    wrapperFocusedStyle={[styles.borderColorFocus]}
    isSearchingForReports={isSearchingForReports}
    />
    <SearchRouterList
    textInputValue={textInputValue}
    updateSearchValue={onSearchChange}
    setTextInputValue={setTextInputValue}
    reportForContextualSearch={contextualReportData}
    recentSearches={sortedRecentSearches?.slice(0, 5)}
    recentReports={recentReports}
    autocompleteSuggestions={autocompleteSuggestions}
    onSearchSubmit={onSearchSubmit}
    closeRouter={onRouterClose}
    onAutocompleteSuggestionClick={onAutocompleteSuggestionClick}
    ref={listRef}
    />

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

    I'm trying to improve the performance, but no luck. In the meantime, we can hide the caret of the textinput while the modal is animating.

    <TextInput
    testID="search-router-text-input"
    value={value}
    onChangeText={updateSearch}
    autoFocus={autoFocus}

    const [caretHidden, setCaretHidden] = useState(true);
    
    useEffect(() => {
        InteractionManager.runAfterInteractions(() => setCaretHidden(false));
    }, [])
    
    caretHidden={false}
    

    What alternative solutions did you explore? (Optional)

    Remove the autoFocus props and delay the focus by using useAutoFocusInput hook.

    <TextInput
    testID="search-router-text-input"
    value={value}
    onChangeText={updateSearch}
    autoFocus={autoFocus}

    const {inputCallbackRef} = useAutoFocusInput();
    
    <TextInput ref={inputCallbackRef} ....
    
  4. jliexpensify commented on Nov 13, 2024

    @jliexpensify
    Contributor

    ios <> Android swap

  5. added
    ExternalAdded to denote the issue can be worked on by a contributor
    on Nov 13, 2024
  6. changed the title [-]Search - The cursor is displayed on different sides in the search text box[/-] [+][$250] Search - The cursor is displayed on different sides in the search text box[/+] on Nov 13, 2024
  7. melvin-bot commented on Nov 13, 2024

    @melvin-bot
  8. added
    Help WantedApply this label when an issue is open to proposals by contributors
    on Nov 13, 2024
  9. melvin-bot commented on Nov 13, 2024

    @melvin-bot

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

  10. 31 remaining items

  11. s77rt commented on Nov 24, 2024

    @s77rt
    Member

    BugZero Checklist:

    • [Contributor] Classify the bug:
    Bug classification

    Source of bug:

    • 1a. Result of the original design (eg. a case wasn't considered)
    • 1b. Mistake during implementation
    • 1c. Backend bug
    • 1z. Other:

    Where bug was reported:

    • 2a. Reported on production
    • 2b. Reported on staging (deploy blocker)
    • 2c. Reported on both staging and production
    • 2d. Reported on a PR
    • 2z. Other:

    Who reported the bug:

    • 3a. Expensify user
    • 3b. Expensify employee
    • 3c. Contributor
    • 3d. QA
    • 3z. Other:
    • [Contributor] 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: Add SearchRouter component and context to display it #48785 (comment)

    • [Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source 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: n/a

    • [Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.

    Regression Test Proposal Template
    • [BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.

      Link to issue:

    Regression Test Proposal

    Precondition:

    Test:

    Do we agree 👍 or 👎

  12. kadiealexander commented on Nov 29, 2024

    @kadiealexander
    Contributor

    Payouts due:

    • Contributor: $250 @bernhardoj via manual request
    • Reviewer: $250 @s77rt via manual request
  13. moved this from Bugs and Follow Up Issues to Done in #expensify-bugson Nov 29, 2024
  14. bernhardoj commented on Nov 29, 2024

    @bernhardoj
    Contributor

    Requested in ND.

  15. JmillsExpensify commented on Nov 29, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @s77rt

  16. tgolen commented on Dec 2, 2024

    @tgolen
    Contributor

    @s77rt Thanks for classifying the bug!

    For this one:
    image

    It really should have been marked as staging (or at least staging+prod, but that option might be going away soon).

    You can see from the original description it was reproduced on both environments, and the screenshots show it was found on staging.

  17. s77rt commented on Dec 2, 2024

    @s77rt
    Member

    @tgolen If it's reproducible on production, it's reproducible on staging. Otherwise we'd close the issue.

  18. tgolen commented on Dec 2, 2024

    @tgolen
    Contributor

    True, I think what I'm trying to capture though is... was the bug found as part of the regression testing during a deploy, or was the bug released to production and then someone found it in production?

  19. tgolen commented on Dec 2, 2024

    @tgolen
    Contributor

    Maybe the prompts should be reworded?

  20. s77rt commented on Dec 2, 2024

    @s77rt
    Member

    Ah totally my bad. I just realised it said reported. I have been reading this as reproduced for a while 😅

  21. s77rt commented on Dec 2, 2024

    @s77rt
    Member

    Maybe the prompts should be reworded?

    i think it's fine but maybe remove the (deploy blocker) suffix because it's a little misleading as in this case it was reported on staging but not a deploy blocker since it was found testing another flow

  22. JmillsExpensify commented on Dec 5, 2024

    @JmillsExpensify
    Contributor

    $250 approved for @bernhardoj

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

Metadata

Metadata

Labels

Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions