-
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 2023-04-10] [HOLD for payment 2023-03-31] [$1000] Display name with white spaces are not removed #15438
Comments
Triggered auto assignment to @sonialiap ( |
Bug0 Triage Checklist (Main S/O)
|
Triggered auto assignment to @alex-mechler ( |
Since this doesn't happen for web / olddot, its something on the front end. Marking as external |
Current assignee @sonialiap is eligible for the External assigner, not assigning anyone new. |
Triggered auto assignment to Contributor-plus team member for initial proposal review - @Santhosh-Sellavel ( |
Current assignee @alex-mechler is eligible for the External assigner, not assigning anyone new. |
ProposalPlease re-state the problem that we are trying to solve in this issue.Extra spaces inside display name show up on native platforms. What is the root cause of that problem?At the point where we're saving the name in our frontend, currently we are using values.firstName.trim(). The simple trim function only works on removing the spaces at the start or end of a string. We need to use regex here such that it removes all the whitespaces except one, between words. What changes do you think we should make in order to solve the problem?We should trim the name properly here.
If we want to just use regex and discard trim function, something like this should work:
What alternative solutions did you explore? (Optional)We can also block the user from proceeding by showing him an error. This would probably be an overkill. Silently trimming the name works best I guess. We can do the same from line breaks as well but since this is a single line input, I don't think that is required. |
How can you elaborate? @allroundexperts |
@Santhosh-Sellavel At the point where we're saving the name in our frontend, currently we are using |
ProposalPlease re-state the problem that we are trying to solve in this issue.The whitespace collapsing behavior in display name is inconsistent across web and Android/iOS. First I want to clarify the expected behavior of this issue. I believe we should show the display name as is rather than removing the white spaces in between. This aligns with the behaviors of popular apps like Slack, WhatsApp. They also do not apply "smart" modification to the user's name. We already have consensus on not applying "smart" modification to the user (message) input here so I think we can apply the same for display name as well. What is the root cause of that problem?The root cause is in the components to render the display name like here
white-space: no-wrap from parent components, so in the Web it will collapse the consequent whitespaces into 1 whitespace.
What changes do you think we should make in order to solve the problem?To fix this, we need to apply Line 253 in bc4fa2b
What alternative solutions did you explore? (Optional)If we want the display to align with web then we can add logic to make |
This behaviour isn't consistent with Slack app as well. At some places, it shows the display name like @tienifr has posted. But at other places, it trims the extra whitespaces. I've attached the screenshots. When the profile is opened by clicking your name on the top, then again it is trimming the whitespaces. On mobile though, slack shows with whitespaces everywhere. The behaviour seems to be different on desktop and web version of Slack. I don't think that we can compare this with WhatsApp because the former allows almost any character to be used in display name eg ~~~!a is a valid name in WhatsApp. On Slack, using any special character in display name results in an error. If we decide to remove the extra whitespaces, then using |
ProposalPlease re-state the problem that we are trying to solve in this issue.On web, multiple white spaces are replaced by one. What is the root cause of that problem?This is a bug in RNW where it applies style What changes do you think we should make in order to solve the problem?Instead of What alternative solutions did you explore? (Optional)
|
As of now, we can clearly see the bug is on the web which doesn't show the space which should be there. @alex-mechler I'm unsure what's the expected behavior here. Let me know your thoughts here. |
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.88-2 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-03-31. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External 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:
|
@alex-mechler please have a look at this when you have time. |
@alex-mechler Checklist here #15438 (comment) doesn't makes sense
This PR Linked is the PR for this BUG. The actual Bug here is not caused by any PR it was something upstream. |
Oh whoops, was filling out the BZ checklist and moving a bit too fast. Thanks for the ping. Will fix it up |
|
The solution for this issue has been 🚀 deployed to production 🚀 in version 1.2.93-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-04-10. 🎊 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.
As a reminder, here are the bonuses/penalties that should be applied for any External issue:
|
This comment was marked as duplicate.
This comment was marked as duplicate.
BZ checklist was here #15438 (comment), that one is probably from one of the regressions |
@sonialiap Can you finish off the BZ checklist here, and make sure this was paid out? #15438 (comment) |
My apologies for the delay in payment! I was out of office. On it now @daraksha-dk offer sent for reporting the issue - paid |
@sonialiap Sorry but I'm unable to find any offer for this issue on Upwork. Can you please re-check. Thanks! |
@sonialiap Is this all paid out? |
@daraksha-dk offer re-sent This is your profile, correct? |
@sonialiap yes, it's mine and I've accepted the offer now. Thank you. |
@daraksha-dk paid ✔️ |
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:
Daraksha Test.
)Expected Result:
The whitespaces between 2 words should be displayed on Web
Actual Result:
On Web the extra spaces are removed. On Android and iOS apps the extra spaces remain.
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Version Number: 1.2.76-3
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:
Expensify/Expensify Issue URL:
Issue reported by: @daraksha-dk
Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1677157852205049
View all open jobs on GitHub
Upwork Automation - Do Not Edit
The text was updated successfully, but these errors were encountered: