-
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] Chat - Certain characters are considered as 6 characters within the message box #26051
Comments
Triggered auto assignment to @MitchExpensify ( |
Bug0 Triage Checklist (Main S/O)
|
ProposalPlease re-state the problem that we are trying to solve in this issue.When calculating the total comment length, characters with diacritics are being counted as Unicode characters (6 chars in length). What is the root cause of that problem?In Lines 2886 to 2890 in d09a1b6
What changes do you think we should make in order to solve the problem?Update the regex to exclude latin characters as well while calculating the comment length. This will ensure that characters with diacritics are counted as expected. Note that this will have to be checked with the backend implementation to confirm that it is working correctly. return getParsedComment(textComment)
- .replace(/[^ -~]/g, '\\u????')
+ .replace(/[^ -~\p{Script=Latin}]/gu, '\\u????')
.trim().length; The regex also has to be extended or updated to exclude other characters such as What alternative solutions did you explore? (Optional)If the backend counts characters with diacritics as 6 in length, then we can update the getParsedComment to show the correct "expected count" for presentation on the frontend instead. However, the logic should ideally match whatever the backend implementation is. |
Job added to Upwork: https://www.upwork.com/jobs/~01ef4e9f58ef6fe5dd |
Current assignee @MitchExpensify is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Ollyws ( |
Ah got it thanks @redstar504 ! Closing in that case |
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:
Expected Result:
The overall count should increase by 1
Actual Result:
The overall count increased by 6
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.3.57-5
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
6-char-Expensify.mp4
Recording.6026.mp4
Expensify/Expensify Issue URL:
Issue reported by: @hichamcc
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1692470777922139
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: