Skip to content

[WOOMOB-3477] Migrate Dashboard header and Customize action#16261

Open
hichamboushaba wants to merge 2 commits into
issue/woomob-3477-dashboard-design-systemfrom
issue/woomob-3477-app-bar-customize
Open

[WOOMOB-3477] Migrate Dashboard header and Customize action#16261
hichamboushaba wants to merge 2 commits into
issue/woomob-3477-dashboard-design-systemfrom
issue/woomob-3477-app-bar-customize

Conversation

@hichamboushaba

@hichamboushaba hichamboushaba commented Jul 14, 2026

Copy link
Copy Markdown
Member

Description

Part of WOOMOB-3477

Note

This is the second part of WOOMOB-3477 and does not close the ticket. A follow-up PR will migrate the full Dashboard screen to Compose and close the ticket.

This is a stacked PR targeting issue/woomob-3477-dashboard-design-system. It depends on #16248 and should remain a draft until the parent PR lands.

Note

When JITM is hidden, its existing XML host still reserves 8dp between the page header and Dashboard content. This pre-existing View/Fragment spacing is intentionally deferred to the full-Compose follow-up, where spacing will be applied only when JITM displays visible banner content.

This follow-up completes the Dashboard shell migration by replacing the Activity-owned toolbar and menu with a Compose WooPageHeader. The header uses the current store name as its title, preserves the conditional Share Store action, collapses with Dashboard scrolling, and expands after reselecting My Store.

It also moves Customize below the complete dashboard grid, preserving the existing edit-widgets flow and analytics. When new sections are available, the button shows a design-system indicator and exposes a localized state description to TalkBack. The supporting tonal-button API keeps its existing default behavior while allowing this label to remain on one line.

The legacy Dashboard menu, toolbar badge, and expanded-toolbar wiring are removed. The parent PR already includes the Dashboard design-system release note, so this stack does not add a duplicate entry.

Test Steps

  1. Open My Store and verify the current store name appears in the expanded Compose page header without a duplicate Activity toolbar.
  2. Scroll the Dashboard and verify the page header collapses. Return to the top or reselect My Store and verify it expands again.
  3. For an eligible store, verify Share Store appears in both header states and opens the existing sharing flow.
  4. Scroll past every dashboard section and verify Customize appears after the complete grid.
  5. Tap Customize, verify the widget editor opens, then navigate back without changing the configuration.
  6. If new dashboard sections are available, verify the indicator appears and TalkBack announces “New dashboard sections available.”
  7. Verify pull-to-refresh activates after the Dashboard content and header have returned to the top.
  8. Repeat the expanded/collapsed header and Customize checks in light and dark themes. On a wide device, verify Customize remains below both dashboard columns.

Images/gif

Header state Light Dark
Expanded Expanded Dashboard page header in light theme Expanded Dashboard page header in dark theme
Collapsed Collapsed Dashboard page header in light theme Collapsed Dashboard page header in dark theme
  • I have considered if this change warrants release notes and have added them to RELEASE-NOTES.txt if necessary. Use the "[Internal]" label for non-user-facing changes.

@hichamboushaba hichamboushaba added type: task An internally driven task. feature: dashboard Related to home screen project category: design Layout and style elements in the UI or user interface, including color and animations. category: accessibility Related to accessibility. status: do not merge Dependent on another PR, ready for review but not ready for merge. labels Jul 14, 2026
@hichamboushaba hichamboushaba added this to the 25.3 milestone Jul 14, 2026
@dangermattic

dangermattic commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator
1 Error
🚫 This PR is tagged with status: do not merge label(s).
1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot

wpmobilebot commented Jul 14, 2026

Copy link
Copy Markdown
Collaborator

App Icon📲 You can test the changes from this Pull Request in WooCommerce Android by scanning the QR code below to install the corresponding build.

