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

Quick Start for Existing Users: Refactor Quick Start UI data source #18395

Merged
merged 10 commits into from
Apr 22, 2022

Conversation

hassaanelgarem
Copy link
Contributor

Part of #18388

Description

This PR doesn't introduce any visible changes. It refactors some of the logic behind how we display quick start tasks in both the quick start card and the expanded quick start view.

Testing Instructions

The following describes a general smoke test over Quick Start UI:

  1. Enable quick start for your site
  2. Make sure the two sets of tasks ("Customize your site" and "Grow your audience") are displayed correctly
  3. Go through a few tasks
  4. Make sure progress reflects normally
  5. Open up the expanded view modal for both sets of tasks and make sure the tasks and title are displayed correctly
  6. Finish tasks under one set
  7. Make sure it gets stroked through in the card
  8. Open the expanded view, make sure the view shows the "tasks complete" screen correctly.

Regression Notes

  1. Potential unintended areas of impact
    N/A

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

  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 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.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 19, 2022

You can test the changes in Jetpack from this Pull Request by:
  • Clicking here or scanning the QR code below
  • Then installing the build number pr18395-e8cb133 from App Center on your iPhone

The .ipa file can also be downloaded directly here.
If you need access to App Center, please ask a maintainer to add you.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented Apr 19, 2022

You can test the changes in WordPress from this Pull Request by:
  • Clicking here or scanning the QR code below
  • Then installing the build number pr18395-e8cb133 from App Center on your iPhone

The .ipa file can also be downloaded directly here.
If you need access to App Center, please ask a maintainer to add you.

Copy link
Contributor

@momo-ozawa momo-ozawa left a comment

Choose a reason for hiding this comment

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

Works as described! Left a couple of comments below.

case existingUser
}

struct QuickStartToursCollection {
Copy link
Contributor

Choose a reason for hiding this comment

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

I wonder if it would make more sense to define QuickStartToursCollection as a protocol. Wdyt?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@momo-ozawa If we do this we'll have to move some logic out of QuickStartToursCollection. Which is the logic of returning the collections based on the blog.
To do that, we would either:

  1. Move it to `QuickStartTourGuide. However, this class already has so many responsibilities!
  2. Create a new component, maybe QuickStartToursFactory or something like that.

Given this, let me know what you think. Personally, I'm fine with leaving QuickStartToursCollection as a struct or making it a protocol and adding a new component to handle the relevant logic. And I can't see a clear winner between the two approaches.

Copy link
Contributor

Choose a reason for hiding this comment

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

@hassaanelgarem Thanks for exploring some alternatives!

My preference would be for option 2 -- returning an array of QuickStartToursCollection inside the QuickStartToursCollection struct itself was tripping me up a bit.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@momo-ozawa Done in 74e3d54 👍

# Conflicts:
#	WordPress/Classes/ViewRelated/Blog/Blog Dashboard/Cards/Quick Start/QuickStartTourStateView.swift
#	WordPress/Classes/ViewRelated/Blog/QuickStartChecklistViewController.swift
#	WordPress/Classes/ViewRelated/Blog/QuickStartTourGuide.swift
And add `QuickStartFactory` to be responsible for returning collections
# Conflicts:
#	WordPress/WordPress.xcodeproj/project.pbxproj
Copy link
Contributor

@momo-ozawa momo-ozawa left a comment

Choose a reason for hiding this comment

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

LGTM! What do you think about adding an internal release note for the quick start refactor?

@hassaanelgarem
Copy link
Contributor Author

@momo-ozawa

What do you think about adding an internal release note for the quick start refactor?

Good idea! Added in e8cb133

@hassaanelgarem hassaanelgarem merged commit 8cc2db4 into trunk Apr 22, 2022
@hassaanelgarem hassaanelgarem deleted the task/18388-qs-create-tour branch April 22, 2022 03:05
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