Blogging Prompts: Add syncing reminder UI with remote prompts schedule - #18753
Conversation
You can test the changes in Jetpack from this Pull Request by:
|
You can test the changes in WordPress from this Pull Request by:
|
dvdchr
left a comment
There was a problem hiding this comment.
👋🏼 ! Thanks for wrangling this @wargcm. I've got some notes:
- We probably should only prepopulate the reminder settings when
promptRemindersEnabledis true, so we don't disrupt the current Blogging Reminders flow (without prompts). What do you think? - Additionally, since Blogging Prompts is still feature-flagged, we should check if the flag is enabled first before pre-populating the reminders.
| thursday, | ||
| friday, | ||
| saturday | ||
| ].enumerated().flatMap { (index: Int, isReminderActive: Bool) in |
There was a problem hiding this comment.
Let's make Xcode happy 😄 (flatMap is deprecated)
| ].enumerated().flatMap { (index: Int, isReminderActive: Bool) in | |
| ].enumerated().compactMap { (index: Int, isReminderActive: Bool) in |
|
@dvdchr thanks for the
The local settings are favored over the remote settings already. So if they had prompts off and had local reminders already, it wouldn't overwrite their schedule. I don't feel strongly one way or the other about wrapping the syncing behind that bool so I went ahead and made the changes.
I was thinking it wouldn't be a huge deal since the default remote settings already matched the default reminder settings locally. But it's a good call in case the backend ever changes, so I made that change. |
See: #18429
Description
Syncs the reminders UI with the remote settings if it exists. The order of priority for which schedule to display is as follows:
Local schedule > Remote prompt settings > NoneSo if a user already has reminders scheduled but it wasn't synced with the remote backend, their schedule would still be preserved.
Testing
To test:
bloggingPromptsfeature flagRegression Notes
Potential unintended areas of impact
N/A
What I did to test those areas of impact (or what existing automated tests I relied on)
N/A
What automated tests I added (or what prevented me from doing so)
N/A
PR submission checklist:
RELEASE-NOTES.txtif necessary.