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-10] [$1000] Long emoji names are not being truncated and icons displayed at the start #23519

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

Comments

@kavimuru
Copy link

kavimuru commented Jul 24, 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!


Action Performed:

  1. Go to Settings > Preferences.
  2. Select Spanish language.
  3. Go back and open a chat.
  4. Type ":pist" in the chat
  5. Observe that the emoji icons are not at their positions

Expected Result:

Long emoji names should be broken into multiple lines (so the entire name is visible), and should appear in the same position as other emojis).

Actual Result:

Long emojis names are not being truncated that cause the icons not displayed at the their position

Workaround:

Can the user still use Expensify without this being fixed? Have you informed them of the workaround?

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.44-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
Notes/Photos/Videos: Any additional supporting documentation
WhatsApp Image 2023-07-24 at 7 40 49 PM

Expensify/Expensify Issue URL:
Issue reported by: @ayazhussain79
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1690043682464129

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01245a38493bcc690f
  • Upwork Job ID: 1683941474981871616
  • 2023-07-25
  • Automatic offers:
    • hungvu193 | Contributor | 25816031
@kavimuru kavimuru added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jul 24, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 24, 2023

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

@melvin-bot
Copy link

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

@s-alves10
Copy link
Contributor

s-alves10 commented Jul 24, 2023

Proposal

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

Long emoji suggestions doesn't show ellipsis, instead they are cut off

What is the root cause of that problem?

Emoji suggestion style has no text ellipsis feature

App/src/styles/styles.js

Lines 199 to 201 in b7d17e0

emojiSuggestionsText: {
fontSize: variables.fontSizeMedium,
},

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

We have 2 options: ellipsis and multiline

  1. Add flexShrink: 0 to the emojiSuggestionsEmoji style to prevent the shrink
  2. Add the following styles to the emojiSuggestionsText style in each case

Ellipsis

    flexShrink: 1,
    ...spacing.mr2,

Add two props below

<Text style={styles.emojiSuggestionsText}>

    <Text style={styles.emojiSuggestionsText} numberOfLines={1} ellipsizeMode='tail'>

Multiline

    flexShrink: 1,
    ...spacing.mr2,
    ...wordBreak.breakAll

This works fine.

android

image

web

image

What alternative solutions did you explore? (Optional)

We can apply similar styles with mention suggestions
Add styles.ph2 to the EmojiSuggestion container style

<View style={styles.autoCompleteSuggestionContainer}>

Set width:24 in the emojiSuggestionsEmoji style

App/src/styles/styles.js

Lines 194 to 198 in b7d17e0

emojiSuggestionsEmoji: {
fontSize: variables.fontSizeMedium,
width: 51,
textAlign: 'center',
},

Add the following styles to the emojiSuggestionsText style

    marginLeft: 8,
    overflow: 'hidden',
    textOverflow: 'ellipsis',
    whiteSpace: 'nowrap',

@hungvu193
Copy link
Contributor

hungvu193 commented Jul 25, 2023

Proposal

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

Long emoji names are not being truncated and icons displayed at the start

What is the root cause of that problem?

We didn't define a width for our emoji text which cause the issue.

App/src/styles/styles.js

Lines 204 to 206 in 6e6d2bd

emojiSuggestionsText: {
fontSize: variables.fontSizeMedium,
},

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

We should add width: "100%" or flex: 1 to the emojiSuggestionsText.

    emojiSuggestionsText: {
     // we can also add some padding right here to make it symmetrical with the left.
       fontSize: variables.fontSizeMedium,
        flex: 1,
        paddingRight: 10,
        ...wordBreak.breakWord,
    },

What alternative solutions did you explore? (Optional)

N/A

Result:

Screen.Recording.2023-07-26.at.06.52.36.mov

@jfquevedol2198
Copy link
Contributor

jfquevedol2198 commented Jul 25, 2023

Proposal

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

Long emoji names are not being truncated and icons displayed at the start

What is the root cause of that problem?

<Text style={styles.emojiSuggestionsText}>

