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

[Reader] Move announcement card inside the feeds #20872

Merged
merged 12 commits into from
May 24, 2024

Conversation

thomashorta
Copy link
Contributor

@thomashorta thomashorta commented May 23, 2024

Fixes #20621

This improves the current behavior by moving the Reader Announcement card inside the feeds that show on the main Reader screen, instead of rendering it on the ReaderFragment app bar.

I was not sure if the announcement should be also included in the new Your Tags feed so I didn't include it in this PR, but @develric and @osullivanchris let me know if it should be also added there.


To Test:

This relies on a shared pref that is set when the card is dismissed, so to test multiple times you will need to clear app data (or if using an emulator push a shared pref file without the dismiss pref to override the app prefs file).

  1. Open Jetpack
  2. Turn off the reader_announcement_card feature config (in Debug settings)
  3. Restart the app
  4. Go to Reader
  5. Verify the announcement card does not show in any feeds
  6. Turn on the reader_announcement_card feature config (in Debug settings)
  7. Restart the app
  8. Go to Reader
  9. Verify the announcement card is shown in all feeds except Your Tags and non-main feeds (e.g.: tag preview, blog preview)

Regression Notes

  1. Potential unintended areas of impact

    • Feed behavior in "Main reader"
    • Feed behavior in other Activities
  2. What I did to test those areas of impact (or what existing automated tests I relied on)

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

    • Updated tests for existing scenarios
    • Added new tests for new scenarios

PR Submission Checklist:

  • I have completed the Regression Notes.
  • 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.

Testing Checklist (strike-out the not-applying and unnecessary ones):

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • Talkback.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn’t complete, formatting should still respect the right-to-left layout)
  • Large and small screen sizes. (Tablet and smaller phones)
  • Multi-tasking: Split screen and Pop-up view. (Android 10 or higher)

@dangermattic
Copy link
Collaborator

1 Warning
⚠️ This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by 🚫 Danger

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 23, 2024

WordPress📲 You can test the changes from this Pull Request in WordPress by scanning the QR code below to install the corresponding build.
App NameWordPress WordPress
FlavorJalapeno
Build TypeDebug
Versionpr20872-911be72
Commit911be72
Direct Downloadwordpress-prototype-build-pr20872-911be72.apk
Note: Google Login is not supported on these builds.

@wpmobilebot
Copy link
Contributor

wpmobilebot commented May 23, 2024

Jetpack📲 You can test the changes from this Pull Request in Jetpack by scanning the QR code below to install the corresponding build.
App NameJetpack Jetpack
FlavorJalapeno
Build TypeDebug
Versionpr20872-911be72
Commit911be72
Direct Downloadjetpack-prototype-build-pr20872-911be72.apk
Note: Google Login is not supported on these builds.

Copy link

codecov bot commented May 23, 2024

Codecov Report

Attention: Patch coverage is 87.50000% with 5 lines in your changes are missing coverage. Please review.

Project coverage is 41.01%. Comparing base (6f5556c) to head (911be72).

Files Patch % Lines
...ndroid/ui/reader/utils/ReaderAnnouncementHelper.kt 91.30% 1 Missing and 1 partial ⚠️
...ss/android/ui/reader/viewmodels/ReaderViewModel.kt 0.00% 1 Missing and 1 partial ⚠️
...roid/ui/reader/discover/ReaderDiscoverViewModel.kt 91.66% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@                 Coverage Diff                 @@
##           feature/tags-ia   #20872      +/-   ##
===================================================
- Coverage            41.02%   41.01%   -0.01%     
===================================================
  Files                 1508     1509       +1     
  Lines                69287    69289       +2     
  Branches             11428    11427       -1     
===================================================
- Hits                 28424    28422       -2     
- Misses               38280    38291      +11     
+ Partials              2583     2576       -7     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@thomashorta thomashorta force-pushed the issue/20621-announcement-card-in-feeds branch from 71ebaa0 to 2375887 Compare May 24, 2024 00:17
Copy link
Contributor

@daniloercoli daniloercoli left a comment

Choose a reason for hiding this comment

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

The code looks good. I only left a minor comment.

Also, i didn't test the gapMarkerPosition logic, intended to display the gap in the feed. I left the app open and should be able to check it shortly.

Copy link

@osullivanchris osullivanchris left a comment

Choose a reason for hiding this comment

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

Hey thanks for the build. The spacing, colors, poisitioning feels pretty good. WDYT? Happy with it?

Hard to say for certain without seeing a build but the text sizes feel a bit small. Could you try bumping up the headings from 14 -> 16. And the excerpt from 12 to 14? Which I think would match the post excerpt. Can use whichever m3 naming matches those values.

lastly what do you think about the done button? any idea for another label? or should it be an x?

@thomashorta
Copy link
Contributor Author

thomashorta commented May 24, 2024

Thanks for the review @osullivanchris .

WDYT? Happy with it?

I think it's looking great! The good thing about the current implementation is that we should be able to use it again in the future if minor changes.

Could you try bumping up the headings from 14 -> 16. And the excerpt from 12 to 14? Which I think would match the post excerpt. Can use whichever m3 naming matches those values.

We plan to finalize all the Reader Tags + Announcement changes today (including merging to trunk).

Should we go with the bigger font suggested here or keep it as is. Worst case we can update it during beta. I am in favor of using a bigger font since I agree the current one looks a bit small, but I will do it on a separate PR.

lastly what do you think about the done button? any idea for another label? or should it be an x?

I like the done button and given the plan to merge the changes today, I think it's a bit too late to change it to an x unless there's some bigger concern about it.

@osullivanchris
Copy link

Hey @thomashorta on both counts happy to go with things as they are so we can merge today. If we change the font size it might need more tweaking with alignment and such. So let's try it out in a separate Pr and we can decide next week if it's better. I'll play around with it in Figma too.

On the button that's cool I just wanted a second opinion. It feels more positive to tap this big button than an x which feels a bit more negative and would be a smaller tap target. Plus the animation you put in after I tap done feels pleasant

Copy link
Contributor

@RenanLukas RenanLukas left a comment

Choose a reason for hiding this comment

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

Thanks for the PR, @thomashorta!
It's working as expected and code LGTM. I've left a small suggestion.

Copy link

sonarcloud bot commented May 24, 2024

Quality Gate Passed Quality Gate passed

Issues
3 New issues
0 Accepted issues

Measures
0 Security Hotspots
No data about Coverage
0.0% Duplication on New Code

See analysis details on SonarCloud

@thomashorta thomashorta merged commit fef5649 into feature/tags-ia May 24, 2024
20 checks passed
@thomashorta thomashorta deleted the issue/20621-announcement-card-in-feeds branch May 24, 2024 19:53
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.

None yet

6 participants