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

[$250] Emoji - Inconsistency between Android and mWeb emojis are not highlighted on android during search #42762

Closed
1 of 6 tasks
lanitochka17 opened this issue May 29, 2024 · 23 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2 Design External Added to denote the issue can be worked on by a contributor

Comments

@lanitochka17
Copy link

lanitochka17 commented May 29, 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: 1.4.77-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: N/A
Email or phone of affected tester (no customers): PR passed?
Issue reported by: Applause - Internal Team

Issue found when executing PR #42407

Action Performed:

  1. Open the app and log in
  2. Open any report
  3. Tap the emoji picker
  4. Enter a search word that would return only one result and not in recently used, e.g. panda, fox, pizza etc
  5. Notice emoji not highlighted on android

Expected Result:

Emoji should be highlighted on Android

Actual Result:

Inconsistency between Android and mWeb emojis are not highlighted on android during 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

Add any screenshot/video evidence

Bug6495091_1716986811031.WhatsApp_Video_2024-05-29_at_17.38.39.mp4
Bug6495091_1716986811024.WhatsApp_Video_2024-05-29_at_17.38.23.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01fb05f9d997d92b6c
  • Upwork Job ID: 1795838319085740032
  • Last Price Increase: 2024-05-29
  • Automatic offers:
    • ishpaul777 | Reviewer | 102601204
    • bernhardoj | Contributor | 102601205
@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

Triggered auto assignment to @lschurr (Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.

@lanitochka17
Copy link
Author

@lschurr FYI 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

@lanitochka17
Copy link
Author

We think that this bug might be related to #vip-vsp

@bernhardoj
Copy link
Contributor

bernhardoj commented May 29, 2024

Proposal

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

There is an inconsistency on how we highlight the first emoji when searching.

What is the root cause of that problem?

On web, we have a logic to highlight the first emoji when searching, however, this logic doesn't present for native.

const shouldFirstEmojiBeHighlighted = index === 0 && highlightFirstEmoji;

isHighlighted={shouldFirstEmojiBeHighlighted || shouldEmojiBeHighlighted}

The way it works is, if we are searching, we set highlightFirstEmoji to true,

setHighlightFirstEmoji(true);

we reset it whenever the user uses keyboard to move to other emojis,

if (highlightFirstEmoji) {
setHighlightFirstEmoji(false);
}

or when the user hover over an emoji,

onHoverIn={() => {
setHighlightEmoji(false);
setHighlightFirstEmoji(false);

both of these things don't exist in native.

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

We can just copy the logic from web file to native file. We set highlightFirstEmoji when searching and clear it otherwise. We don't need to clear it when hovering or using keyboard key because both things don't exist in native.

Or, we can just the highlight condition to

const shouldFirstEmojiBeHighlighted = index === 0;

Why? When we are not searching, we are showing a Frequently used header. The header takes the 0 to 7 index, so the first emoji index will be 8. If we are searching, the header is hidden, thus the first emoji index will be 0.

Let me know which one we want to do.

@lschurr lschurr added the External Added to denote the issue can be worked on by a contributor label May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

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

@melvin-bot melvin-bot bot changed the title Emoji - Inconsistency between Android and mWeb emojis are not highlighted on android during search [$250] Emoji - Inconsistency between Android and mWeb emojis are not highlighted on android during search May 29, 2024
@melvin-bot melvin-bot bot added the Help Wanted Apply this label when an issue is open to proposals by contributors label May 29, 2024
Copy link

melvin-bot bot commented May 29, 2024

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

Copy link

melvin-bot bot commented Jun 3, 2024

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

@ishpaul777
Copy link
Contributor

Will review today 🙇‍♂️

@ishpaul777
Copy link
Contributor

@bernhardoj's Proposal LGTM!

we can just the highlight condition to

const shouldFirstEmojiBeHighlighted = index === 0;
Why? When we are not searching, we are showing a Frequently used header. The header takes the 0 to 7 index, so the first emoji index will be 8. If we are searching, the header is hidden, thus the first emoji index will be 0.

makes sense to me 👍

🎀 👀 🎀 C+ reviewed

Copy link

melvin-bot bot commented Jun 4, 2024

Triggered auto assignment to @techievivek, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

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

melvin-bot bot commented Jun 5, 2024

📣 @ishpaul777 🎉 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

Copy link

melvin-bot bot commented Jun 5, 2024

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

@bernhardoj
Copy link
Contributor

@techievivek @ishpaul777 While working on the PR, I'm questioning whether we should do this or not. In web, we can use keyboard to navigate and select the emoji, so it makes sense to highlight the first emoji so the user can press Enter to select it, but on native, we don't support keyboard control, so even if we highlight it, pressing Enter will do nothing. Do we still want to do it?

@ishpaul777
Copy link
Contributor

hey @bernhardoj I am not 100% sure whats should expected behaviour i lean on @techievivek for a decision here.

Copy link

melvin-bot bot commented Jun 10, 2024

@lschurr, @techievivek, @bernhardoj, @ishpaul777 Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

@melvin-bot melvin-bot bot added the Overdue label Jun 10, 2024
@lschurr
Copy link
Contributor

lschurr commented Jun 10, 2024

@techievivek could you take a look here?

@melvin-bot melvin-bot bot removed the Overdue label Jun 10, 2024
Copy link

melvin-bot bot commented Jun 12, 2024

@lschurr @techievivek @bernhardoj @ishpaul777 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!

@ishpaul777
Copy link
Contributor

we are awaiting input from @techievivek

@techievivek
Copy link
Contributor

Yeah, I don't know why it needs to be highlighted. It makes sense for web but not for mobile. Let's confirm with design team on this behaviour. Thanks.,

Copy link

melvin-bot bot commented Jun 13, 2024

Triggered auto assignment to @dannymcclain (Design), see these Stack Overflow questions for more details.

@techievivek
Copy link
Contributor

Hi, @dannymcclain. Can you check the GH and confirm if we really need to fix the behavior here? i.e., we currently highlight search results on the web but not on mobile. Do we need to highlight the search results on phone as well?

@dannymcclain
Copy link
Contributor

I think we highlight the emoji on desktop because you can use your keyboard (return/enter) to add it to the composer. That's not really as common of a pattern on mobile—I mean I guess technically we could implement it that way... but it's just not as common on mobile devices to use the return key to do things like that. So I think we can leave this behavior as is and close this.

@techievivek
Copy link
Contributor

Great, thanks for confirming. We were on same boat so closing this out.

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 Design External Added to denote the issue can be worked on by a contributor
Projects
No open projects
Archived in project
Development

No branches or pull requests

6 participants