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

[$500] Web - Emojis flickers when scrolling a list of emojis and sometimes part of them disappear #30948

Closed
2 of 6 tasks
kbecciv opened this issue Nov 7, 2023 · 29 comments
Closed
2 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff

Comments

@kbecciv
Copy link

kbecciv commented Nov 7, 2023

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: 1.3.96.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:
Email or phone of affected tester (no customers):
Logs: https://stackoverflow.com/c/expensify/questions/4856
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:

Issue found when executing PR #30201

Action Performed:

  1. Launch App
  2. Navigate to any chat
  3. Tap emoji button to open emoji picker
  4. Scroll emoji list up/ down

Expected Result:

All emoji should be visible when list of emoji scrolling.

Actual Result:

Emojis flickers when scrolling a list of emojis and sometimes part of them disappear

Workaround:

Unknown

Platforms:

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

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Bug6266710_1699318980930.30201_Mac_Chrome.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~013d1a1c15ee78f5b3
  • Upwork Job ID: 1721710034503348224
  • Last Price Increase: 2023-12-05
@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 Nov 7, 2023
@melvin-bot melvin-bot bot changed the title Web - Emojis flickers when scrolling a list of emojis and sometimes part of them disappear [$500] Web - Emojis flickers when scrolling a list of emojis and sometimes part of them disappear Nov 7, 2023
Copy link

melvin-bot bot commented Nov 7, 2023

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

Copy link

melvin-bot bot commented Nov 7, 2023

Triggered auto assignment to @adelekennedy (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 Nov 7, 2023
Copy link

melvin-bot bot commented Nov 7, 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

Copy link

melvin-bot bot commented Nov 7, 2023

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

@ZhenjaHorbach
Copy link
Contributor

ZhenjaHorbach commented Nov 7, 2023

Proposal

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

Emojis flickers when scrolling a list of emojis and sometimes part of them disappear

What is the root cause of that problem?

The main problem is
That we have a non-optimized FlatList
Which does not have time to display new elements correctly if we swipe the list very quickly

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

We have a huge number of properties to optimize FlatList
https://reactnative.dev/docs/optimizing-flatlist-configuration

But the most optimal as for me is the addition of new properties of windowsize and updateCellsBatchingPeriod

Which will increase small memory consumption but will positively affect the display of elements

So we can add updateCellsBatchingPeriod={25} windowSize={42} for FlatList

<FlatList
ref={emojiListRef}
data={filteredEmojis}
renderItem={renderItem}
keyExtractor={keyExtractor}
numColumns={CONST.EMOJI_NUM_PER_ROW}
style={[
listStyle,
// This prevents elastic scrolling when scroll reaches the start or end
{overscrollBehaviorY: 'contain'},
// Set overflow to hidden to prevent elastic scrolling when there are not enough contents to scroll in FlatList
{overflowY: filteredEmojis.length > overflowLimit ? 'auto' : 'hidden'},
// Set scrollPaddingTop to consider sticky headers while scrolling
{scrollPaddingTop: isFiltered ? 0 : CONST.EMOJI_PICKER_ITEM_HEIGHT},
]}
extraData={[filteredEmojis, highlightedIndex, preferredSkinTone]}
stickyHeaderIndices={headerIndices}
getItemLayout={getItemLayout}
contentContainerStyle={styles.flexGrow1}
ListEmptyComponent={<Text style={[styles.textLabel, styles.colorMuted]}>{translate('common.noResultsFound')}</Text>}
/>

Before

Screen.Recording.2023-11-07.at.14.28.25.mov

After

Screen.Recording.2023-11-07.at.14.27.25.mov

Since this problem is specific to browsers
We can disable this for apps

What alternative solutions did you explore? (Optional)

As an alternative, we can use other properties
For example maxToRenderPerBatch + updateCellsBatchingPeriod

@daviddigital
Copy link

daviddigital commented Nov 7, 2023

Proposal

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

In chrome on mac web, the emoji's flicker, particularly when scrolling fast or jumping through emoji categories

What is the root cause of that problem?

I identified that this is only happening in chrome and is fine in safari/firefox, and can be "fixed" if hardware acceleration is turned off in chrome system settings. So the root cause is a conflict with the chrome hardware acceleration and the emoji rendering. This could be because theFlatList and the renderItem is not optimised as much as possible, but tweaks didn't solve that, but rather adjusting the styling of the Text for emojiText does.

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

Removing the styling of the emojiText in the EmojiPickerMenuItem component (so its just the emoji unicode) fixes the flickering, so to fix the problem we just need to update the styling of the Text component for emojiText so that it doesn't conflict with the chrome browser on rendering as is currently happening.

As a proof of concept, if I remove all styling on emojiText, or even just the fontSize so that the Text component just renders as a unicode emoji, the flickering stops (see video).

https://github.com/Expensify/App/blob/c2e40423ac71fa67e65b570342c39e4c2b25a46f/src/styles/styles.ts#L1868C1-L1875C1

Note in the solution the styling will match the current styling, this is a POC.

https://imgur.com/a/HQPsc7n

https://imgur.com/a/5fiUw8V

What alternative solutions did you explore? (Optional)

I looked into the FlatList implementation on the EmojiPickerMenu component on to see if there were performance improvements but they didn't fix the problem.

Copy link

melvin-bot bot commented Nov 7, 2023

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

Copy link

melvin-bot bot commented Nov 7, 2023

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

@adelekennedy
Copy link

not overdue - proposals to review above!

@melvin-bot melvin-bot bot added Overdue and removed Overdue labels Nov 9, 2023
@alitoshmatov
Copy link
Contributor

Reviewing

@melvin-bot melvin-bot bot removed the Overdue label Nov 13, 2023
@alitoshmatov
Copy link
Contributor

@ZhenjaHorbach I can still easily reproduce this issue after your solution:

Screen.Recording.2023-11-13.at.21.59.02.mov

@alitoshmatov
Copy link
Contributor

@daviddigital I don't think removing styles is an option, even removing them didn't help. I can easily reproduce this issue

Copy link

melvin-bot bot commented Nov 14, 2023

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

@adelekennedy
Copy link

Still open to better proposals

@melvin-bot melvin-bot bot added the Overdue label Nov 20, 2023
Copy link

melvin-bot bot commented Nov 20, 2023

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

@alitoshmatov
Copy link
Contributor

Waiting for proposals here

@melvin-bot melvin-bot bot removed the Overdue label Nov 20, 2023
Copy link

melvin-bot bot commented Nov 21, 2023

@alitoshmatov @adelekennedy 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!

@daviddigital
Copy link

daviddigital commented Nov 21, 2023 via email

Copy link

melvin-bot bot commented Nov 21, 2023

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

@alitoshmatov
Copy link
Contributor

Thank you @daviddigital, I think there is a very little possibility of #30911 fixing this issue. I did a quick implementation of FlashList but it did not fix this issue on my testing.

@melvin-bot melvin-bot bot added the Overdue label Nov 24, 2023
@adelekennedy
Copy link

still open to better proposals

@melvin-bot melvin-bot bot removed the Overdue label Nov 26, 2023
Copy link

melvin-bot bot commented Nov 28, 2023

@alitoshmatov @adelekennedy this issue is now 3 weeks old. There is one more week left before this issue breaks WAQ and will need to go internal. What needs to happen to get a PR in review this week? Please create a thread in #expensify-open-source to discuss. Thanks!

Copy link

melvin-bot bot commented Nov 28, 2023

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

@alitoshmatov
Copy link
Contributor

We don't have any proposals yet that solve this issue.

@melvin-bot melvin-bot bot added the Overdue label Dec 2, 2023
@adelekennedy
Copy link

still pending better proposals (small issue so not increasing price)

@melvin-bot melvin-bot bot removed the Overdue label Dec 4, 2023
Copy link

melvin-bot bot commented Dec 5, 2023

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

Copy link

melvin-bot bot commented Dec 5, 2023

@alitoshmatov @adelekennedy this issue is now 4 weeks old and preventing us from maintaining WAQ, can you:

  • Decide whether any proposals currently meet our guidelines and can be approved as-is today
  • If no proposals meet that standard, please take this issue internal and treat it as one of your highest priorities
  • If you have any questions, don't hesitate to start a discussion in #expensify-open-source

Thanks!

@melvin-bot melvin-bot bot added Internal Requires API changes or must be handled by Expensify staff and removed External Added to denote the issue can be worked on by a contributor Help Wanted Apply this label when an issue is open to proposals by contributors labels Dec 5, 2023
Copy link

melvin-bot bot commented Dec 5, 2023

Current assignee @alitoshmatov is eligible for the Internal assigner, not assigning anyone new.

@melvin-bot melvin-bot bot added the Overdue label Dec 7, 2023
@adelekennedy
Copy link

I'm going to close this one - it's a small bug that I even find challenging to reproduce and we aren't getting any traction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Engineering Internal Requires API changes or must be handled by Expensify staff
Projects
None yet
Development

No branches or pull requests

5 participants