-
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
[Reader] Implement announcement card #20846
[Reader] Implement announcement card #20846
Conversation
Generated by 🚫 Danger |
Reviewer: I have no idea why SonarCloud Quality Gate is complaining about this line. |
📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
|
📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## feature/tags-ia #20846 +/- ##
===================================================
+ Coverage 40.81% 40.83% +0.02%
===================================================
Files 1493 1494 +1
Lines 68736 68771 +35
Branches 11346 11349 +3
===================================================
+ Hits 28057 28086 +29
- Misses 38131 38139 +8
+ Partials 2548 2546 -2 ☔ View full report in Codecov by Sentry. |
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.
Hey @RenanLukas 👋 , thanks for the PR 🙇 (also thanks @thomashorta for taking care of the CI issues while Renan was afk 🙇 ).
Code LGTM, I just left a minor np if you want to consider it 🙇
About the card behavior, I'm not sure if this was discussed before (so in case bear with me 🙇) I had 2 thoughts while interacting with it:
- By instinct I'd expect it to be part of the stream instead of staying in a fixed position on top while you scroll the feed; OTOH maybe this works in terms of users noticing it 🤔
- Should we avoid to show the card in the following scenarios? Of the two scenarios below, what I'm most unsure of is maybe the empty state case (including onboarding "getting started" state).
Empty states, including onboarding
Blogs or Tagged filtered feeds
Wdyt? I mostly wanted to be sure we considered the items I reported 🙇
fun onAnnouncementCardDoneClick() { | ||
readerTracker.track(AnalyticsTracker.Stat.READER_ANNOUNCEMENT_CARD_DISMISSED) | ||
appPrefsWrapper.setShouldShowReaderAnnouncementCard(false) | ||
loadAnnouncementCard() |
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.
np: maybe I'd rename this something like setAnnouncementCardState, since in the end we use it for that and in this scope here for example we are not actually loading the cards but setting the "hide" state. 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.
Good point, that threw me off as well when I worked on the code yesterday. Maybe updateAnnouncementCard
would be better.
Thanks for the review, @develric
I also thought about it while implementing it and it definitely seems to make sense. The problem is that we have at least three places in the reader that we'd have to implement the card: discover feed screen, tags feed screen (which is the new one) and post list screen, which is basically the other feeds. Since implementing it in at least three places would significantly increase the effort, I thought the gain we'd have wasn't worth it considering is something shown just once until the user taps "Done". Please let me know if you disagree.
If we're willing to spend time implementing it, yes, it should be possible. I'll have a look at the empty states because we might need some specific logic depending on the screen (like for "Discover", for example). I'm not sure about the filtered tag/blog scenario, though: if we're showing the announcement card when no filter is selected and the UI is exactly the same (vertical post list), why shouldn't we also show it when a filter is selected and also considering the user is one click away from never seeing it again in case they're annoyed by it? |
+1 on injecting the card into the feed. (For the record, Posting Prompts will be added into the feed). To restrict the effort, I think we can limit it to the Discovery feed, as it's where the vast majority of people are in the Reader. |
Quality Gate passedIssues Measures |
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.
As per team slack discussion/alignment, we are merging this PR since it's going into a feature branch and it's still behind an off feature flag. We'll use this as a plan B while exploring having the announcement card injected in the feeds 👍
Fixes #20621
Screen.Recording.2024-05-17.at.10.26.02.PM.mov
To Test:
reader_announcement_card
feature flag is disabled.reader_announcement_card
feature flag.Regression Notes
Potential unintended areas of impact
reader_fragment_layout
fileWhat I did to test those areas of impact (or what existing automated tests I relied on)
What automated tests I added (or what prevented me from doing so)
ReaderViewModelTest.kt
.PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):