numberOfLines of Text in this line is not specified and styles are not correct.

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

We can do same like MentionSuggestions

  1. Update these lines as follows:
 <View style={[styles.autoCompleteSuggestionContainer, styles.ph2]}>
    <Text style={styles.emojiSuggestionsEmoji}>{EmojiUtils.getEmojiCodeWithSkinColor(item, props.preferredSkinToneIndex)}</Text>
    <Text style={[styles.emojiSuggestionsText, styles.flex1]}>
  1. Styles Update:
    emojiSuggestionsEmoji: {
        fontSize: variables.fontSizeMedium,
        width: variables.fontSizeMedium,
        textAlign: 'center',
    },
    emojiSuggestionsText: {
        fontSize: variables.fontSizeMedium,
        ...spacing.ml2,
        ...wordBreak.breakAll
    },
Android image
iOS image
Web image image
mWeb - Chrome image
mWeb - Safari image

What alternative solutions did you explore? (Optional)

  1. Update this line as follows:
    <Text style={[styles.emojiSuggestionsText, styles.flex1, styles.pr4]}>
  1. Styles Update:
    emojiSuggestionsText: {
        fontSize: variables.fontSizeMedium,
        ...wordBreak.breakAll
    },

@joekaufmanexpensify
Copy link
Contributor

Reproduced. Though, I don't think we'd truncate the emojis that don't fit on one line. We should break them onto a second line (like we do for these same emojis in the android native app).

@joekaufmanexpensify joekaufmanexpensify added the External Added to denote the issue can be worked on by a contributor label Jul 25, 2023
@melvin-bot melvin-bot bot changed the title Long emoji names are not being truncated and icons displayed at the start [$1000] Long emoji names are not being truncated and icons displayed at the start Jul 25, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

Job added to Upwork: https://www.upwork.com/jobs/~01245a38493bcc690f

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

melvin-bot bot commented Jul 25, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jul 25, 2023

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

@jfquevedol2198
Copy link
Contributor

jfquevedol2198 commented Jul 25, 2023

@joekaufmanexpensify
We can add numberOfLines={2} with other changes
[Updated Proposal]

Web image
Mobile image

@allroundexperts
Copy link
Contributor

allroundexperts commented Jul 25, 2023

@jfquevedol2198 Please do not post code diff in your proposals.

Regarding your mentioned solution. I don't think it will handle the case where text is spread over 3 or more lines.

@allroundexperts
Copy link
Contributor

@hungvu193 and @s-alves10 You might want to update your proposals as well based on this feedback.

@allroundexperts
Copy link
Contributor

Still looking for better proposals.

@hungvu193
Copy link
Contributor

@allroundexperts Updated my proposal for multiple lines case #23519 (comment)

@jfquevedol2198
Copy link
Contributor

jfquevedol2198 commented Jul 26, 2023

@allroundexperts Updated my proposal.
It supports multilines and identical gaps between emoji and emoji name and it keeps consistency with MentionSuggestions

@s-alves10
Copy link
Contributor

Proposal

Updated

@allroundexperts
Copy link
Contributor

allroundexperts commented Jul 26, 2023

@hungvu193's updated proposal looks good to me as they were the first to propose a solution that works for multiline. The subsequent updated proposals were essentially doing the same thing.

🎀 👀 🎀 C+ reviewed

@melvin-bot
Copy link

melvin-bot bot commented Jul 26, 2023

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

@s-alves10
Copy link
Contributor

s-alves10 commented Jul 26, 2023

@allroundexperts

multiline was added later. Why don't we consider that?
In addition, I spent more time to find out perfect solution for all platforms. I think this should be considered

@jfquevedol2198
Copy link
Contributor

jfquevedol2198 commented Jul 26, 2023

@allroundexperts
My proposal was the first one to use flex and keep consistency with MentionSuggestions which worked already perfectly. and my solution keeps same gaps between icon and emojiText.
image

How to implement
image
image

And, I also spent time to find better solution because hungvu193's solution didn't work for Mobile before multiline.

