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

Sidebar: Global Navigation #23602

Merged
merged 18 commits into from
Sep 17, 2024
Merged

Sidebar: Global Navigation #23602

merged 18 commits into from
Sep 17, 2024

Conversation

kean
Copy link
Contributor

@kean kean commented Sep 16, 2024

This PR implements the remaining RootViewPresenter methods. It required a lot of small changes, so I split them into individual commits to make them easier to review but kept them in the same PR.

Changes:

  • b301788 removes currentViewController which was used only for blogging prompts. I recorded the test.
  • d408359 and d682342 removes MeScenePresenter and replaces it with a new showMeScreen method. It was used for the Spotlight search which I tested here.
  • 72d768a implements currentlySelectedScreen is used for analytics. I used the same names as the tab bar for now.
  • dca86e8 (refactor) removes readerNavigationController from ReaderCoordinator to make it stateless – it now simply calls the root presenter. The code to popViewController never worked because by the time it is reached, the coordinator is deallocated. Not sure why it was added there in the first place – simply showing a "post failed" message seems ok (video).
  • df6b060 removes readerTabViewController and replaces it with a standard switchToDiscover method. I recently made some changes in that area and tested it. It does work exactly as before (video).
  • 2f7c605 (refactor) further improves upon the previous changes by making ReaderCoordinator into a struct and removing it from RootViewPresenter – it's now just a bag of functions.
  • 95383c6 removes readerNavigationController from RootViewPresenter. Reader customization FF is disabled, so the change has no effect. But since my recent navigation bar appearance changes (their removal), it seems to work OK (video).
  • 56503d7 starts the work to remove mySitesCoordinator. It adds shared showJetpackOverlayForDisabledEntryPoint implementation that's just shown on top of the current root (video). It works on iPad too.
  • f72ebe4 change consolidates the site menu navigations in a single showBlogDetails(for:then:userInfo:) method. It's easy to test with universal links. These paths now work in any context: iPhone, iPad, iPad Split View.
  • f44b164 reworks showManagePlugins. The new flow users the exiting approach with userInfo (should prob be a new sections, but that's OK for now). It makes no sense for deep links to re-play the manual user navigation in the flow, so it opens "Manage" directly: iPhone, iPad. On iPad, site menu is not selected, but I'm not fixing it now.
  • 964c685 lifts showStats(...) from MySitesCoordinator to RootViewPresenter and implements it using the existing showBlogDetails(for:subsection:) API. In action: iPhone, iPad.
  • 2c7e357 removes showCreateSheet as a response for the blogging reminder notification. It was doing too much. The users know how to start a new post, so the app will simply open the blog from the notification for them.
  • d8b467d removes direct sharedPresenter.mySitesCoordinator.currentBlog calls. Known issue: not working correctly for the Split View mode, but I'll address it separately.
  • 4787627 finally removes mySitesCoordinator from RootViewPresenter 🥵

To test:

Follow the steps from the recordings added next to the changes.

Regression Notes

  1. Potential unintended areas of impact

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

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

PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • 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.

Testing checklist:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • 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)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@kean kean added the iPad label Sep 16, 2024
@kean kean added this to the 25.4 milestone Sep 16, 2024
@kean kean marked this pull request as draft September 16, 2024 12:25
@dangermattic
Copy link
Collaborator

dangermattic commented Sep 16, 2024

2 Warnings
⚠️ This PR is larger than 500 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.
⚠️ This PR is assigned to the milestone 25.4. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 🚫 Danger

@kean kean force-pushed the task/sidebar-global-navigation branch from b301788 to 337667d Compare September 16, 2024 12:27
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 16, 2024

WordPress Alpha📲 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23602-59f33ba
Version25.3
Bundle IDorg.wordpress.alpha
Commit59f33ba
App Center BuildWPiOS - One-Offs #10690
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Sep 16, 2024

Jetpack Alpha📲 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23602-59f33ba
Version25.3
Bundle IDcom.jetpack.alpha
Commit59f33ba
App Center Buildjetpack-installable-builds #9734
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@kean kean force-pushed the task/sidebar-global-navigation branch from dfe07d9 to df6b060 Compare September 16, 2024 15:00
@kean kean force-pushed the task/sidebar-global-navigation branch from f88bae1 to f44b164 Compare September 16, 2024 19:26
@kean kean marked this pull request as ready for review September 16, 2024 19:54
@@ -114,7 +114,7 @@ private func showSuccessNotice() {

private final class DebugMenuViewModel: ObservableObject {
var blog: Blog? {
RootViewCoordinator.sharedPresenter.mySitesCoordinator.currentBlog
RootViewCoordinator.sharedPresenter.currentlyVisibleBlog()
}
Copy link
Contributor

Choose a reason for hiding this comment

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

This blog is not used and can be deleted.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done. It used to be needed for Quick Start, but now it's gone.

@kean kean enabled auto-merge September 17, 2024 11:15
@kean kean added this pull request to the merge queue Sep 17, 2024
Merged via the queue into trunk with commit fb0a376 Sep 17, 2024
24 checks passed
@kean kean deleted the task/sidebar-global-navigation branch September 17, 2024 12:00
@kean kean mentioned this pull request Sep 17, 2024
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants