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-07-05] [$1000] Web - Chat - Mention list doesn't display when enter special key: '_-+=|\;`~ before: #20401

Closed
1 of 6 tasks
kbecciv opened this issue Jun 7, 2023 · 43 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

@kbecciv
Copy link

kbecciv commented Jun 7, 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 any chat
  2. Enter special key and @he (ex: _@he or `@he or ~@he)

Expected Result:

The mention suggestion display

Actual Result:

The mention suggestion doesn't display

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

Screenshot 2023-05-31 at 17 31 14 (1)

Expensify/Expensify Issue URL:

Issue reported by: @dukenv0307

Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1685529049518369

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~018585a2ed09409031
  • Upwork Job ID: 1666822250965151744
  • Last Price Increase: 2023-06-22
@kbecciv kbecciv added Daily KSv2 Bug Something is broken. Auto assigns a BugZero manager. labels Jun 7, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 7, 2023

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

@melvin-bot
Copy link

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

@kbecciv
Copy link
Author

kbecciv commented Jun 7, 2023

Proposal

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

What is the root cause of that problem?

In this PR: #19004 we don’t add some special keys ’_-=|;`~ in the SPECIAL_CHAR_OR_EMOJI and MENTION_REPLACER regex

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

Add _-=|;`~ key to both SPECIAL_CHAR_OR_EMOJI and MENTION_REPLACER regex (don’t add + key because this key maybe exist in email)

What alternative solutions did you explore? (Optional)

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jun 8, 2023

Re-post the proposal for more detail

Proposal

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

Web - Chat - Mention list doesn't display when enter special key: '_-+=|;`~ before:
Also happen in the emoji suggestion

What is the root cause of that problem?

We could check this PR for more context. This PR misses some special keys

In here

const words = leftString.split(CONST.REGEX.SPECIAL_CHAR_OR_EMOJI);

We are using this regex

App/src/CONST.js

Line 1129 in 6e7f460

SPECIAL_CHAR_OR_EMOJI:

This regex doesn't include all special keys like '_-+=|;`~ so if we enter these keys before @ (to mention) or : (to display emoji), these keys will be included in the search word then no result found and the suggestion will not display

I just checked on Slack if we enter some special key before @ or : and check whether the suggestion is displayed or not
This is the result

Header Slack Expensify
_ yes no
- yes no
+ yes (if after is :) and no (if after is @) no
= no no
| no no
\ no no
; no no
` no no
~ no no
@ no no

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

We need to confirm that which special key stands before @ or : then we should show suggestions

Confirmed below

we should add \ ; ` to SPECIAL_CHAR_OR_EMOJI and should also to MENTION_REPLACER regex like this
Screenshot 2023-06-23 at 11 54 02

Result

Screen.Recording.2023-06-23.at.11.52.27.mov

@sonialiap
Copy link
Contributor

Reproducible 👍

@sonialiap sonialiap added the External Added to denote the issue can be worked on by a contributor label Jun 8, 2023
@melvin-bot melvin-bot bot changed the title Web - Chat - Mention list doesn't display when enter special key: '_-+=|\;`~ before: [$1000] Web - Chat - Mention list doesn't display when enter special key: '_-+=|\;`~ before: Jun 8, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

Job added to Upwork: https://www.upwork.com/jobs/~018585a2ed09409031

@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 8, 2023

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

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

melvin-bot bot commented Jun 8, 2023

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

@melvin-bot melvin-bot bot added the Overdue label Jun 12, 2023
@sonialiap
Copy link
Contributor

@abdulrahuman5196 we have a couple of proposals for this one already, have you had a chance to review them. Do either of them look good to start working on a solution?

@melvin-bot melvin-bot bot removed the Overdue label Jun 12, 2023
@abdulrahuman5196
Copy link
Contributor

yes will do today

@abdulrahuman5196
Copy link
Contributor

I think the question here by @dukenv0307 is something we should think about before picking up a solution

We need to confirm that which special key stands before @ or : then we should show suggestions
IMO

If we start allowing characters before '@', how do we plan to different for emails? If we think '+' as valid before character of mention then the emails will be clashing with it for eg 'abdul+@gmail.com', mentions would come in this case if I try to input email Id.

@PauloGasparSv @sonialiap

@abdulrahuman5196
Copy link
Contributor

@PauloGasparSv @sonialiap Ping on the above

@melvin-bot melvin-bot bot added the Overdue label Jun 14, 2023
@PauloGasparSv
Copy link
Contributor

Thks for bringing this up @abdulrahuman5196.

IMO the behaviour we have right now is great and I don't think we should change that. Let's wait for @sonialiap's thoughts on this too!

Btw, I think we almost discussed if this was worth solving in the first place but then we created the GH anyways.

@melvin-bot melvin-bot bot removed the Overdue label Jun 14, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 15, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@melvin-bot melvin-bot bot added the Overdue label Jun 19, 2023
@PauloGasparSv
Copy link
Contributor

Oh, I just realized that @sonialiap is OOO until EOW

IMO this doesn't really need to be discussed further and we should just Do Nothing because there is no real reason for the expected results.

@melvin-bot melvin-bot bot removed the Overdue label Jun 19, 2023
@dukenv0307
Copy link
Contributor

dukenv0307 commented Jun 22, 2023

I think we should not add/accept these special characters because they are allowed in emails and pretty common:
_ + - @ ~ |

@PauloGasparSv So will we add/accept these characters \ ' ; `

@PauloGasparSv
Copy link
Contributor

@PauloGasparSv So will we add/accept these characters \ ' ; `

Yes to: \ ; `
No to: '

So the list of accepted should be the following IMO:
, / \ ? " { } [ ] ( ) & ^ % $ # < > ! * = ` ;

And let's not add these characters there were discussed here at some point:
_ + - @ ~ | '

@melvin-bot
Copy link

melvin-bot bot commented Jun 22, 2023

📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸

@dukenv0307
Copy link
Contributor

Agree with @PauloGasparSv suggestion and I also update proposal

@abdulrahuman5196
Copy link
Contributor

abdulrahuman5196 commented Jun 22, 2023

@PauloGasparSv I agree we should add a lower subset of character which don't clash with existing experiences. Even if people want to add more we can do it in future if required. (Which i highly doubt will happen)

@abdulrahuman5196
Copy link
Contributor

@dukenv0307 In the proposed changes, Since this is a regex change, kindly mention how you would change the regex to make this working.

Add _-=|;`~ key to both SPECIAL_CHAR_OR_EMOJI and MENTION_REPLACER regex (don’t add + key because this key maybe exist in email)

This doesn't provide complete information on how you would like to change the regex.

@dukenv0307
Copy link
Contributor

dukenv0307 commented Jun 23, 2023

@abdulrahuman5196 Thanks. I just update my proposal for more detail

cc @PauloGasparSv

@abdulrahuman5196
Copy link
Contributor

@dukenv0307 's proposal here #20401 (comment) looks good and works well.

We can add characters based on @PauloGasparSv 's comment here #20401 (comment)

🎀👀🎀
C+ Reviewed

cc: @PauloGasparSv

@PauloGasparSv
Copy link
Contributor

Nice, thks for all the help on defining the scope of this change @abdulrahuman5196 and @dukenv0307!

Assigning @dukenv0307 here

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

melvin-bot bot commented Jun 23, 2023

📣 @dukenv0307 You have been assigned to this job by @PauloGasparSv!
Please apply to this job in Upwork 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 📖

@dukenv0307
Copy link
Contributor

@abdulrahuman5196 The PR is ready for review

@melvin-bot
Copy link

melvin-bot bot commented Jun 26, 2023

🎯 ⚡️ Woah @abdulrahuman5196 / @dukenv0307, 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 @dukenv0307 got assigned: 2023-06-23 16:14:07 Z
  • when the PR got merged: 2023-06-26 18:30:57 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 Daily KSv2 labels Jun 28, 2023
@melvin-bot melvin-bot bot changed the title [$1000] Web - Chat - Mention list doesn't display when enter special key: '_-+=|\;`~ before: [HOLD for payment 2023-07-05] [$1000] Web - Chat - Mention list doesn't display when enter special key: '_-+=|\;`~ before: Jun 28, 2023
@melvin-bot melvin-bot bot removed the Reviewing Has a PR in review label Jun 28, 2023
@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

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

@melvin-bot
Copy link

melvin-bot bot commented Jun 28, 2023

The solution for this issue has been 🚀 deployed to production 🚀 in version 1.3.33-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-07-05. 🎊

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

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 Jun 28, 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:

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

@abdulrahuman5196
Copy link
Contributor

BZ checklist

The PR that introduced the bug has been identified. Link to the PR:
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:
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:

Not a regression. The characters in discussion was not previously added.

Determine if we should create a regression test for this bug.
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.

No. This is a minor case and wouldn't we beneficial to add a regression test.

@melvin-bot melvin-bot bot added Daily KSv2 and removed Weekly KSv2 labels Jul 4, 2023
@sonialiap
Copy link
Contributor

sonialiap commented Jul 5, 2023

@dukenv0307 offer sent for report + fix (+bonus) - paid ✔️
@abdulrahuman5196 offer sent for review (+bonus) - paid ✔️

@abdulrahuman5196
Copy link
Contributor

@sonialiap accepted the offer

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

5 participants