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 2024-03-14] [$500] Emoji picker - Highlight is removed from emoji when scrolling up with up key #36883

Closed
2 of 6 tasks
kbecciv opened this issue Feb 20, 2024 · 29 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 Monthly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Feb 20, 2024

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: v1.4.43-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/4168711
Issue reported by: Applause - Internal Team

Action Performed:

  1. Open emoji picker
  2. Press down key till the first two rows of 'Smileys & Emotions' emoji section is hidden
  3. Then press up key till you reach the first two rows that were hidden from view

Expected Result:

Highlight should be applied on emoji that the user has navigated too

Actual Result:

Highlight is not applied on emoji that the user has navigated too

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

Add any screenshot/video evidence

Bug6385561_1708425146641.Screen_Recording_2024-02-20_at_1.27.07_in_the_afternoon.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01b2c7f05245fc734a
  • Upwork Job ID: 1760053354078916608
  • Last Price Increase: 2024-02-20
  • Automatic offers:
    • Pujan92 | Contributor | 0
    • shubham1206agra | Contributor | 0
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

@kbecciv
Copy link
Author

kbecciv commented Feb 20, 2024

We think that this bug might be related to #vip-vsb
CC @quinthar

@kbecciv
Copy link
Author

kbecciv commented Feb 20, 2024

@puneetlath I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

@Krishna2323
Copy link
Contributor

Krishna2323 commented Feb 20, 2024

Proposal

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

Emoji picker - Highlight is removed from emoji when scrolling up with up key

What is the root cause of that problem?

We pass block: 'nearest' to scrollIntoView function, we also have header for each emojis section, due to the header the emoji is not visible.

this.ref.scrollIntoView({block: 'nearest'});

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

Pass block: 'center' or block: 'end' to scrollIntoView function.

this.ref.scrollIntoView({block: 'center'});

Result

Use flatListRef.scrollToIndex({index, animated: true});

    useEffect(() => {
        if (focusedIndex < 0 || !emojiListRef.current) {
            return;
        }
        const calculatedOffset = Math.floor(focusedIndex / CONST.EMOJI_NUM_PER_ROW) * CONST.EMOJI_PICKER_HEADER_HEIGHT;
        scrollTo(emojiListRef, 0, calculatedOffset - CONST.EMOJI_PICKER_HEADER_HEIGHT, false);
    }, [focusedIndex, emojiListRef]);

PS: Minor edits can be made through PR phase.

@puneetlath puneetlath added the External Added to denote the issue can be worked on by a contributor label Feb 20, 2024
@melvin-bot melvin-bot bot changed the title Emoji picker - Highlight is removed from emoji when scrolling up with up key [$500] Emoji picker - Highlight is removed from emoji when scrolling up with up key Feb 20, 2024
Copy link

melvin-bot bot commented Feb 20, 2024

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

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

melvin-bot bot commented Feb 20, 2024

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

@mananjadhav
Copy link
Collaborator

@Krishna2323 I did not understand what you mean by Result Use flatListRef.scrollToIndex({index, animated: true});. But overall your proposal looks good. I tested and it worked fine.

🎀 👀 🎀 C+ reviewed.

Copy link

melvin-bot bot commented Feb 21, 2024

Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

@Pujan92
Copy link
Contributor

Pujan92 commented Feb 21, 2024

Proposal

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

Highlighted emoji isn't scrolled when we go up

What is the root cause of that problem?

Earlier with the FlatList it was working as scrollPaddingTop added to the style of it in this PR at this place.
After migrating to the FlashList it isn't working as that style(scrollPaddingTop) has been given to the parent View instead of FlashList. PR cc: @TMisiukiewicz

listWrapperStyle={[
listStyle,
// Set scrollPaddingTop to consider sticky headers while scrolling
{scrollPaddingTop: isListFiltered ? 0 : CONST.EMOJI_PICKER_ITEM_HEIGHT},
styles.flexShrink1,
]}

<View style={listWrapperStyle}>
<FlashList

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

By looking at the FlashList repo it seems passing style won't work directly as fixed styles(style: { minHeight: 1, minWidth: 1 },) set for it.
We can override the style prop with overrideProps which isn't recommended as per the doc but I am only seeing that option at the moment. Remove scrollPaddingTop from the listWrapperStyle.

overrideProps={{
    style: {
        minHeight: 1, 
        minWidth: 1,
        scrollPaddingTop: isFiltered ? 0 : CONST.EMOJI_PICKER_ITEM_HEIGHT
    }
}}
Result
p3.mp4

@shubham1206agra
Copy link
Contributor

shubham1206agra commented Feb 23, 2024

The solution by @Pujan92 doesn't break anything. We can go by one of the following routes in this case:

  1. Patch the flash-list to accept an extra style prop without overriding anything
  2. Use the given solution as it is. (My preferred choice as it is an edge case, and flash-list might not be changing this a lot).

In either case, I will go ahead with @Pujan92's proposal

🎀👀🎀 C+ reviewed

@melvin-bot melvin-bot bot added the Overdue label Feb 23, 2024
Copy link

melvin-bot bot commented Feb 23, 2024

Current assignee @puneetlath is eligible for the choreEngineerContributorManagement assigner, not assigning anyone new.

Copy link

melvin-bot bot commented Feb 26, 2024

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

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

melvin-bot bot commented Feb 28, 2024

📣 @Pujan92 🎉 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 📖

@puneetlath
Copy link
Contributor

Ok let's go with option 2.

Copy link

melvin-bot bot commented Feb 28, 2024

📣 @shubham1206agra 🎉 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 melvin-bot bot added the Weekly KSv2 label Feb 28, 2024
@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 7, 2024
@melvin-bot melvin-bot bot changed the title [$500] Emoji picker - Highlight is removed from emoji when scrolling up with up key [HOLD for payment 2024-03-14] [$500] Emoji picker - Highlight is removed from emoji when scrolling up with up key Mar 7, 2024
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Mar 7, 2024
Copy link

melvin-bot bot commented Mar 7, 2024

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

Copy link

melvin-bot bot commented Mar 7, 2024

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.48-0 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 2024-03-14. 🎊

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

Copy link

melvin-bot bot commented Mar 7, 2024

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:

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

@puneetlath
Copy link
Contributor

@shubham1206agra friendly reminder about the checklist so that we can pay tomorrow.

@puneetlath
Copy link
Contributor

@Pujan92 has been paid.

@shubham1206agra bump on the checklist! (and on accepting the offer)

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Mar 14, 2024
@shubham1206agra
Copy link
Contributor

@puneetlath Can you hold my payment temporarily as per https://expensify.slack.com/archives/C02NK2DQWUX/p1710150138788529?

@shubham1206agra
Copy link
Contributor

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:

@melvin-bot melvin-bot bot added the Overdue label Mar 18, 2024
Copy link

melvin-bot bot commented Mar 18, 2024

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

@puneetlath
Copy link
Contributor

Moving to monthly for #36883 (comment)

@melvin-bot melvin-bot bot removed the Overdue label Mar 18, 2024
@puneetlath puneetlath added Monthly KSv2 and removed Daily KSv2 labels Mar 18, 2024
@shubham1206agra
Copy link
Contributor

@puneetlath I have discussed this internally. You may close this issue as I am keeping track of payment internally and will ask to pay once the issue is resolved. Just write in the payment summary that I have not been paid yet.

@shubham1206agra
Copy link
Contributor

@puneetlath You can process payment here now.

@puneetlath
Copy link
Contributor

Sent offer here: https://www.upwork.com/nx/wm/offer/101910104

Please ping me on this issue when you've accepted.

@puneetlath puneetlath reopened this Apr 17, 2024
@shubham1206agra
Copy link
Contributor

@puneetlath Accepted

@puneetlath
Copy link
Contributor

All paid.

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 Monthly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants