Closed m-natarajan closed 1 month ago
Triggered auto assignment to @VictoriaExpensify (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.
I reported this issue If necessary, I can help in reviewing proposals
after opening the workspace categories, an empty state (You haven't created any categories) is displayed instead of a loading state
policyCategories_
data is not available and API OpenPolicyCategoriesPage
is still calling, so the policyCategories_
:
https://github.com/Expensify/App/blob/2026f62b5074d892163f837ca7b030b84c8e350f/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx#L60
is undefined
initially.isLoading
:
https://github.com/Expensify/App/blob/2026f62b5074d892163f837ca7b030b84c8e350f/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx#L257
is false
and shouldShowEmptyState
:
https://github.com/Expensify/App/blob/2026f62b5074d892163f837ca7b030b84c8e350f/src/pages/workspace/categories/WorkspaceCategoriesPage.tsx#L259
is true
const isLoading = !isOffline && (policyCategories === null || policyCategories === undefined);
const shouldShowEmptyState = policyCategories !== undefined && !categoryList.some((category) => category.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE) && !isLoading;
or
OpenPolicyCategoriesPage
, we optimistically set the isLoadingCategories
to true
(We can store that value to policy_
or policyCategories_
).const isLoading = !isOffline && (policyCategories === null || isLoadingCategories);
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: 9.0.1-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: Email or phone of affected tester (no customers): Logs: https://stackoverflow.com/c/expensify/questions/4856 Expensify/Expensify Issue URL: Issue reported by: @ZhenjaHorbach Slack conversation: https://expensify.slack.com/archives/C049HHMV9SM/p1718993745779499
Action Performed:
Expected Result:
List of categories appear
Actual Result:
after opening the workspace categories, an empty state (You haven't created any categories) is displayed instead of a loading state
Workaround:
unknown
Platforms:
Which of our officially supported platforms is this issue occurring on?
Screenshots/Videos
https://github.com/Expensify/App/assets/38435837/8c7859e7-58e4-483e-b2df-8c8b3e174b3b
https://github.com/Expensify/App/assets/38435837/2adfb2c8-f35d-4ddb-92f4-0f7ca749ab08
View all open jobs on GitHub
Upwork Automation - Do Not Edit
Issue Owner
Current Issue Owner: @VictoriaExpensify