You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[HOLD for payment 2023-05-16] [$1000] Adding spaces after workspace names causes a temporary loss of name position #18006
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Adding spaces after workspace names, the name must remain in the same position
Actual Result:
Adding spaces after workspace names causes a temporary loss of name position
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?
Android / native
Android / Chrome
iOS / native
iOS / Safari
MacOS / Chrome / Safari
MacOS / Desktop
Version Number: Reproducible in staging?: Needs reproduction Reproducible in production?: Needs reproduction 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
So during Save it will show optimistic data that consist workspace name with space, and once api call finish it shows data from onyx that consist workspace name trimmed. So this is the root cause of the problem.
What changes do you think we should make in order to solve the problem?
We have to trim workspace name within submit() function while calling Policy.updateGeneralSettings() as shown below. It will solve the issue as shown in Results video.
What alternative solutions did you explore? (Optional)
We can trim workspace name while showing within ui, but this is not good idea. It will not solve the root cause of the issue. Also while we display info within ui we do not trim anywhere in the app. So this is not a good solution. So I will not suggest it.
changed the title [-]Adding spaces after workspace names causes a temporary loss of name position[/-][+][$1000] Adding spaces after workspace names causes a temporary loss of name position[/+]on Apr 26, 2023
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: Not sure an additional discussion is needed, this is a simple visual bug, this should have been caught during the review
Determine if we should create a regression test for this bug. Is it easy to test for this bug? Yes
Is the bug related to an important user flow? No
Is it an impactful bug? No
This is an edge case not that many users will encounter in addition to having a very low impact. I don't think a regression test is necessary here
@PrashantMangukiya@eVoloshchak It looks like Upwork just had a short downtime and your two offers didn't actually go through. I'll have to just sent you a new payment and I'll reference this GH number
Awaiting PaymentAuto-added when associated PR is deployed to productionBugSomething is broken. Auto assigns a BugZero manager.DailyKSv2ExternalAdded to denote the issue can be worked on by a contributor
Activity
MelvinBot commentedon Apr 26, 2023
Triggered auto assignment to @abekkala (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details.MelvinBot commentedon Apr 26, 2023
Bug0 Triage Checklist (Main S/O)
Platformsin OP are ✅)PrashantMangukiya commentedon Apr 26, 2023
Proposal
Posting proposal early as per new guidelines
Please re-state the problem that we are trying to solve in this issue.
When add some spaces during workspace name save, it will show workspace name at different position for few moment.
What is the root cause of that problem?
When we add space within workspace name and Save, It will call
submit()function here.App/src/pages/workspace/WorkspaceSettingsPage.js
Lines 62 to 70 in f3fae40
We can see at line 67 it is calling
Policy.updateGeneralSettings()withvalues.namewithout trim.So
Policy.updateGeneralSettings()api will set workspace name withinoptimisticDataas shown in line 416App/src/libs/actions/Policy.js
Line 416 in f3fae40
So during Save it will show optimistic data that consist workspace name with space, and once api call finish it shows data from onyx that consist workspace name trimmed. So this is the root cause of the problem.
What changes do you think we should make in order to solve the problem?
We have to trim workspace name within
submit()function while callingPolicy.updateGeneralSettings()as shown below. It will solve the issue as shown in Results video.What alternative solutions did you explore? (Optional)
We can trim workspace name while showing within ui, but this is not good idea. It will not solve the root cause of the issue. Also while we display info within ui we do not trim anywhere in the app. So this is not a good solution. So I will not suggest it.
Results
18006.-Workspace.mov
[-]Adding spaces after workspace names causes a temporary loss of name position[/-][+][$1000] Adding spaces after workspace names causes a temporary loss of name position[/+]MelvinBot commentedon Apr 26, 2023
Job added to Upwork: https://www.upwork.com/jobs/~01b8861e605da12033
MelvinBot commentedon Apr 26, 2023
Triggered auto assignment to @kadiealexander (
External), see https://stackoverflow.com/c/expensify/questions/8582 for more details.MelvinBot commentedon Apr 26, 2023
Triggered auto assignment to Contributor-plus team member for initial proposal review - @eVoloshchak (
External)34 remaining items
abekkala commentedon May 16, 2023
Sounds good @eVoloshchak if you want to get the checklist done today I can go from there!
abekkala commentedon May 17, 2023
@eVoloshchak can you work on the checklist above?
PrashantMangukiya commentedon May 18, 2023
@abekkala Ping for Upwork.
abekkala commentedon May 22, 2023
@eVoloshchak I need the checklist completed above before payments can be made.
@PrashantMangukiya the checklist needs to be done prior to payment.
eVoloshchak commentedon May 23, 2023
The PR that introduced the bug has been identified. Link to the PR: Add workspace name validation in App #13978
The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake. Link to comment: https://github.com/Expensify/App/pull/13978/files#r1202706937
A discussion in #expensify-bugs has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner. Link to discussion: Not sure an additional discussion is needed, this is a simple visual bug, this should have been caught during the review
Determine if we should create a regression test for this bug.
Is it easy to test for this bug? Yes
Is the bug related to an important user flow? No
Is it an impactful bug? No
This is an edge case not that many users will encounter in addition to having a very low impact. I don't think a regression test is necessary here
abekkala commentedon May 23, 2023
Offers have been sent!
ayazhussain79 commentedon May 23, 2023
@abekkala Offer accepted
PrashantMangukiya commentedon May 23, 2023
@abekkala It show me offer not available. Can you please send me offer again.

abekkala commentedon May 23, 2023
@PrashantMangukiya @eVoloshchak It looks like Upwork just had a short downtime and your two offers didn't actually go through. I'll have to just sent you a new payment and I'll reference this GH number
PrashantMangukiya commentedon May 23, 2023
@abekkala Offer accepted.
abekkala commentedon May 23, 2023
@ayazhussain79 and @PrashantMangukiya payment has been made and contract ended. Thank you! 🎉
abekkala commentedon May 24, 2023
@eVoloshchak payment has been made and contracted ended. Thank you! 🎉
Closing!