-
Notifications
You must be signed in to change notification settings - Fork 3k
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
[$1000] Mentioned list is not showing with display name with & in between #22375
Comments
Triggered auto assignment to @kadiealexander ( |
Bug0 Triage Checklist (Main S/O)
|
This seems like a duplicate of #22374 |
I think they're slightly different, right? Yours is where the display name won't show at all for new users, whereas mine Is related to the @s77rt could you please take a look and see if these might have the same root cause? Thanks so much! |
ProposalPlease re-state the problem that we are trying to solve in this issue.If name contains & sign it would not appear when we search like @abc& What is the root cause of that problem?This here breaks the words at special characters hence when & comes the last word would be empty string '' and there is no atIndex. What changes do you think we should make in order to solve the problem?We should define a CONST for SPECIAL_CHAR_OR_EMOJI_FOR_MENTIONS excluding the special characters allowed in displayName and use it to split the words. SPECIAL_CHAR_OR_EMOJI_FOR_MENTION: /[\n\s,/?"{}[\]()^%\\;`$=#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, and change in split words. As all special characters except , and ; are allowed in displayName we need to change the regex accordingly Screen.Recording.2023-07-07.at.6.52.18.AM.movWhat other alternative solutions do you propose?We can restrict users from using some special characters in the name. For example, Slack restricts username to include only CONST.VALID_DISPLAY_NAME = /[^a-zA-Z0-9\[\]();',.\/]/ and change the isValidName function to
|
Root cause for this is different |
Repro: 2023-07-07_15-51-47.mp4 |
Job added to Upwork: https://www.upwork.com/jobs/~01b5bdd04db4b9c2a1 |
Current assignee @kadiealexander is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak ( |
@kadiealexander The two issues look different. |
Hello |
📣 @LiaqatSaeed! 📣
|
Contributor details |
✅ Contributor details stored successfully. Thank you for contributing to Expensify! |
@eVoloshchak, @kadiealexander Whoops! This issue is 2 days overdue. Let's get this updated quick! |
Not overdue, reviewing a proposal tomorrow |
After investigating this issue, I arrived at a similar conclusion to @c3024 above. I just thought I'd add that the bug occurs not just when there's an If the proposal isn't accepted, then I'm open to taking another crack at this, otherwise, all the best. |
I agree with @c3024 assessment of the root cause I like the general direction of the proposal, but it didn't resolve the issue for me. |
I checked and found that only part of string till the first special character is replaced with email once we submit the message. To replace the whole string with email, the SPECIAL_CHAR_OR_EMOJI_FOR_MENTIONS:
// eslint-disable-next-line no-misleading-character-class
/[\n\s,;\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3/gu, here MENTION_REPLACER:
// eslint-disable-next-line no-misleading-character-class
/^@[^\n\r]*(?=$|[\s,/?"{}[\]()&^%\\;`$=#<>!*\p{Extended_Pictographic}\u200d\u{1f1e6}-\u{1f1ff}\u{1f3fb}-\u{1f3ff}\u{e0020}-\u{e007f}\u20E3\uFE0F]|[#*0-9]\uFE0F?\u20E3)/u, We are changing the
and https://github.com/Expensify/App/blob/35e8d4643eb5f1ecd4db78bac6e145585e3d333a/src/pages/home/report/ReportActionCompose.js#L567C9-L567C9 to const indexOfFirstWhitespaceCharOrEmojiAfterTheCursor = valueAfterTheCursor.search(CONST.REGEX.SPECIAL_CHAR_OR_EMOJI_FOR_MENTIONS); and const words = leftString.split(CONST.REGEX.SPECIAL_CHAR_OR_EMOJI_FOR_MENTIONS); ResultScreen.Recording.2023-07-14.at.1.05.52.AM.movCould you please check this? @eVoloshchak This should work. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@eVoloshchak, @kadiealexander Huh... This is 4 days overdue. Who can take care of this? |
Testing this |
@c3024, can confirm it working, thanks
Can we replace it with const |
@eVoloshchak There is a specific case where this difference matters. We can change it to split at ' ' because it also appears logical but there may have been some discussion in which it was decided to split at special characters. ResultScreen.Recording.2023-07-20.at.2.42.46.AM.mov |
@eVoloshchak @kadiealexander 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! |
@c3024, ah, I see, thanks |
@eVoloshchak In case I misunderstood, just to clarify we don't allow , and : in name. All other characters are allowed. So, words are split at , or : only with the regex I suggested and not at other special characters. I too think we can just split at ' ' as it is simpler and I think it is similar in other platforms like slack as well. I need to confirm. |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@eVoloshchak, @kadiealexander Uh oh! This issue is overdue by 2 days. Don't forget to update your issues! |
@eVoloshchak can you please link your Slack discussion here? |
We agreed not to fix this here, as it's a very unlikely use case we'll wait for a real user to report it. |
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:
Precondition: Please change the display name of user B to anything but should have & in the display name
Expected Result:
Mentioned list should be shown with display name having & in between
Actual Result:
Mentioned list is not showing with display name with & in between
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?
Version Number: 1.3.37-2
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
error-2023-07-05_22.08.23.mp4
Recording.1187.mp4
Expensify/Expensify Issue URL:
Issue reported by: @priya-zha
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1688574053007549
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: