Skip to content

[PAID][$250] Categories -Empty state does not display introduction text right after deleting all categories #46238

Closed

Description

@lanitochka17

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.12-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
Issue reported by: Applause - Internal Team

Action Performed:

Precondition:

  • Network should be slow
  1. Go to staging.new.expensify.com
  2. Go to workspace settings
  3. Go to Categories
  4. Delete all the categories
  5. Note that the empty state does not show the introduction text after deleting all the categories
  6. Go to Troubleshoot > Clear cache and restart > Reset and restart
  7. Return to workspace settings > Categories
  8. Now the empty state shows the introduction text

Expected Result:

In Step 5, the empty state will display the introduction text right after deleting all the categories

Actual Result:

In Step 5, the empty state does not display the introduction text right after deleting all the categories
It only displays after the categories are really deleted or clearing cache and restarting app

Platforms:

Which of our officially supported platforms is this issue occurring on?

  • Android: Native
  • Android: mWeb Chrome
  • iOS: Native
  • iOS: mWeb Safari
  • MacOS: Chrome / Safari
  • MacOS: Desktop

Screenshots/Videos

Add any screenshot/video evidence

Bug6552800_1721920083972.ScreenRecording_07-25-2024_23-02-45_1.mp4

View all open jobs on GitHub

Upwork Automation - Do Not Edit
  • Upwork Job URL: https://www.upwork.com/jobs/~01a227da0825fc4b73
  • Upwork Job ID: 1818264117366582298
  • Last Price Increase: 2024-07-30
  • Automatic offers:
    • nkdengineer | Contributor | 103402129
Issue OwnerCurrent Issue Owner: @sobitneupane

Activity

  1. added
    Daily
    Bug
    on Jul 25, 2024
  2. melvin-bot commented on Jul 25, 2024

    @melvin-bot

    Triggered auto assignment to @sonialiap (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.

  3. lanitochka17 commented on Jul 25, 2024

    @lanitochka17
    Author

    @sonialiap FYI I haven't added the External label as I wasn't 100% sure about this issue. Please take a look and add the label if you agree it's a bug and can be handled by external contributors

  4. FitseTLT commented on Jul 25, 2024

    @FitseTLT
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    Categories -Empty state does not display introduction text right after deleting all categories

    What is the root cause of that problem?

    We are displaying the text if the categoryList length is zero but when we delete categories only pendingAction is set to delete

    {(!shouldUseNarrowLayout || categoryList.length === 0 || isLoading) && getHeaderText()}
    {isLoading && (

    What changes do you think we should make in order to solve the problem?

    In the case of workspace tag and field page this issue doesn't occur because the data is emptied when we delelte all the lists but only for category case the pendingAction is set to delete instead of deleting the list, therefore this bug occurs and so:

    We should change it to

                    {(!shouldUseNarrowLayout || !hasVisibleCategories || isLoading) && getHeaderText()}
    
    

    What alternative solutions did you explore? (Optional)

    We might need to create a new variable by taking out isOffline variable in the definition of hasVisibleCategories here

    const hasVisibleCategories = categoryList.some((category) => category.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || isOffline);

    Alternatively We can also use both conditions like

                    {(!shouldUseNarrowLayout || !hasVisibleCategories ||categoryList.length === 0 || isLoading) && getHeaderText()}
    
    
  5. nkdengineer commented on Jul 26, 2024

    @nkdengineer
    Contributor

    Proposal

    Please re-state the problem that we are trying to solve in this issue.

    In Step 5, the empty state does not display the introduction text right after deleting all the categories
    It only displays after the categories are really deleted or clearing cache and restarting app

    What is the root cause of that problem?

    We're displaying the introduction text on the small screen if there is no category in the list. But when we delete the category we only update pendingAction to delete in optimistic data. So the introduction text is not displayed immediately after we delete all categories

    {(!shouldUseNarrowLayout || categoryList.length === 0 || isLoading) && getHeaderText()}

    This bug also happens on the tag page and report field page since we use the same condition.

    {(!shouldUseNarrowLayout || tagList.length === 0 || isLoading) && getHeaderText()}

    {(!isSmallScreenWidth || reportFieldsSections[0].data.length === 0 || isLoading) && getHeaderText()}

    What changes do you think we should make in order to solve the problem?

    We should replace this conditioncategoryList.length === 0 with !hasVisibleCategories that already checked the categories have pending action is delete

    {(!shouldUseNarrowLayout || !hasVisibleCategories || isLoading) && getHeaderText()} 
    

    {(!shouldUseNarrowLayout || categoryList.length === 0 || isLoading) && getHeaderText()}

    And we need to do the same for the tag page

    {(!shouldUseNarrowLayout || !hasVisibleTag || isLoading) && getHeaderText()} 
    

    {(!shouldUseNarrowLayout || tagList.length === 0 || isLoading) && getHeaderText()}

    and report field page

    const hasVisibleReportField = Object.values(filteredPolicyFieldList).some((reportField) => reportField.pendingAction !== CONST.RED_BRICK_ROAD_PENDING_ACTION.DELETE || isOffline);
    {(!isSmallScreenWidth || !hasVisibleReportField || isLoading) && getHeaderText()}
    

    {(!isSmallScreenWidth || reportFieldsSections[0].data.length === 0 || isLoading) && getHeaderText()}

    What alternative solutions did you explore? (Optional)

  6. nkdengineer commented on Jul 26, 2024

    @nkdengineer
    Contributor

    Proposal updated

    • Add a similar bug on the report field page
  7. melvin-bot commented on Jul 29, 2024

    @melvin-bot

    @sonialiap Whoops! This issue is 2 days overdue. Let's get this updated quick!

  8. added
    External
    on Jul 30, 2024
  9. melvin-bot commented on Jul 30, 2024

    @melvin-bot
  10. changed the title [-]Categories -Empty state does not display introduction text right after deleting all categories[/-] [+][$250] Categories -Empty state does not display introduction text right after deleting all categories[/+] on Jul 30, 2024
  11. added
    Help Wanted
    on Jul 30, 2024
  12. melvin-bot commented on Jul 30, 2024

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @sobitneupane (External)

  13. 25 remaining items

  14. melvin-bot commented on Aug 16, 2024

    @melvin-bot

    Triggered auto assignment to @strepanier03 (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.

  15. added
    Daily
    and removed
    Weekly
    on Aug 16, 2024
  16. sonialiap commented on Aug 16, 2024

    @sonialiap
    Contributor

    @strepanier03 I'm OOO Aug 19-30, adding leave buddy.
    Status: waiting for build

  17. changed the title [-][$250] Categories -Empty state does not display introduction text right after deleting all categories[/-] [+] [HOLD for Payment 2024-08-22][$250] Categories -Empty state does not display introduction text right after deleting all categories[/+] on Aug 19, 2024
  18. added
    Awaiting Payment
    on Aug 19, 2024
  19. changed the title [-] [HOLD for Payment 2024-08-22][$250] Categories -Empty state does not display introduction text right after deleting all categories[/-] [+] [PAID][$250] Categories -Empty state does not display introduction text right after deleting all categories[/+] on Aug 22, 2024
  20. strepanier03 commented on Aug 22, 2024

    @strepanier03
    Contributor

    Contract paid and closed.

  21. sobitneupane commented on Aug 23, 2024

    @sobitneupane
    Contributor

    @strepanier03 I will need payment summary to request payment in newDot.

  22. sobitneupane commented on Sep 2, 2024

    @sobitneupane
    Contributor
  23. sobitneupane commented on Oct 21, 2024

    @sobitneupane
    Contributor

    @strepanier03 @sonialiap I will need payment summary to request payment in newDot.

  24. sonialiap commented on Oct 23, 2024

    @sonialiap
    Contributor

    Payment summary:

  25. garrettmknight commented on Dec 12, 2024

    @garrettmknight
    Contributor

    $250 approved for @sobitneupane

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Awaiting PaymentBugDailyExternalReviewing

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions