Skip to content

Local Weekly Roundup - #17066

Merged
diegoreymendez merged 27 commits into
developfrom
try/local-weekly-roundup
Sep 1, 2021
Merged

Local Weekly Roundup#17066
diegoreymendez merged 27 commits into
developfrom
try/local-weekly-roundup

Conversation

@diegoreymendez

@diegoreymendez diegoreymendez commented Aug 23, 2021

Copy link
Copy Markdown
Contributor

Implements the Weekly Roundup for iOS (with Local Notifications).

WPKit PR: wordpress-mobile/WordPressKit-iOS#438

Things to do in upcoming PRs:

  • Add configuration option to turn these notifications ON / OFF.

To test:

Test how the notifications look like and how they react to taps:

  1. Check the debug menu at Me > App Setting > Debug > Weekly Roundup
  2. Tap on schedule immediately (the other options can be used too but they don't guarantee a time of delivery). Keep in mind the static fallback / static notification is currently disabled so it will never show at this time.
  3. Background the App, and see that the notifications come up.
  4. Tap on any of them.

Test that the trigger time is right:

  1. Place a breakpoint at BackgroundTasksCoordinator.swift:149.
  2. Run the App.
  3. When the BP is hit, po nextDate and make sure it's next Monday at 10 am (device time).
  4. Try this also using another calendar locale.

Test tracking:

In your console, filter the messaged by "Tracked:".

  1. Check the debug menu at Me > App Setting > Debug > Weekly Roundup
  2. Tap "Schedule Immediately".
  3. You should see up to a maximum of 5 messages that look like this:

🔵 Tracked: notification_scheduled <notification_type: weekly_roundup, site_id: 105284648>

  1. Tap on one of the notifications, the App will open, and you should see a tracked notification like this:

🔵 Tracked: notification_tapped <notification_type: weekly_roundup, site_id: 105284648 >

Make sure you also see these events in the live analytics tool.

Regression Notes

  1. Potential unintended areas of impact

None.

  1. What I did to test those areas of impact (or what existing automated tests I relied on)
  2. 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.

@peril-wordpress-mobile

peril-wordpress-mobile Bot commented Aug 23, 2021

Copy link
Copy Markdown

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

@peril-wordpress-mobile

peril-wordpress-mobile Bot commented Aug 23, 2021

Copy link
Copy Markdown

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

Comment thread WordPress/Classes/System/WordPressAppDelegate.swift Outdated
Comment thread Podfile Outdated
@diegoreymendez
diegoreymendez requested a review from Gio2018 August 31, 2021 09:24
@diegoreymendez
diegoreymendez marked this pull request as ready for review August 31, 2021 09:24

@Gio2018 Gio2018 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Hey @diegoreymendez this worked good: Notification looked correct, tapping takes to the stats of the right site, nextDate looks correct and the tracks show correctly in both the console and the live view. I just left a few code comments that might be worth considering.

Comment on lines 237 to 245
// 21-Oct-2017: We are only handling background URLSessions initiated by the share extension so there
// is no need to inspect the identifier beyond the simple check here.
if identifier.contains(WPAppGroupName) {
/*
let manager = ShareExtensionSessionManager(appGroup: WPAppGroupName, backgroundSessionIdentifier: identifier)
manager.backgroundSessionCompletionBlock = completionHandler
manager.startBackgroundSession()
manager.startBackgroundSession()*/
}
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This method does not seem to do anything anymore, can we just remove it?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I actually had disabled this because I was having some trouble while testing, but it was unrelated. I've re-enabled this.

Comment thread WordPress/Classes/System/WordPressAppDelegate.swift Outdated
Comment thread WordPress/Classes/System/WordPressAppDelegate.swift Outdated
Comment thread WordPress/Classes/ViewRelated/Developer/WeeklyRoundupDebugScreen.swift Outdated
@Gio2018

Gio2018 commented Aug 31, 2021

Copy link
Copy Markdown
Contributor

Oh also it looks like some new files are missing the Jetpack target membership, can you please fix that?

@peril-wordpress-mobile

Copy link
Copy Markdown
Warnings
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@diegoreymendez

Copy link
Copy Markdown
Contributor Author

@Gio2018 - Ready for another look.

@Gio2018 Gio2018 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

:shipit:

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.

2 participants