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

My Site Dashboard: Add site picker to MySite screen only once #17814

Merged
merged 5 commits into from
Jan 27, 2022

Conversation

momo-ozawa
Copy link
Contributor

@momo-ozawa momo-ozawa commented Jan 25, 2022

Fixes #17813

Description

This PR fixes the following:

  • A bug where a site picker was getting added to the layout every time a user switched sites
  • A bug where the switching to the dashboard on the segmented control wasn't displaying the dashboard

How to test

Make sure the My Site Dash feature flag is enabled.

Site Picker should be added only once

  1. Log out
  2. Log in
  3. Select a blog on the Login Epilogue
  4. ✅ The site picker should show the blog you picked in the Login Epilogue
  5. Tap on the site picker and pick a different site
  6. ✅ The site picker should show the new blog to picked, and only one site picker should be visible
Simulator.Screen.Recording.-.iPhone.13.-.2022-01-25.at.19.26.24.mp4

Switching to the dashboard

  1. On the My Site screen, switch to the dashboard
  2. ✅ Dashboard should be displayed
  3. Select a different site on the Site Picker (the dashboard will not be updated -- updating will be handled in a different PR)
  4. Switch back to the site menu
  5. ✅ The site menu should reflect the new site you selected in step 3
Simulator.Screen.Recording.-.iPhone.13.-.2022-01-26.at.15.55.42.mp4

Regression Notes

  1. Potential unintended areas of impact
  • MSD flag enabled, site picker after login
  • MSD flag enabled, switching sites on the site picker
  1. What I did to test those areas of impact (or what existing automated tests I relied on)
  • Tested the above steps
  1. 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 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.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jan 25, 2022

You can trigger an installable build for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jan 25, 2022

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

Momo Ozawa added 4 commits January 26, 2022 15:27
This fixes a bug where a sitePicker was getting added to the layout every time a user switched sites.
If the MSD feature flag is enabled, the current blog should be the SitePickerVC's blog -- since the SitePickerVC is responsible for updating the currently selected blog.
Also, extracted the updateChildViewController method to handle updating whichever child vc is currently being shown.
@momo-ozawa momo-ozawa force-pushed the fix/msd-site-picker-duplication branch from cff3fb0 to 1b3ff59 Compare January 26, 2022 15:48
@momo-ozawa momo-ozawa marked this pull request as ready for review January 26, 2022 15:58
stackView.insertArrangedSubview(sitePickerViewController.view, at: 0)
sitePickerViewController.didMove(toParent: self)
}

private func setupSegmentedControl() {
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI: we shouldn't show the segmented control for self-hosted sites. Not sure if this is planned for a future task, but it might be good to add it as a subtask so we won't forget about it. :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Created an issue! #17825

@momo-ozawa momo-ozawa merged commit c1b3e6a into trunk Jan 27, 2022
@momo-ozawa momo-ozawa deleted the fix/msd-site-picker-duplication branch January 27, 2022 09:11
@leandroalonso leandroalonso modified the milestones: Someday, 19.6 Mar 30, 2022
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.

[MSD] Cell with site title is appended instead of replacing the previous one, when switching sites.
2 participants