App NameWooCommerce Android
Platform📱 Mobile
FlavorJalapeno
Build TypeDebug
Build Number772
Version25.2-rc-1
Application IDcom.woocommerce.android.prealpha
Commitb2d4976
Installation URL27gj69mcne7qg
Automatticians: You can use our internal self-serve MC tool to give yourself access to those builds if needed.

@codecov-commenter

codecov-commenter commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 8.78378% with 135 lines in your changes missing coverage. Please review.
✅ Project coverage is 40.89%. Comparing base (6a818ed) to head (b1a6551).

Files with missing lines Patch % Lines
...ommerce/android/ui/dashboard/DashboardContainer.kt 0.00% 112 Missing ⚠️
...oid/ui/compose/designsystem/component/WooButton.kt 0.00% 13 Missing ⚠️
...ndroid/ui/dashboard/DashboardHeaderScrollBridge.kt 56.52% 7 Missing and 3 partials ⚠️
Additional details and impacted files
@@                               Coverage Diff                               @@
##             issue/woomob-3477-dashboard-design-system   #16261      +/-   ##
===============================================================================
- Coverage                                        40.91%   40.89%   -0.03%     
- Complexity                                       13503    13512       +9     
===============================================================================
  Files                                             2508     2509       +1     
  Lines                                           147397   147511     +114     
  Branches                                         21972    21997      +25     
===============================================================================
+ Hits                                             60311    60324      +13     
- Misses                                           80980    81078      +98     
- Partials                                          6106     6109       +3     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@hichamboushaba hichamboushaba force-pushed the issue/woomob-3477-dashboard-design-system branch 2 times, most recently from 5d0e6cd to 6a818ed Compare July 15, 2026 15:06
@hichamboushaba hichamboushaba force-pushed the issue/woomob-3477-app-bar-customize branch from aae527f to b1a6551 Compare July 15, 2026 19:45
@hichamboushaba hichamboushaba marked this pull request as ready for review July 15, 2026 22:21

@claude claude Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AI Code Review - No issues found. The changes look good.

This migrates the Dashboard header, Customize action, and Share Store action from the XML toolbar/menu into a collapsible Compose WooPageHeader, bridging scroll state across the two separate ComposeView roots via DashboardHeaderScrollBridge. A few things I verified:

  • Removing the getFragmentSubtitle() override is safe — BaseFragment provides a default returning "".
  • Deleting menu_dashboard_fragment.xml is safe: the only shared id (menu_share_store) still exists independently in menu_my_store_fragment.xml, and both menu actions are now handled in Compose.
  • The scroll bridge uses a global mutableStateOf, so the body ComposeView recomposes to pick up the header's nestedScrollConnection once the header attaches — no cross-root timing gap.
  • WooButton's new textMaxLines keeps the prior default (Int.MAX_VALUE, Clip, softWrap), so existing buttons are unaffected.
  • The "new sections" indicator dot uses Alignment.TopStart, which is layout-direction-aware, so RTL placement is handled correctly.
  • Good accessibility handling: the dot is hidden with clearAndSetSemantics, and the state is surfaced via stateDescription on the button. Unit tests cover the bridge's attach/detach and scroll ordering.

Automatic review · claude-opus-4-8 · Workflow run

How to reply to a finding

Reply on this review (or inline at the line the finding refers to) with one of:

  • @claude addressed - I made the change. Bot verifies against the next diff before marking resolved.
  • @claude rejected: <reason> - Will not fix; reason gets quoted on the next review.
  • @claude not-applicable - Finding does not apply (wrong file, already covered elsewhere, etc.).

The bot honours these on the next review pass.

@hichamboushaba hichamboushaba force-pushed the issue/woomob-3477-app-bar-customize branch from b1a6551 to b2d4976 Compare July 15, 2026 22:35
@hichamboushaba

Copy link
Copy Markdown
Member Author

@claude re-review

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

Labels

category: accessibility Related to accessibility. category: design Layout and style elements in the UI or user interface, including color and animations. feature: dashboard Related to home screen project status: do not merge Dependent on another PR, ready for review but not ready for merge. type: task An internally driven task.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants