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-08-24] [$2000] mWeb - Chat - emoji picker presents glitches while scrolling with the keyboard open #22939

Closed
1 of 6 tasks
lanitochka17 opened this issue Jul 15, 2023 · 51 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 Engineering External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented Jul 15, 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!


Issue found when executing PR #22680

Action Performed:

  1. Go to https://staging.new.expensify.com/
    and log in
  2. Navigate to any chat.
  3. Tap on Emoji button in composer
  4. Enter a term that has no results
  5. Scroll up and down slowly

Expected Result:

The emoji picker should be stable when scrolling up and down

Actual Result:

The emoji picker looks unstable and presents glitches while scrolling with the keyboard open

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.41.2

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

Notes/Photos/Videos: Any additional supporting documentation

Bug6128880_mWeb_-_Safari_-_Emoji_Picker.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Interanl Team

*Slack conversation:

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01bdc44dc552114d99
  • Upwork Job ID: 1682463762946265088
  • Last Price Increase: 2023-08-03
  • Automatic offers:
    • s-alves10 | Contributor | 26030445
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 15, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 15, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 15, 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 melvin-bot bot added the Overdue label Jul 17, 2023
@maddylewis
Copy link
Contributor

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 18, 2023
@maddylewis maddylewis added the External Added to denote the issue can be worked on by a contributor label Jul 21, 2023
@melvin-bot melvin-bot bot changed the title mWeb - Chat - emoji picker presents glitches while scrolling with the keyboard open [$1000] mWeb - Chat - emoji picker presents glitches while scrolling with the keyboard open Jul 21, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

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

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

melvin-bot bot commented Jul 21, 2023

Current assignee @maddylewis is eligible for the External assigner, not assigning anyone new.

@melvin-bot
Copy link

melvin-bot bot commented Jul 21, 2023

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

@maddylewis
Copy link
Contributor

added external label / added to Upwork

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 21, 2023
@maddylewis
Copy link
Contributor

there are no proposals on this one yet

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Jul 24, 2023
@maddylewis
Copy link
Contributor

i'll double the bounty for this one!

@melvin-bot melvin-bot bot removed the Overdue label Jul 27, 2023
@maddylewis maddylewis changed the title [$1000] mWeb - Chat - emoji picker presents glitches while scrolling with the keyboard open [$2000] mWeb - Chat - emoji picker presents glitches while scrolling with the keyboard open Jul 27, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 27, 2023

Upwork job price has been updated to $2000

@Piotrfj
Copy link
Contributor

Piotrfj commented Jul 28, 2023

Hi I'm Piotr from Callstack - expert contributor group - will start investigation in this area

@melvin-bot
Copy link

melvin-bot bot commented Jul 28, 2023

📣 @Piotrfj! 📣
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>

@s-alves10
Copy link
Contributor

s-alves10 commented Jul 28, 2023

Proposal

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

Emoji Picker presents glitches while scrolling with the keyboard open

What is the root cause of that problem?

As you can see, we calculate the menu height when windowHeight props changes. When scrolling, windowHeight may change several times and it shows glitches every time height is recalculated.

style={StyleUtils.getEmojiPickerListHeight(isFiltered, this.props.windowHeight)}

This is the root cause.

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

I think preventing scrolling would be a perfect solution.
There are 2 cases the screen is scrolled.

  • The entire screen is scrolled when flatlist scroll reaches its end or start
  • If flatlist hasn't enough items to scroll, entire screen is scrolled
  1. To prevent the first case, we can use overscrollBehavior: 'contain'
    overscrollBehavior: 'contain' prevents the scrolling of the underlying element as described here. That is, overscrollBehavior: 'contain' and overflow: 'auto' prevents the entire screen to be scrolled after flatlist scroll reaches its end or start.

  2. To prevent the 2nd case, we need to set overflow: 'hidden' when there is no enough items. It would look like

    {overflow: this.state.filteredEmojis.length > overflowLimit ? 'auto' : 'hidden'},

Here we need to calculate the overflowLimit dynamically because the height of the flatlist is changed according to the available screen height by StyleUtils.getEmojiPickerListHeight function. We have fixed emoji item height(CONST.EMOJI_PICKER_ITEM_HEIGHT) and each row has 8 emoji items. So we can get the overflowLimit as follows

        const listStyle = StyleUtils.getEmojiPickerListHeight(isFiltered, this.props.windowHeight);
        const height = (!listStyle.maxHeight || listStyle.height < listStyle.maxHeight) ? listStyle.height : listStyle.maxHeight;
        const overflowLimit = Math.floor(height / CONST.EMOJI_PICKER_ITEM_HEIGHT) * 8;

The entire flatlist style would look like

        style={[
            StyleUtils.getEmojiPickerListHeight(isFiltered, this.props.windowHeight),
            {overscrollBehavior: 'contain'},
            {overflow: this.state.filteredEmojis.length > overflowLimit ? 'auto' : 'hidden'},
        ]}

This works fine.

What alternative solutions did you explore? (Optional)

@melvin-bot
Copy link

melvin-bot bot commented Jul 29, 2023

@sobitneupane @maddylewis 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!

@melvin-bot melvin-bot bot added the Awaiting Payment Auto-added when associated PR is deployed to production label Aug 17, 2023
@melvin-bot melvin-bot bot changed the title [$2000] mWeb - Chat - emoji picker presents glitches while scrolling with the keyboard open [HOLD for payment 2023-08-24] [$2000] mWeb - Chat - emoji picker presents glitches while scrolling with the keyboard open Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 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 Aug 17, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 17, 2023

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

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 Aug 17, 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:

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

@maddylewis maddylewis added Daily KSv2 and removed Weekly KSv2 labels Aug 21, 2023
@maddylewis
Copy link
Contributor

moving to daily since payment is due this week

@melvin-bot melvin-bot bot added Daily KSv2 and removed Daily KSv2 labels Aug 23, 2023
@maddylewis
Copy link
Contributor

maddylewis commented Aug 24, 2023

Payments


@maddylewis
Copy link
Contributor

@sobitneupane - will you confirm if any of this checklist needs to be filled out - thanks! #22939 (comment)

@melvin-bot melvin-bot bot added the Overdue label Aug 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 28, 2023

@amyevans, @sobitneupane, @maddylewis, @s-alves10 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@maddylewis
Copy link
Contributor

just waiting for @sobitneupane to confirm if any of these details need to be filled out before closing - #22939 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Aug 28, 2023
@sobitneupane
Copy link
Contributor

Sorry for the delay. I will try to get to it asap.

@melvin-bot melvin-bot bot added the Overdue label Sep 1, 2023
@melvin-bot
Copy link

melvin-bot bot commented Sep 4, 2023

@amyevans, @sobitneupane, @maddylewis, @s-alves10 Eep! 4 days overdue now. Issues have feelings too...

@maddylewis
Copy link
Contributor

@sobitneupane - we're just waiting for you to confirm if anything on this checklist needs to be completed, and then we can close this out. #22939 (comment)

@sobitneupane
Copy link
Contributor

sobitneupane commented Sep 5, 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:

  • [@sobitneupane] The PR that introduced the bug has been identified. Link to the PR:

#18221

  • [@sobitneupane] 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:

#18221 (comment)

  • [@sobitneupane] 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:

This is an edge case and was missed in the PR review.

  • [@sobitneupane] Determine if we should create a regression test for this bug.

Yes.

  • [@sobitneupane] 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.

#22939 (comment)

@sobitneupane
Copy link
Contributor

Regression Test Proposal

  1. Navigate to any chat in IOS/safari.
  2. Tap on Emoji button in composer
  3. Enter a term that has no results
  4. Scroll up and down slowly

Do we agree 👍 or 👎

@sobitneupane
Copy link
Contributor

Requested Payment on newDot.

#22939 (comment)

@JmillsExpensify
Copy link

$3,000 payment approved via NewDot based on BZ summary.

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 Engineering External Added to denote the issue can be worked on by a contributor
Projects
None yet
Development

No branches or pull requests

8 participants