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-11-06] [$500] No background color displayed on emoji on search #30012

Closed
6 tasks done
kbecciv opened this issue Oct 19, 2023 · 24 comments
Closed
6 tasks done
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 Oct 19, 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!


Version Number: 1.3.87.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: @dhanashree-sawant
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1697723567806059

Action Performed:

  1. Open the app
  2. Open any report
  3. Click on emoji to open emoji picker
  4. Search for any emoji eg: joy
  5. Observe that no background color is displayed on first emoji in search
  6. Press enter and observe that first emoji is selected

Expected Result:

App should display background color to first emoji on search as we select first emoji on enter click after search

Actual Result:

App does not display background color to first emoji on search

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

Android: Native
Android.native.no.bg.emoji.mp4
Android: mWeb Chrome
Android.chrome.no.bg.emoji.mp4
iOS: Native
ios.native.no.bg.emoji.mov
iOS: mWeb Safari
ios.safari.no.bg.emoji.mov
MacOS: Chrome / Safari
mac.chrome.no.bg.emoji.mov
Recording.5085.mp4
MacOS: Desktop
mac.desktop.no.bg.emoji.mov

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~0136219e9671ca8f96
  • Upwork Job ID: 1715068000534409216
  • Last Price Increase: 2023-10-19
@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 Oct 19, 2023
@melvin-bot melvin-bot bot changed the title No background color displayed on emoji on search [$500] No background color displayed on emoji on search Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 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 Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 19, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 19, 2023

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

@s-alves10
Copy link
Contributor

s-alves10 commented Oct 19, 2023

Proposal

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

When searching in EmojiPicker, the first emoji isn't highlighted

What is the root cause of that problem?

We're showing focused emoji only when isUsingKeyboardMovement is true

const isEmojiFocused = index === highlightedIndex && isUsingKeyboardMovement;

But when the search input gets focused, this value is set to false
This is the root cause

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

We need to set isUsingKeyboardMovement when searching emojis
Add the following code to filterEmojis function above this line

updateFirstNonHeaderIndex(newFilteredEmojiList);

        setIsUsingKeyboardMovement(Boolean(searchTerm));

This works as expected

Result
30012.mp4

What alternative solutions did you explore? (Optional)

@neonbhai
Copy link
Contributor

neonbhai commented Oct 19, 2023

Proposal

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

When searching for emojis, the first result is selected, but we don't see it.

What is the root cause of that problem?

This happens because we select the first emoji by default here:

But The selected emoji will only show highlight when isUsingKeyboard is true.

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

Since the user is using the keyboard (typing) and we are also highlighting the first emoji. To show the highlight, we should add

setIsUsingKeyboard(true);

here.

What alternative solutions did you explore? (Optional)

Showing blue borders when using the keyboards seems to mirror the accessibility navigation. There are now two ways to highlight emojis:

Screencast.from.20-10-23.01.09.37.AM.IST.webm

We should stick to one type of highlight (changing the background). It looked cleaner.
To implement this we will modify the styles to highlight background (as opposed to border) when using keyboard.

@bernhardoj
Copy link
Contributor

Proposal

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

When we search on the emoji picker menu, pressing enter will select the first emoji, but there is no highlight on the emoji itself to indicate that it is going to be selected.

What is the root cause of that problem?

When we search, it will set the highlighted index to be 0.

However, the emoji item will be highlighted (blue outline) only if isUsingKeyboardMovement is true. Basically, we want to mimic focus-visible.

But the first emoji item is still selected because we set an ENTER key listener here.

if (!isEnterWhileComposition(keyBoardEvent) && keyBoardEvent.key === CONST.KEYBOARD_SHORTCUTS.ENTER.shortcutKey && highlightedIndex !== -1) {
const item = filteredEmojis[highlightedIndex];
if (!item) {
return;
}
const emoji = lodashGet(item, ['types', preferredSkinTone], item.code);
onEmojiSelected(emoji, item);
return;
}

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

I think it's better to set the highlighted index to -1 instead of 0 when we search.

Then, we can also safely remove the ENTER key listener because navigating through the emojis with the keyboard will focus the element, so pressing enter will trigger the emoji pressable onPress.

@melvin-bot melvin-bot bot added the Overdue label Oct 23, 2023
@melvin-bot
Copy link

melvin-bot bot commented Oct 23, 2023

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

@ntdiary
Copy link
Contributor

ntdiary commented Oct 23, 2023

under review.

@ntdiary
Copy link
Contributor

ntdiary commented Oct 23, 2023

At the moment there is no very satisfactory proposal, I have also left a question here to get some inputs.

@mountiny
Copy link
Contributor

I think we should handle it as a regression from this issue #29004, we did not notice this behaviour changed and we want to keep it

@mountiny mountiny removed the Help Wanted Apply this label when an issue is open to proposals by contributors label Oct 23, 2023
@mountiny
Copy link
Contributor

@dylanexpensify can you pay @dhanashree-sawant for reporting this and we will hande a fix in the linked issue

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Oct 24, 2023
@dylanexpensify
Copy link
Contributor

@dhanashree-sawant
Copy link

Hi @dylanexpensify, if possible, can you send me invite or offer for the job?

@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 30, 2023
@melvin-bot melvin-bot bot changed the title [$500] No background color displayed on emoji on search [HOLD for payment 2023-11-06] [$500] No background color displayed on emoji on search Oct 30, 2023
@melvin-bot
Copy link

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

melvin-bot bot commented Oct 30, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.92-4 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-11-06. 🎊

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:

@melvin-bot
Copy link

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

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

@dylanexpensify
Copy link
Contributor

Payment coming up!

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Nov 5, 2023
@dylanexpensify
Copy link
Contributor

@dhanashree-sawant invited!

@dhanashree-sawant
Copy link

dhanashree-sawant commented Nov 6, 2023

Thanks @dylanexpensify I have accepted the invite.

@dylanexpensify
Copy link
Contributor

invite sent!

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

melvin-bot bot commented Nov 10, 2023

@ntdiary, @dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

1 similar comment
Copy link

melvin-bot bot commented Nov 10, 2023

@ntdiary, @dylanexpensify Whoops! This issue is 2 days overdue. Let's get this updated quick!

@dylanexpensify
Copy link
Contributor

done!

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

8 participants