-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
Issue/11799 show announcement on app upgrade #11804
Issue/11799 show announcement on app upgrade #11804
Conversation
You can trigger optional UI/connected tests for these changes by visiting CircleCI here. |
You can test the changes on this Pull Request by downloading the APK here. |
Hi there! Extra notes:
Let me know if you have any questions! |
@oguzkocer Got it! Sorry, I totally missed that the code freeze is right around the corner for 14.8. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi klym, I went into the code and left one comment about using list of announcements (not feeling strong about it so let me know wdyt). I was going into testing, but unless I'm doing something wrong for me the call to WordPress > initAnalytics (that updates the last versionCode with AppPrefs.setLastAppVersionCode(versionCode);) is called before the WPMainActivity > initViewModel > start (that makes the check on the versionCode); let me know if I'm missing something, thanks 😊
return BuildConfig.VERSION_CODE | ||
} | ||
|
||
fun isFeatureAnnouncementEnabled(): Boolean { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are introducing the wrapper, wdyt if we use it in AppSettingsFragment.java Line 172 also?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the check to AppSettingsFragment in upcoming PR :)
@@ -27,7 +27,11 @@ class FeatureAnnouncementProvider @Inject constructor() { | |||
) | |||
) | |||
|
|||
fun getLatestFeatureAnnouncement(): FeatureAnnouncement { | |||
fun getLatestFeatureAnnouncement(): FeatureAnnouncement? { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure it's worth nor how much work it can be (so feel free to just say you will never consider doing 😊), but since we are possibly considering expanding the announcements one day to include some of the previous one and to avoid this (sometimes tricky) nullable, maybe we could consider to use a list of FeatureAnnouncement (eventually ordered by app version code or being empty)...wdyt?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the getFeatureAnnouncements(): List<FeatureAnnouncement>
method in upcoming PR, but it's not really solving the nullability of the announcement, it just moves the check upstream.
Updated the logic around app versions. Hope I didn't mess up anything this time :) The announcement should not be shown:
The announcement should be shown:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @khaykov 👋! Thanks for the changes, works really well now 👍! LGTM
Fixes #11799
This PR adds logic for displaying feature announcements on the app upgrade.
We decided to show announcements independent of app version - eg. if you are on v4 of the app, and there is an announcement in v5, you will see even if you skip v5 and upgrade straight to v6 or v7 (until we remove or replace announcement manually).
To test (using wasabi build):
PR submission checklist:
RELEASE-NOTES.txt
if necessary.