Skip to content

Fix dashboard loading message state reset - #23254

Open
Manoj19636 wants to merge 1 commit into
wordpress-mobile:trunkfrom
Manoj19636:20411-dashboard-loading-message
Open

Fix dashboard loading message state reset#23254
Manoj19636 wants to merge 1 commit into
wordpress-mobile:trunkfrom
Manoj19636:20411-dashboard-loading-message

Conversation

@Manoj19636

Copy link
Copy Markdown

Description

Fixes #20411
Fixes an issue where the dashboard could incorrectly show the "No cards" message while clearing dashboard card states.

The PersonalizeCardViewModelSlice state is used to determine whether the dashboard should be displayed. Previously, the personalize card value was cleared after other card states, which could leave the dashboard in an incorrect intermediate state.

This change moves personalizeCardViewModelSlice.clearValue() to the beginning of clearValue() so all dependent card states are reset in the correct order.

Testing instructions

Test case title: Verify dashboard loading state reset

  1. Open the WordPress app.
  2. Navigate to the My Site dashboard.
  3. Refresh the dashboard or trigger a dashboard reload.
  4. Wait for the dashboard cards to finish loading.
  • Verify that the "No cards" message is not displayed incorrectly during loading.
  • Verify that dashboard cards appear normally after loading completes.

Test case title: Unit test verification

  1. Run:
    ./gradlew :WordPress:testWordPressDebugUnitTest --tests "*DashboardCardsViewModelSliceTest"
  • Verify that the test passes.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Dashboard flashes incorrect message when loading

1 participant