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-10-16] [$1000] Android - Inconsistency bug: App allows user to scroll behind mention results #27140

Closed
1 of 6 tasks
kbecciv opened this issue Sep 11, 2023 · 40 comments
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

@kbecciv
Copy link

kbecciv commented Sep 11, 2023

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. Open the app on android
  2. Open any report
  3. Search for mentions in a way that search results should be less then 5
  4. Scroll over mention options and observe that app scrolls messages behind
  5. Try the same on android chrome and observe that it does not scroll messages behind

Expected Result:

App should not scroll messages behind on scroll over mention options when results are less then 5

Actual Result:

App scrolls messages behind on scroll over mention options when results are less then 5

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.43-7
Reproducible in staging?: y
Reproducible in production?: y
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

scroll.on.mention.results.scrolls.messages.mp4

Expensify/Expensify Issue URL:
Issue reported by: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690045709955489

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b12986525d5d8282
  • Upwork Job ID: 1701215683522777088
  • Last Price Increase: 2023-09-22
  • Automatic offers:
    • cubuspl42 | Reviewer | 26922103
    • getusha | Contributor | 26922109
    • dhanashree-sawant | Reporter | 26922112
@kbecciv kbecciv added External Added to denote the issue can be worked on by a contributor Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Sep 11, 2023
@melvin-bot melvin-bot bot changed the title Android - Inconsistency bug: App allows to scroll behind of mention results [$500] Android - Inconsistency bug: App allows to scroll behind of mention results Sep 11, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

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

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

melvin-bot bot commented Sep 11, 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
Copy link

melvin-bot bot commented Sep 11, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Sep 11, 2023

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

@sakluger
Copy link
Contributor

Removed @laurenreidexpensify because we both got assigned when the external label was added.

@redpanda-bit
Copy link
Contributor

Proposal

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

Prevent scrolling of messages when mentions suggestions are less than 5.

What is the root cause of that problem?

It appears that the android operating system handles absolutely positioned views on top of scrollview different from the expected. Instead of registering the scroll in the mentions list, it registers it as if the user scrolled on the messages list instead.

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

I found that the issue goes away when the mentions list is scrollable. Therefore, I would enable scrolling of the mentions list when it has less than 5 items.

This can be accomplished by reducing the height of the container element in (height is returned by this function in BaseAutoCompleteSuggestions.js) just enough to make the component scrollable (-0.5). This little hack would produce the result below, bringing the experience closer to the iOS experience.

android-mentions-scroll.mov

Here is the condition I would use:

// On android reduce total height by 0.5 (smallest amount needed) to make component scrollable
if (getOperatingSystem() === CONST.OS.ANDROID) {
  return numRows * CONST.AUTO_COMPLETE_SUGGESTER.SUGGESTION_ROW_HEIGHT - 0.5;
}

What alternative solutions did you explore? (Optional)

  1. Lock the messages list from scrolling while the mentions list is visible. scrollEnabled set to false if mentions list is visible.
    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
Copy link

melvin-bot bot commented Sep 12, 2023

📣 @redpanda-bit! 📣
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. 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.
  2. 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.
  3. 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>

@redpanda-bit
Copy link
Contributor

Contributor details
Your Expensify account email: c.darioalmonte@gmail.com
Upwork Profile Link: https://www.upwork.com/freelancers/~010e9950f7b5f0f0eb

@melvin-bot
Copy link

melvin-bot bot commented Sep 12, 2023

✅ Contributor details stored successfully. Thank you for contributing to Expensify!

@melvin-bot melvin-bot bot added the Overdue label Sep 14, 2023
@sakluger
Copy link
Contributor

@cubuspl42 could you please review the above proposal?

@melvin-bot melvin-bot bot removed the Overdue label Sep 14, 2023
@cubuspl42
Copy link
Contributor

@redpanda-bit This might work, but such hacks are a last resort. Have you found exactly what's the root cause of the bug? Is it actually a known problem or Android and/or React Native on Android? Are there any open upstream issues?

@redpanda-bit
Copy link
Contributor

Thanks for catching that.

I could not find statements that directly backup my proposal.

Closest ones were these two:

  1. "[Scrollview] Doesn't yet support other contained responders from blocking this scroll view from becoming the responder." (doesn't mention android). Source.
  2. "if you click inside a portal, and the portal is wrapped in <div onClick>, that onClick handler will fire." (mentions list is wrapped in a createPortal, however, the scrolling list is not the wrapping component). Source.

Essentially what my proposal is doing is stopping the propagation of the scroll event to the list behind by keeping itself the scroll responder.

@melvin-bot melvin-bot bot added the Overdue label Sep 17, 2023
@cubuspl42
Copy link
Contributor

Doesn't yet support other contained responders

Does it apply to us? Is the suggestion list contained within the report scroll view?

  1. You already noticed that this doesn't apply

What I mean in general is that we observe a quite serious UI bug that seems to have its origin on the framework level. Intuitively, the behavior we observe on the attached videos should never happen in a reasonable UI framework, unless the upper widget is explicitly annotated as interactively transparent. Sure, sometimes things like this need a workaround, but such a workaround should be applied with awareness of how this bug is being handled in the upstream.

@melvin-bot melvin-bot bot removed the Overdue label Sep 18, 2023
@cubuspl42
Copy link
Contributor

@sakluger I think we should raise the bounty to $1k. From what was shown so far, this doesn't look like a problem on our side. I'd like to attract this kind of contributor input we haven't got so far:

  • Investigating the preceise root cause of the problem
  • Finding the upstream issue(s) for the problem
    • When/if they are found, applying the (potentially better) workarounds shared in the relevant discussion

@melvin-bot
Copy link

melvin-bot bot commented Sep 18, 2023

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

@redpanda-bit
Copy link
Contributor

Doesn't yet support other contained responders

Does it apply to us? Is the suggestion list contained within the report scroll view?

Doesn't apply to us.

I agree with waiting for a precise root cause, might be ambitious but it's technically the right thing to do, unless the issue becomes high priority/blocker.

@melvin-bot melvin-bot bot removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Sep 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

📣 @cubuspl42 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

📣 @getusha 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job
Please accept the offer and leave a comment on the Github issue letting us know when we can expect a PR to be ready for review 🧑‍💻
Keep in mind: Code of Conduct | Contributing 📖

@melvin-bot
Copy link

melvin-bot bot commented Sep 28, 2023

📣 @dhanashree-sawant 🎉 An offer has been automatically sent to your Upwork account for the Reporter role 🎉 Thanks for contributing to the Expensify app!

Offer link
Upwork job

@getusha
Copy link
Contributor

getusha commented Sep 28, 2023

@cubuspl42 @NikkiWines the PR is ready for review!

@melvin-bot
Copy link

melvin-bot bot commented Oct 5, 2023

Based on my calculations, the pull request did not get merged within 3 working days of assignment. Please, check out my computations here:

  • when @getusha got assigned: 2023-09-28 10:31:40 Z
  • when the PR got merged: 2023-10-05 04:29:59 UTC
  • days elapsed: 4

On to the next one 🚀

@NikkiWines
Copy link
Contributor

NikkiWines commented Oct 5, 2023

@MelvinBot is wrong here technically correct but missing some factors, and the delay was on my end for reviewing the PR. It could have been merged as early as Sept 29th and so should be eligible for the urgency bonus.

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Oct 9, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Android - Inconsistency bug: App allows user to scroll behind mention results [HOLD for payment 2023-10-16] [$1000] Android - Inconsistency bug: App allows user to scroll behind mention results Oct 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

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

@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Oct 9, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.79-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 2023-10-16. 🎊

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

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

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 9, 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:

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

@cubuspl42
Copy link
Contributor

cubuspl42 commented Oct 10, 2023

  • The PR that introduced the bug has been identified. Link to the PR:
  • 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:
  • 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:
    • No need for additional discussion
  • Determine if we should create a regression test for this bug.
    • We should
  • 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.
    • Launch the application
    • Initiate a chat with an extensive conversation history that spans multiple screen pages
    • Open the mentions dialog (by typing "@"), ensuring the results are fewer than 5
    • Scroll through the mention list
    • Confirm that scrolling through the mention list does not affect the background scrolling

@sakluger
Copy link
Contributor

@cubuspl42 thank you so much for completing the BZ checklist already! I really appreciate it. 🙏

All payments have been completed. Thanks everyone!

@cubuspl42
Copy link
Contributor

@sakluger

I clarified one step:

Open the mentions dialog (by typing "@")

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
None yet
Development

No branches or pull requests

7 participants