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 2024-06-13] [$250] Tags - When deleting all tags, blank UI is shown #42220
Version Number: 1.4.74-0 Reproducible in staging?: Y Reproducible in production?: Y If this was caught during regression testing, add the test name, ID and link from TestRail: N/A Email or phone of affected tester (no customers):applausetester+emilio@applause.expensifail.com Issue reported by: Applause - Internal Team
Action Performed:
Open the New Expensify App
Sign into a valid account
Click on WS > More features > Enable Tags (Notice that there will be an UI there since you have no tags yet)
Create any tag then delete this tag
Expected Result:
User expects the initial "No Tag" UI to show up again and immediately
Actual Result:
No UI is shown, just a blank space. Even after exiting and returning or refreshing
Workaround:
Unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
When we delete the tags, the tags are still present in the tagList array with having a pending action delete. This causes the empty UI component to not show.
What changes do you think we should make in order to solve the problem?
We need to update the condition of showing the Empty UI to consider the case if all the element in the tagList have pendingAction as delete, if true then we need to show the empty UI component.
We can reuse the same logic from categories:
What changes do you think we should make in order to solve the problem?
We need to first check for !tagList.some((tag) => tag.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE), this will check if we have any tag list item with pending action not equal to DELETE and then we also need to check !(tagList.every((tag) => tag.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) && isOffline), this will check if all the list options has pending action of DELETE and isOffline is true, we need to add this check because in offline mode we want to show the deleted options instead of WorkspaceEmptyStateSection. We also need to check other policy pages and update that. Categories page condition also needs to be updated.
Activity
lanitochka17 commentedon May 15, 2024
We think that this bug might be related to #wave-collect - Release 1
melvin-bot commentedon May 15, 2024
Triggered auto assignment to @JmillsExpensify (
Bug), see https://stackoverflow.com/c/expensify/questions/14418 for more details. Please add this bug to a GH project, as outlined in the SO.allgandalf commentedon May 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Empty state UI is not shown when we delete tags and the action is still in optimistic state
What is the root cause of that problem?
We check for the length of the
tagListand if it is zero then we display the empty UI componentApp/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 325 to 331 in ac2b3a0
When we delete the tags, the tags are still present in the
tagListarray with having a pending actiondelete. This causes the empty UI component to not show.What changes do you think we should make in order to solve the problem?
We need to update the condition of showing the Empty UI to consider the case if all the element in the
tagListhavependingActionas delete, if true then we need to show the empty UI component.We can reuse the same logic from
categories:App/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx
Line 244 in ac2b3a0
So we can introduce a new variable similar to
categorieswhich isshouldShowEmptyState:Then update the condition at 1) empty UI state:
App/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 325 to 326 in ac2b3a0
To:
And 2) Tag list component:
App/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 332 to 333 in ac2b3a0
To:
Result Video
Screen.Recording.2024-05-16.at.2.40.55.AM.mov
Krishna2323 commentedon May 15, 2024
Proposal
Please re-state the problem that we are trying to solve in this issue.
Tags - When deleting all tags, blank UI is shown
What is the root cause of that problem?
The condition for showing empty
WorkspaceEmptyStateSectionisn't correct, we need to check for pending action also.App/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 325 to 326 in e35ab02
App/src/pages/workspace/tags/WorkspaceTagsPage.tsx
Lines 332 to 333 in e35ab02
What changes do you think we should make in order to solve the problem?
We need to first check for
!tagList.some((tag) => tag.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE), this will check if we have any tag list item with pending action not equal toDELETEand then we also need to check!(tagList.every((tag) => tag.pendingAction === CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) && isOffline), this will check if all the list options has pending action ofDELETEandisOfflineis true, we need to add this check because in offline mode we want to show the deleted options instead ofWorkspaceEmptyStateSection. We also need to check other policy pages and update that. Categories page condition also needs to be updated.What alternative solutions did you explore? (Optional)
melvin-bot commentedon May 21, 2024
@JmillsExpensify Huh... This is 4 days overdue. Who can take care of this?
[-]Tags - When deleting all tags, blank UI is shown[/-][+][$250] Tags - When deleting all tags, blank UI is shown[/+]melvin-bot commentedon May 22, 2024
Job added to Upwork: https://www.upwork.com/jobs/~015255d5c42b2d8ce7
JmillsExpensify commentedon May 22, 2024
Opening this up to the community.
39 remaining items
melvin-bot commentedon Jun 17, 2024
@JmillsExpensify, @Beamanator, @allroundexperts, @tienifr Eep! 4 days overdue now. Issues have feelings too...
Beamanator commentedon Jun 18, 2024
@JmillsExpensify looks like we're ready for payment here 🙏
JmillsExpensify commentedon Jun 19, 2024
Payment summary:
JmillsExpensify commentedon Jun 19, 2024
Contributor paid out. C+ needs to fill out the checklist and is paid via New Expensify, so I'll circle back on this issue for payment approval.
allroundexperts commentedon Jun 23, 2024
Checklist
JmillsExpensify commentedon Jul 20, 2024
@mallenexpensify can you confirm the payment summary above?
mallenexpensify commentedon Jul 22, 2024
Contributor: @tienifr due $250 via NewDot
Contributor+: @allroundexperts due $250 via NewDot
TestRail Gh https://github.com/Expensify/Expensify/issues/414355
JmillsExpensify commentedon Jul 22, 2024
$250 approved for @allroundexperts. @tienifr don't forget to submit via New Expensify.
melvin-bot commentedon Jul 26, 2024
@JmillsExpensify, @Beamanator, @allroundexperts, @tienifr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!