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

Web - Inconsistent styling when selecting phone number with @ mention in chat. #21790

Closed
1 of 6 tasks
kbecciv opened this issue Jun 28, 2023 · 6 comments
Closed
1 of 6 tasks
Assignees
Labels
Bug Something is broken. Auto assigns a BugZero manager. Reviewing Has a PR in review Weekly KSv2

Comments

@kbecciv
Copy link

kbecciv commented Jun 28, 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. Open any chat.
  2. Type @ and select a phone number from the list.
  3. Observe that the styling and properties are different from when selecting an email.

Expected Result:

The styling and properties should be consistent when selecting a phone number or email with @ mention.

Actual Result:

The styling and properties are not consistent when selecting a phone number with @ mention compared to selecting an email.

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.32-5
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

screen-capture.59.1.mp4
Recording.929.mp4

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

View all open jobs on GitHub

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

melvin-bot bot commented Jun 28, 2023

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

@melvin-bot
Copy link

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

@Ollyws
Copy link
Contributor

Ollyws commented Jun 28, 2023

Proposal

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

Phone numbers are not being recognised as user mentions.

What is the root cause of that problem?

We're just checking for valid emails in Expensimark using this regex.

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

We can modify this regex to also accept phone numbers, we already have a regex string for phone numbers here but it would need to be modified slightly. The final regex string looking something like this:

regex: new RegExp(`[\`.a-zA-Z]?@+(${CONST.REG_EXP.EMAIL_PART}|(\\+?[1-9]\\d{1,14}))(?!((?:(?!<a).)+)?<\\/a>|[^<]*(<\\/pre>|<\\/code>))`, 'gm'),

We may need to modify this slightly depending on what we're considering a valid phone number (obligatory +, minimum length etc)

What alternative solutions did you explore? (Optional)

None

@Nikhil-Vats
Copy link
Contributor

dupe of #21684. Only those phone numbers are not rendered as mentions which don't have accounts because they don't follow the format phoneNumber@expensify.sms

@bernhardoj
Copy link
Contributor

This is a known issue https://expensify.slack.com/archives/C01GTK53T8Q/p1683753105314829

cc: @puneetlath

@puneetlath
Copy link
Contributor

Yes this is a known bug and not something that we are currently going to fix. It will be fixed in the next iteration of mentions.

@melvin-bot melvin-bot bot added Reviewing Has a PR in review Weekly KSv2 and removed Daily KSv2 labels Jul 20, 2023
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. Reviewing Has a PR in review Weekly KSv2
Projects
None yet
Development

No branches or pull requests

6 participants