Closed hafizrahman closed 2 weeks ago
📲 You can test the changes from this Pull Request in WooCommerce iOS by scanning the QR code below to install the corresponding build.
App Name | WooCommerce iOS | |
Build Number | pr12626-3fc44de | |
Version | 18.4 | |
Bundle ID | com.automattic.alpha.woocommerce | |
Commit | 3fc44de92ea04425d36e625f6aab9e671c124d6a | |
App Center Build | WooCommerce - Prototype Builds #8940 |
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.
1 Warning | |
---|---|
:warning: | View files have been modified, but no screenshot or video is included in the pull request. Consider adding some for clarity. |
Generated by :no_entry_sign: Danger
Description
The previous logic for handling Dashboard Card's availability and display states on the Dashboard and Dashboard Customize screens felt flaky and complicated to me. The main reason was because there's a lot of different states at play, such as:
For completeness's sake, here's the availability and visibility logic that the app has to handle:
What's in the PR:
This PR attempts to make the handling easier to reason with by:
DashboardCard
to include new variables and accompanying comments related to availability and display states.unavailableDashboardCards
separately anymore.updateDashboardCards()
to make updating cards and preserving setting easier to followgenerateDefaultCards()
to separate concern and make the update function smaller.Testing instructions
Analytics check
Blaze / Onboarding check
First, either start with a site that doesn't support Blaze, or change the line below in
DashboardViewModel
by hardcodingcanShowBlaze
to false:then,