Skip to content

[Due for payment 2025-04-08] [Due for payment 2025-03-24] [Due for payment 2025-03-21] [$250] Android - Search - Text in search input, bounces with every letter added to the search. #56526

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

Closed
2 of 8 tasks
IuliiaHerets opened this issue Feb 7, 2025 · 53 comments
Assignees
Labels
Awaiting Payment Auto-added when associated PR is deployed to production Bug Something is broken. Auto assigns a BugZero manager. External Added to denote the issue can be worked on by a contributor Weekly KSv2

Comments

@IuliiaHerets
Copy link

IuliiaHerets commented Feb 7, 2025

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


Version Number: 9.0.95-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught on HybridApp, is this reproducible on New Expensify Standalone?: Yes, reproducible on both
Email or phone of affected tester (no customers): [email protected]
Issue reported by: Applause Internal Team
Device used: Motorola MotoG60 - Android 12
App Component: Search

Action Performed:

  1. Open the Expensify app.
  2. Open any chat with content in it.
  3. Tap on the search icon on the top right corner.
  4. Tap on "Search in this chat"
  5. Start typing on the search input until the text doesn´t fit the input and the first part of the content disappears.
  6. With every letter added, check the behaviour of all the text added to the input.

Expected Result:

Content in search input shouldn´t move when adding more text and the green loader is displayed.

Actual Result:

Text in search input bounces everytime the user adds a letter and the loader appears.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug6735812_1738894933713.Bounce.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~021890466625787121780
  • Upwork Job ID: 1890466625787121780
  • Last Price Increase: 2025-02-28
  • Automatic offers:
    • allgandalf | Reviewer | 106325187
    • thelullabyy | Contributor | 106325188
Issue OwnerCurrent Issue Owner: @zanyrenney
@IuliiaHerets IuliiaHerets added Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 labels Feb 7, 2025
Copy link

melvin-bot bot commented Feb 7, 2025

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

@drminh2807
Copy link
Contributor

Proposal

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

Android - Search - Text in search input, bounces with every letter added to the search.

What is the root cause of that problem?

BaseTextInput use isLoading conditional to show/hide ActivityIndicator. it makes TextInput rerender every user typing with long text

{!!inputProps.isLoading && (
<ActivityIndicator
size="small"
color={theme.iconSuccessFill}
style={[styles.mt4, styles.ml1, loadingSpinnerStyle]}
/>
)}

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

use animating prop instead. And add more prop canShowLoading to check show/hide ActivityIndicator
Option 1:

                            {inputProps.isLoading !== undefined && (
                                <ActivityIndicator
                                    size="small"
                                    animating={!!inputProps.isLoading}
                                    color={theme.iconSuccessFill}
                                    style={[styles.mt4, styles.ml1, loadingSpinnerStyle]}
                                />
                            )}

Option 2:

                            {!!inputProps.canShowLoading && (
                                <ActivityIndicator
                                    size="small"
                                    animating={!!inputProps.isLoading}
                                    color={theme.iconSuccessFill}
                                    style={[styles.mt4, styles.ml1, loadingSpinnerStyle]}
                                />
                            )}

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

N/A

What alternative solutions did you explore? (Optional)

N/A

@thelullabyy
Copy link
Contributor

Proposal

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

  • Text in search input bounces everytime the user adds a letter and the loader appears.

What is the root cause of that problem?

  • We only display the loading indicator when isLoading is true. However, when the text input is too long and isLoading is true, the search input shifts to the left. Then, if isLoading remains true, it moves to the right, as described in the original post:

{!!inputProps.isLoading && (
<ActivityIndicator
size="small"
color={theme.iconSuccessFill}
style={[styles.mt4, styles.ml1, loadingSpinnerStyle]}
/>
)}

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

  • We should reserve space for the loading indicator, even when it's not visible. This ensures that the search input remains stationary throughout the session:
                            {inputProps.isLoading !== undefined && (
                                <ActivityIndicator
                                    size="small"
                                    color={theme.iconSuccessFill}
                                    style={[styles.mt4, styles.ml1, loadingSpinnerStyle, {opacity: inputProps.isLoading ? 1 : 0}]}
                                />
                            )}
  • We should apply the same fix to web version as well.

  • Note: The animating prop does not work properly in Android device. There is the bug, where the indicator stays hidden if initialized as animating={false}.

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

  • This is UI issue, no need test.

What alternative solutions did you explore? (Optional)

  • We can use:
                            {inputProps.isLoading !== undefined && (
                                <ActivityIndicator
                                    size="small"
                                    animating={inputProps.isLoading}
                                    key={String(inputProps.isLoading)}
                                    color={theme.iconSuccessFill}
                                    style={[styles.mt4, styles.ml1, loadingSpinnerStyle]}
                                />
                            )}

or

                            <View style={[{flexDirection: 'row', justifyContent: 'center', alignItems: 'center'}, props.isLoading !== undefined && {width: 20}]}>
                                {!!inputProps.isLoading && (
                                    <ActivityIndicator
                                        size="small"
                                        color={theme.iconSuccessFill}
                                        style={[styles.mt4, styles.ml1, loadingSpinnerStyle]}
                                    />
                                )}
                            </View>

Copy link

melvin-bot bot commented Feb 10, 2025

@zanyrenney Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Feb 10, 2025
Copy link

melvin-bot bot commented Feb 12, 2025

@zanyrenney Huh... This is 4 days overdue. Who can take care of this?

Copy link

melvin-bot bot commented Feb 14, 2025

@zanyrenney Still overdue 6 days?! Let's take care of this!

@zanyrenney
Copy link
Contributor

Adding the external label here.

@melvin-bot melvin-bot bot removed the Overdue label Feb 14, 2025
@zanyrenney zanyrenney added External Added to denote the issue can be worked on by a contributor Overdue labels Feb 14, 2025
@melvin-bot melvin-bot bot changed the title Android - Search - Text in search input, bounces with every letter added to the search. [$250] Android - Search - Text in search input, bounces with every letter added to the search. Feb 14, 2025
Copy link

melvin-bot bot commented Feb 14, 2025

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

@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label Feb 14, 2025
Copy link

melvin-bot bot commented Feb 14, 2025

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

@melvin-bot melvin-bot bot removed the Overdue label Feb 14, 2025
@zanyrenney
Copy link
Contributor

hey @allgandalf please can you review the proposals above and pick one for us to progress forward with?

@DanylovskyiAM
Copy link

Hello @zanyrenney I can review the above proposals and fix this bug

Copy link

melvin-bot bot commented Feb 15, 2025

📣 @DanylovskyiAM! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:

  1. Make sure you've read and understood the contributing guidelines.
  2. Get the email address used to login to your Expensify account. If you don't already have an Expensify account, create one here. If you have multiple accounts (e.g. one for testing), please use your main account email.
  3. Get the link to your Upwork profile. It's necessary because we only pay via Upwork. You can access it by logging in, and then clicking on your name. It'll look like this. If you don't already have an account, sign up for one here.
  4. Copy the format below and paste it in a comment on this issue. Replace the placeholder text with your actual details.
    Screen Shot 2022-11-16 at 4 42 54 PM
    Format:
Contributor details
Your Expensify account email: <REPLACE EMAIL HERE>
Upwork Profile Link: <REPLACE LINK HERE>

@huult
Copy link
Contributor

huult commented Feb 17, 2025

Proposal

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

Text in search input, bounces with every letter added to the search

What is the root cause of that problem?

When we input new text, the ActivityIndicator appears, which takes up space. This pushes the text to the left. When the ActivityIndicator hides, the text moves back to the right.

loadingSpinnerStyle={[styles.mt0, styles.mr2]}

{!!inputProps.isLoading && (
<ActivityIndicator
size="small"
color={theme.iconSuccessFill}
style={[styles.mt4, styles.ml1, loadingSpinnerStyle]}
/>
)}

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

To resolve this issue, we just need to add position: absolute to ActivityIndicator so that it appears without taking up space. It looks like this issue does not occur on mobile web due to the OS.

loadingSpinnerStyle={[styles.mt0, styles.mr2]}

Update to:

loadingSpinnerStyle={[styles.mt0, styles.mr2, styles.pAbsolute, styles.r0, {top: '50%', transform: [{translateY: -10}]}]}

If we want to check if it is native, we should check the platform to determine whether to add this style. If it is native, we add the style; otherwise, for different native platforms, there is no need to add it.

If we want to show a background for ActivityIndicator, we should add style background white for it.(optional)

Screen.Recording.2025-02-17.at.11.00.13.mp4

What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?

None

What alternative solutions did you explore? (Optional)

Reminder: Please use plain English, be brief and avoid jargon. Feel free to use images, charts or pseudo-code if necessary. Do not post large multi-line diffs or write walls of text. Do not create PRs unless you have been hired for this job.

@melvin-bot melvin-bot bot added the Overdue label Feb 17, 2025
@allgandalf
Copy link
Contributor

I'll review this one today

@zanyrenney
Copy link
Contributor

Added to quality.

@allgandalf
Copy link
Contributor

Still testing proposals from contributors

@melvin-bot melvin-bot bot added the Weekly KSv2 label Mar 13, 2025
@thelullabyy
Copy link
Contributor

@allgandalf I raised the PR. Please help to check again. Thanks

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Mar 14, 2025
@melvin-bot melvin-bot bot changed the title [$250] Android - Search - Text in search input, bounces with every letter added to the search. [Due for payment 2025-03-21] [$250] Android - Search - Text in search input, bounces with every letter added to the search. Mar 14, 2025
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 14, 2025
Copy link

melvin-bot bot commented Mar 14, 2025

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

Copy link

melvin-bot bot commented Mar 14, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.12-7 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 2025-03-21. 🎊

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

Copy link

melvin-bot bot commented Mar 14, 2025

@allgandalf @zanyrenney @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Weekly KSv2 labels Mar 17, 2025
@melvin-bot melvin-bot bot changed the title [Due for payment 2025-03-21] [$250] Android - Search - Text in search input, bounces with every letter added to the search. [Due for payment 2025-03-24] [Due for payment 2025-03-21] [$250] Android - Search - Text in search input, bounces with every letter added to the search. Mar 17, 2025
Copy link

melvin-bot bot commented Mar 17, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.13-5 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 2025-03-24. 🎊

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

Copy link

melvin-bot bot commented Mar 17, 2025

@allgandalf @zanyrenney @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Mar 20, 2025
@zanyrenney
Copy link
Contributor

payment summary

@allgandalf requires payment automatic offer (Reviewer) - paid 250 via upwork.
@thelullabyy requires payment automatic offer (Contributor) - paid 250 via upwork.

@github-project-automation github-project-automation bot moved this from LOW to Done in [#whatsnext] #quality Mar 24, 2025
@melvin-bot melvin-bot bot removed the Overdue label Mar 24, 2025
@zanyrenney
Copy link
Contributor

Oops, got a little trigger happy @allgandalf please can you add the checklist!

@allgandalf
Copy link
Contributor

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 (eg. bug slipped through the normal regression and PR testing process on staging)
  • 2b. Reported on staging (eg. found during regression or PR testing)
  • 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: 1b7f6ac#r154296816

  • [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.

  • [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:

  1. Open the Expensify app.
  2. Open any chat with content in it.
  3. Tap on the search icon on the top right corner.
  4. Tap on "Search in this chat"
  5. Start typing on the search input until the text doesn´t fit the input and the first part of the content disappears.

Verify: With every letter added, content in search input not bouncing move and display green loader

Do we agree 👍 or 👎

@melvin-bot melvin-bot bot added Weekly KSv2 and removed Daily KSv2 labels Apr 1, 2025
@melvin-bot melvin-bot bot changed the title [Due for payment 2025-03-24] [Due for payment 2025-03-21] [$250] Android - Search - Text in search input, bounces with every letter added to the search. [Due for payment 2025-04-08] [Due for payment 2025-03-24] [Due for payment 2025-03-21] [$250] Android - Search - Text in search input, bounces with every letter added to the search. Apr 1, 2025
Copy link

melvin-bot bot commented Apr 1, 2025

The solution for this issue has been 🚀 deployed to production 🚀 in version 9.1.21-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 2025-04-08. 🎊

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

Copy link

melvin-bot bot commented Apr 1, 2025

@allgandalf @zanyrenney @allgandalf The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]

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. External Added to denote the issue can be worked on by a contributor Weekly KSv2
Projects
Status: Done
Development

No branches or pull requests