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

Chat - Space is added after selecting an emoji from dropdown #20705

Closed
6 tasks done
lanitochka17 opened this issue Jun 13, 2023 · 12 comments
Closed
6 tasks done

Chat - Space is added after selecting an emoji from dropdown #20705

lanitochka17 opened this issue Jun 13, 2023 · 12 comments
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Daily KSv2

Comments

@lanitochka17
Copy link

lanitochka17 commented Jun 13, 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!


Issue found when executing PR #15951

Action Performed:

  1. Go to staging.new.expensify.com
  2. Go to any chat
  3. Type :wa
  4. Select an emoji from the list

Expected Result:

There is no space added after selecting the emoji

Actual Result:

Space is added after selecting the emoji

Workaround:

Unknown

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.27.4

Reproducible in staging?: Yes

Reproducible in production?: Yes

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

Bug6091640_Recording__52.mp4

Expensify/Expensify Issue URL:

Issue reported by: Applause - Internal Team

Slack conversation:

View all open jobs on GitHub

@lanitochka17 lanitochka17 added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 13, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 13, 2023

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

@melvin-bot
Copy link

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

@getusha
Copy link
Contributor

getusha commented Jun 13, 2023

Proposal

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

What is the root cause of that problem?

there is a space purposely being added here:

this.updateComment(`${commentBeforeColon}${emojiCode} ${this.trimLeadingSpace(commentAfterColonWithEmojiNameRemoved)}`, true);

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

We should remove the empty space from the code above. After removing the empty space the code will be

this.updateComment(`${commentBeforeColon}${emojiCode}${this.trimLeadingSpace(commentAfterColonWithEmojiNameRemoved)}`, true);

Result:

Screen.Recording.2023-06-13.at.11.40.43.PM.mov

What alternative solutions did you explore? (Optional)

N/A

@dukenv0307
Copy link
Contributor

Proposal

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

Chat - Space is added after selecting an emoji from dropdown

What is the root cause of that problem?

this.updateComment(`${commentBeforeColon}${emojiCode} ${this.trimLeadingSpace(commentAfterColonWithEmojiNameRemoved)}`, true);

See here when inserting emoji from suggestion, we always add a space

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

We should update logic like that

 this.updateComment(`${commentBeforeColon}${emojiCode}${commentAfterColonWithEmojiNameRemoved}`, true); 

to remain the entire text (include space) after the emoji

We also should update the selection

start: prevState.colonIndex + emojiCode.length + CONST.SPACE_LENGTH,
end: prevState.colonIndex + emojiCode.length + CONST.SPACE_LENGTH,

we should remove CONST.SPACE_LENGTH because we don't add space more

What alternative solutions did you explore? (Optional)

Result

Screen.Recording.2023-06-14.at.14.06.12.mov

@melvin-bot melvin-bot bot added the Overdue label Jun 15, 2023
@alexpensify
Copy link
Contributor

Still on my testing list

@melvin-bot melvin-bot bot removed the Overdue label Jun 15, 2023
@alexpensify
Copy link
Contributor

Closing - the space is intentional. Here is the convo:

https://expensify.slack.com/archives/C049HHMV9SM/p1682386879390169

@getusha
Copy link
Contributor

getusha commented Jun 17, 2023

@alexpensify The space might be intentional but it should be consistent around the app because this is currently the only method that inserts space trying to add emoji.

@alexpensify
Copy link
Contributor

Thanks for the feedback @getusha. I'm OOO tomorrow but will start another discussion with the team on Tuesday.

@getusha
Copy link
Contributor

getusha commented Jun 24, 2023

@alexpensify any updates? 🙂

@alexpensify
Copy link
Contributor

Thanks for the reminder, I bumped the internal conversation to confirm.

@getusha
Copy link
Contributor

getusha commented Jun 27, 2023

@alexpensify it's being handled here: #21584 now

@chiragxarora
Copy link
Contributor

I've reported the same issue in past, I think we need to update the reporter in the issue here.
https://expensify.slack.com/archives/C049HHMV9SM/p1681555924437289?thread_ts=1681555924.437289&cid=C049HHMV9SM

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

No branches or pull requests

5 participants