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

In App Feedback Prompt Groundwork #22050

Merged
merged 42 commits into from
Jan 19, 2024
Merged

In App Feedback Prompt Groundwork #22050

merged 42 commits into from
Jan 19, 2024

Conversation

salimbraksa
Copy link
Contributor

@salimbraksa salimbraksa commented Nov 16, 2023

Part of #22341

Description

This PR makes changes to the existing AppRatingsUtility type. This utility object is responsible for deciding when the App Ratings UI should be shown. The changes include:

  1. Remove the existing App Ratings UX from the Notifications screen.
  2. Remove the old remote feature flag mechanism this object was using.
  3. Raise the required action count for the App Ratings Prompt to display to 20.
  4. The following actions increment the action count:
    • User visits the Notifications screens and has unread notifications. User taps on unread notification ( see this comment )
    • User publishes a post.
    • User reads a post.
    • User views stats.

Test Instructions

Same as #22052

Notes

Remove then DO NOT MERGE label when the following PR is approved:

Regression Notes

  1. Potential unintended areas of impact
    None.

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

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

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.

@salimbraksa salimbraksa self-assigned this Nov 16, 2023
@salimbraksa salimbraksa marked this pull request as ready for review November 16, 2023 10:58
@wpmobilebot
Copy link
Contributor

wpmobilebot commented Nov 16, 2023

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 Numberpr22050-dc57c78
Version24.0
Bundle IDorg.wordpress.alpha
Commitdc57c78
App Center BuildWPiOS - One-Offs #8497
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 Nov 16, 2023

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 Numberpr22050-dc57c78
Version24.0
Bundle IDcom.jetpack.alpha
Commitdc57c78
App Center Buildjetpack-installable-builds #7519
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@hassaanelgarem hassaanelgarem removed their request for review December 13, 2023 23:55
@hassaanelgarem hassaanelgarem self-assigned this Dec 13, 2023
@hassaanelgarem hassaanelgarem marked this pull request as draft December 13, 2023 23:55
@mokagio
Copy link
Contributor

mokagio commented Jan 8, 2024

I've been going trough PRs to update them via git merge trunk to include #22270 and run on the new Apple Silicon CI with Xcode 15.1.

I did not work on this one because it already developed merge conflicts with trunk so a merge and work by the author is required regardless.

@@ -411,14 +411,8 @@ extension WordPressAppDelegate {
}

let utility = AppRatingUtility.shared
utility.register(section: "notifications", significantEventCount: 5)
utility.systemWideSignificantEventCountRequiredForPrompt = 10
utility.systemWideSignificantEventCountRequiredForPrompt = 20
Copy link
Contributor Author

@salimbraksa salimbraksa Jan 9, 2024

Choose a reason for hiding this comment

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

This means, that at least 20 actions should be performed for the App Ratings Prompt to appear.

The count is increased using this method:

AppRatingUtility.shared.incrementSignificantEvent()

/// This checks if we've disabled app review prompts for a feature or at a
/// global level
///
@objc func checkIfAppReviewPromptsHaveBeenDisabled(success: (() -> Void)?, failure: (() -> Void)?) {
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is an old remote feature flag mechanism. It is replaced with the new one.

@@ -121,7 +85,7 @@ class AppRatingUtility: NSObject {
///
@objc(registerSection:withSignificantEventCount:)
func register(section: String, significantEventCount count: Int) {
sections[section] = Section(significantEventCount: count, enabled: true)
sections[section] = Section(significantEventCount: count)
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The enabled property was never set to false. It was always true.

@salimbraksa salimbraksa force-pushed the task/in-app-feedback branch from a65af62 to 6a98364 Compare January 9, 2024 12:36
@salimbraksa salimbraksa changed the title Implement groundwork for the in-app feedback feature In App Feecdback Prompt Groundwork Jan 9, 2024
@salimbraksa salimbraksa mentioned this pull request Jan 9, 2024
13 tasks
@salimbraksa salimbraksa changed the title In App Feecdback Prompt Groundwork In App Feedback Prompt Groundwork Jan 9, 2024
@salimbraksa salimbraksa modified the milestones: Pending, 24.1 Jan 17, 2024
Copy link
Contributor

@alpavanoglu alpavanoglu left a comment

Choose a reason for hiding this comment

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

LGTM. I'll test it again though when we merge the child PR into this one.

@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jan 18, 2024

Warnings
⚠️ This PR is assigned to a milestone which is closing in less than 4 days Please, make sure to get it merged by then or assign it to a later expiring milestone
⚠️ PR has more than 500 lines of code changing. Consider splitting into smaller PRs if possible.

Generated by 🚫 dangerJS

@dangermattic
Copy link
Collaborator

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

@salimbraksa salimbraksa merged commit 09c51c9 into trunk Jan 19, 2024
22 checks passed
@salimbraksa salimbraksa deleted the task/in-app-feedback branch January 19, 2024 19:54
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.

6 participants