@jfquevedol2198
Copy link
Contributor

@allroundexperts
I hope you compare mine and others:

My solution Others' solution
image image

@hungvu193
Copy link
Contributor

hungvu193 commented Jul 26, 2023

I already suggested adding flex, or width: 100% in my first proposal. Please check my editing history. I can't say I spent more time than anyone else here, but I did spend my time to make sure my solution worked on all platform. Not sure why we're arguing here.

@melvin-bot melvin-bot bot added the Weekly KSv2 label Jul 30, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 1, 2023

🎯 ⚡️ Woah @allroundexperts / @hungvu193, great job pushing this forwards! ⚡️

The pull request got merged within 3 working days of assignment, so this job is eligible for a 50% #urgency bonus 🎉

  • when @hungvu193 got assigned: 2023-07-28 19:47:17 Z
  • when the PR got merged: 2023-08-01 17:53:49 UTC

On to the next one 🚀

@melvin-bot melvin-bot bot added Weekly KSv2 Awaiting Payment Auto-added when associated PR is deployed to production and removed Weekly KSv2 labels Aug 3, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Long emoji names are not being truncated and icons displayed at the start [HOLD for payment 2023-08-10] [$1000] Long emoji names are not being truncated and icons displayed at the start Aug 3, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Aug 3, 2023
@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Aug 3, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.49-3 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-10. 🎊

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 3, 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:

@joekaufmanexpensify
Copy link
Contributor

@allroundexperts mind completing the BZ checklist here when you have a sec? TY!

@melvin-bot melvin-bot bot added Daily KSv2 Overdue and removed Weekly KSv2 labels Aug 9, 2023
@joekaufmanexpensify
Copy link
Contributor

Not overdue.

@allroundexperts
Copy link
Contributor

Checklist

  1. The PR that introduced the bug has been identified. Link to the PR: Static emoji autosuggestion  #14686
  2. 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: https://github.com/Expensify/App/pull/14686/files#r1290971864
  3. 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: https://expensify.slack.com/archives/C049HHMV9SM/p1691737975785319
  4. I think a regression test might not be needed here since this is really an rare use case. If someone disagrees, then the steps are the following.

Regression Steps

  1. On mobile web, Go to Settings > Preferences.
  2. Select Spanish language.
  3. Go back and open a chat.
  4. Type ":pist" in the chat

Verify that the emoji name appears in two lines.

Do we 👍 or 👎

@joekaufmanexpensify
Copy link
Contributor

Thanks! I agree no test needed here. This is niche. BZ checklist complete, so all set to issue payment!

@joekaufmanexpensify
Copy link
Contributor

This qualifies for urgency, so we need to issue the following payments:

  • @hungvu193 $1,500 ($1000 for PR and $500 speed bonus). Paid via upwork.
  • @allroundexperts $1,500 ($1000 for C+ review and $500 speed bonus). Paid via NewDot.
  • @ayazhussain79 $250 for reporting bonus. Paid via upwork.

@joekaufmanexpensify
Copy link
Contributor

@ayazhussain79 offer sent for $250!

@joekaufmanexpensify
Copy link
Contributor

@hungvu193 $1,500 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

@allroundexperts could you please request $1,500 via NewDot and confirm here once requested?

@ayazhussain79
Copy link
Contributor

@joekaufmanexpensify offer accepted, Thank you

@allroundexperts
Copy link
Contributor

Requested @joekaufmanexpensify!

@joekaufmanexpensify
Copy link
Contributor

@ayazhussain79 $250 sent and contract ended!

@joekaufmanexpensify
Copy link
Contributor

Upwork job closed.

@joekaufmanexpensify
Copy link
Contributor

Closing as this is all set! The only thing left is for our internal admin to pay @allroundexperts (request has been submitted). Please LMK if your request is not paid within the next 7 days, and I will investigate.

Noting for the admin who pays that payment summary message is here!

@JmillsExpensify
Copy link

Reviewed the details for @allroundexperts. Approved for payment in NewDot based on BZ summary above.

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

9 participants