Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unified Dashboard: Refactoring Part 1 #19244

Conversation

zwarm
Copy link
Contributor

@zwarm zwarm commented Sep 22, 2023

Part of #19270

This PR starts refactoring for unified dashboard

  • Removes the initial screen from the app setting view (does not remove getting/setting helper methods from AppPrefsWrapper or AppPrefs - this will be done separately)
  • Renames MySiteTabFragment to MySiteMenuFragment
  • Renames my_site_tab_fragment to my_site_menu_fragment
  • Removes onCreateSiteResult

The Menu logic was extracted out into standalone classes with no reliance on source manager or mysiteviewmodel. The more tap will launch the new set of activities. The old classes were not removed and can be launched by removing the comment in MySiteFragment line 649.

  • Adds MenuActivity and MenuViewModel into the menu package under MySite
  • Enabled More tab to launch the MenuActivity instead of the MySiteMenuFragment

Notes

  • The compose pieces need some tidying up/styling.
  • Quick start does not function the new MenuActivity. Focus points will work, but unless the activeTask is known, the builder won't set the focus point.
  • Unit tests will come after if it is decided that we will continue with this approach

To test:

  • Install the app and login
  • Choose a site
  • Navigate to My Site > More
  • ✅ Verify the Menu view is displayed
  • ✅ Verify all navigation actions work as normal

Regression Notes

  1. Potential unintended areas of impact
    The more menu is not shown or working properly

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manual testing

  3. What automated tests I added (or what prevented me from doing so)
    N/A

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding accessibility improvements for my changes.
  • I have considered if this change warrants user-facing release notes and have added them to RELEASE-NOTES.txt if necessary.

UI Changes testing checklist:

  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@zwarm zwarm added this to the 23.4 milestone Sep 22, 2023
@zwarm zwarm requested a review from AjeshRPai September 22, 2023 21:58
@zwarm zwarm self-assigned this Sep 22, 2023
@zwarm zwarm changed the title Unified Dashboard: refactoring Unified Dashboard: Refactoring Part 1 Sep 22, 2023
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 22, 2023

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr19244-22d70df
Commit22d70df
Direct Downloadjetpack-prototype-build-pr19244-22d70df.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 22, 2023

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr19244-22d70df
Commit22d70df
Direct Downloadwordpress-prototype-build-pr19244-22d70df.apk
Note: Google Login is not supported on these builds.

@zwarm zwarm marked this pull request as ready for review September 25, 2023 13:11
Copy link
Contributor

@AjeshRPai AjeshRPai left a comment

Choose a reason for hiding this comment

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

Hey @zwarm
Way to go. This is a great start. I think we can build on the changes in this PR

The UI looks good to me overall. I did a smoke test of the app

  • Accessed all the menu items 🟢
  • Shortcuts of the of the app - Stats especially 🟢

I have ignored the issues with quick start in this PR as we can take up those in a seperate PR

)
Spacer(modifier = Modifier.height(4.dp))

// todo: eventually we can take uiStringRes out of the state, but for now it's shared, so leave it
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @zwarm
💡 AFAIK only plan item is using UiStringText and @ravishanker confirmed that we can safely remove plans feature from the app since they are planning a revamp for plans in site creation.
We can take up this change in a seperate PR but just letting you know.

}

@Composable
fun UnifiedMenuContent(uiState: MenuViewState) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Hey @zwarm
I think you missed removing the Unified keyword from the compose views, so I did it through the commit 22d70df. Hope thats ok

@AjeshRPai AjeshRPai merged commit e254632 into UI-Modernization-Remove-tabs-and-update-quick-links-layout Sep 26, 2023
@AjeshRPai AjeshRPai deleted the issue/unified-dashboard-refactoring branch September 26, 2023 06:55
@irfano irfano mentioned this pull request Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants