-
Notifications
You must be signed in to change notification settings - Fork 2.9k
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 2024-02-14] [$500] Expense - Approver email from Next step message receives error when pasted in login field #34437
Comments
Job added to Upwork: https://www.upwork.com/jobs/~01b45edbff007b5878 |
Triggered auto assignment to @MitchExpensify ( |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @alitoshmatov ( |
ProposalPlease re-state the problem that we are trying to solve in this issue.Copying the email from next step message and use it as the login will fail the login validation. What is the root cause of that problem?The email in next step message contains a zero width character, specifically zero width space that is added from Lines 10 to 28 in 964548a
The motivation behind that is explained well in the comment. So, when we use this as the login, the validation will throw an error because zero width scpae is not a valid character. What changes do you think we should make in order to solve the problem?We can replace all zero width space when copying the text in SelectionScraper. App/src/libs/SelectionScraper/index.ts Lines 113 to 114 in 964548a
Another zero width character is ZWJ with unicode of or remove prefixMailSeparatorsWithBreakOpportunities if we don't want it anymore |
ProposalPlease re-state the problem that we are trying to solve in this issue.Expense - Approver email from Next step message receives error when pasted in login field. What is the root cause of that problem?The email in next step message contains a zero-width character, which is zero-width space character (so that user wouldn't notice this) that is added using Lines 10 to 28 in 964548a
As we are not removing zero-width characters in LoginForm as we are doing in every other form, which uses What changes do you think we should make in order to solve the problem?Remove the zero-width characters using |
ProposalPlease re-state the problem that we are trying to solve in this issue.The email is a valid email but validation error shows up in the login field. What is the root cause of that problem?In here, we're appending zero width character into the email so that it breaks properly on web, more explanation here. This causes the validation to fail in login page. What changes do you think we should make in order to solve the problem?I'm expanding on the suggested approach
(we can expand to remove all zero width characters if we want to)
We can additionally remove the invisible characters before validation/submission in the login page using What alternative solutions did you explore? (Optional)I don't think this is good practice because:
I think what we should do instead is to use More info on why the
|
Proposals ready for you to check out @alitoshmatov |
@bernhardoj Thank you for proposal, your RCA is correct. I do agree with your solution, clearing zero width characters when copying is a good approach. |
@shubham1206agra Thank you for proposal. Your solution does solve the issue but I am more worried about user copying zero-width characters without knowing them. And I agree with @tienifr 's point about it:
|
@tienifr Thank you for your proposal and detailed explanation. I am more inclined to just remove zero-width characters when copying the text. I think this is the best solution since user will copy what they see.
Can you give some detailed example for this point you made |
@alitoshmatov The problem with |
@shubham1206agra I agree, and I think we should avoid modifying that logic |
@alitoshmatov It's usually used to mark word breaks in languages without visible space between words like Japanese, Thai. Also it can be used by engineering teams like ours which need to discuss usage of the invisible characters, amongst other use cases. This may sound niche, but our aim is to be a very popular workspace messaging tool so I think we should be inclusive and not prevent users from such use case. I tried Slack and WhatsApp and they also keep the text as is without modifying it like removing the zero width character. |
@tienifr I see your point, I do agree that we shouldn't remove zero-width characters when user copies it. But in our case user is not aware that zero-width character exists in email and I think this is a problem. |
I think this issue is very rare and it is not urgent. I think we benefit if we wait for some more proposals. |
Real users won't bother to put zero-width space to their message for each Thai/Japanese word. Even if someone does, when they copy a Thai/Japanese message, will they expect the message already contain zero-width space between words? I think no. I tried Slack and it even clears immediately the zero-width space when pasting. Screen.Recording.2024-01-17.at.15.30.19.mov(notice the send button blinking) |
@bernhardoj they don't "put" it, it might just be how their language works and their language-based applications work.
@bernhardoj please try the zero-width space between words, like this one |
@alitoshmatov how about we always render the email that has As far as I can see we currently have that with emails in a few places so that can work. Do you think it's better? |
Ok, this one works
I tried copying several Japanese articles and none of them contain zero width space. |
@tienifr That sounds like viable option. Let me do some research |
📣 It's been a week! Do we have any satisfactory proposals yet? Do we need to adjust the bounty for this issue? 💸 |
@alitoshmatov how do @tienifr 's updates look to you? |
Nice! @tienifr 's proposal looks great.
I think our goal here should if we changed A to B we should also reverse it to A at the end. Not less not more. I think we can start working on PR if internal engineer approves our approach. |
Triggered auto assignment to @francoisl, see https://stackoverflow.com/c/expensify/questions/7972 for more details. |
📣 @alitoshmatov 🎉 An offer has been automatically sent to your Upwork account for the Reviewer role 🎉 Thanks for contributing to the Expensify app! |
📣 @tienifr 🎉 An offer has been automatically sent to your Upwork account for the Contributor role 🎉 Thanks for contributing to the Expensify app! Offer link |
PR ready for review #35557. |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.4.37-7 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 2024-02-14. 🎊 For reference, here are some details about the assignees on this issue:
|
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:
|
Paid and contracts ended! Bump on the BZs steps @alitoshmatov 🙇 |
|
Thanks @alitoshmatov |
If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!
Version Number: 1.4.24-7
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
Expensify/Expensify Issue URL:
Issue reported by: Applause - Internal Team
Slack conversation:
Action Performed:
Precondition:
Expected Result:
No validation error will be thrown as the email copied is a valid email.
Actual Result:
The email is a valid email but validation error shows up in the login field.
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
Add any screenshot/video evidence
Bug6340063_1705059929889.bandicam_2024-01-11_10-09-45-385.mp4
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: