WordPress-Android icon indicating copy to clipboard operation
WordPress-Android copied to clipboard

[Reader] Implement tags feed card actions (part 3)

Open RenanLukas opened this issue 9 months ago β€’ 6 comments

Fixes #20670

  • Fix tags menu item label: "Tags" -> "Your Tags".
  • Implements tags feed overflow menu UI and all actions.
  • Fix "More from <tag>" button action: it should open the tag post list instead of filtering the tags feed.
  • Implements empty state button action (no tags followed).

To Test:

  • Install JP and sign in.
  • Enable reader_tags_feed feature flag and restart the app.
  • Open reader.

Fix tags menu item label

  • Open the dropdown menu.
  • πŸ” Verify the tags feed item label is "Your Tags" instead of "Tags".

Overflow menu

  • Tap the tags feed item with at least one tag followed.
  • πŸ” Tap the overflow menu in any post card: the items should be shown as expected. You should be able to dismiss the menu and all the actions should be working as expected (the same way they work in the other feeds).

Fix "More from <tag>" button action

  • πŸ” Scroll to the end of the tags horizontal list and tap the "More from <tag>" button: it should open the tag post list screen instead of applying the tag filter in the tags feed. Tapping the tag header should still apply the tag filter in the current feed.
image

Empty state button action

  • Unsubscribe from all your tags.
  • πŸ” Verify the tags feed: you should see the empty state UI.
  • πŸ” Tap the "Get Started" button: you should see the "Choose your interests" screen.
  • πŸ” Select any tags and tap "Done": the tags should be seen loaded in the tags feed.
  • πŸ” Verify the tags are shown in other contexts (e.g. in the "Manage Tags & Blogs" screen, in the tags feed after restarting the app).

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)

    • Manual testing and updated unit tests
  3. What automated tests I added (or what prevented me from doing so)

    • Updated ReaderTagsFeedViewModelTest.kt.

PR Submission Checklist:

  • [x] I have completed the Regression Notes.
  • [x] I have considered adding accessibility improvements for my changes.
  • [x] 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)

RenanLukas avatar May 10 '24 18:05 RenanLukas

2 Warnings
:warning: strings.xml files should only be updated on release branches, when the translations are downloaded by our automation.
:warning: This PR is larger than 300 lines of changes. Please consider splitting it into smaller PRs for easier and faster reviews.

Generated by :no_entry_sign: Danger

dangermattic avatar May 10 '24 18:05 dangermattic

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
Versionpr20801-3b0e0ae
Commit3b0e0ae62486ceb82ea13c9dad9aadaee7072c39
Direct Downloadwordpress-prototype-build-pr20801-3b0e0ae.apk
Note: Google Login is not supported on these builds.

wpmobilebot avatar May 10 '24 19:05 wpmobilebot

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
Versionpr20801-3b0e0ae
Commit3b0e0ae62486ceb82ea13c9dad9aadaee7072c39
Direct Downloadjetpack-prototype-build-pr20801-3b0e0ae.apk
Note: Google Login is not supported on these builds.

wpmobilebot avatar May 10 '24 19:05 wpmobilebot

Codecov Report

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

Project coverage is 40.79%. Comparing base (03d53da) to head (3b0e0ae). Report is 2 commits behind head on feature/tags-ia.

Files Patch % Lines
...der/viewmodels/tagsfeed/ReaderTagsFeedViewModel.kt 42.64% 39 Missing :warning:
...ress/android/ui/reader/ReaderActivityLauncher.java 0.00% 4 Missing :warning:
...viewmodels/tagsfeed/ReaderTagsFeedUiStateMapper.kt 75.00% 2 Missing :warning:
Additional details and impacted files
@@                 Coverage Diff                 @@
##           feature/tags-ia   #20801      +/-   ##
===================================================
- Coverage            40.79%   40.79%   -0.01%     
===================================================
  Files                 1493     1493              
  Lines                68642    68705      +63     
  Branches             11337    11339       +2     
===================================================
+ Hits                 28003    28027      +24     
- Misses               38095    38134      +39     
  Partials              2544     2544              

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 10 '24 19:05 codecov[bot]

πŸ” Scroll to the end of the tags horizontal list and tap the "More from " button: it should open the tag post list screen instead of applying the tag filter in the tags feed.

This works as expected, although I found that after unsubscribing from a tag and returning to the Your Tags screen, the tag still appears in the list.

daniloercoli avatar May 13 '24 10:05 daniloercoli

@daniloercoli thanks for the review and for catching this bug. I've implemented a workaround to fix it. This is not the best solution since it updates the whole tags list after navigating back to Tags feed, but for a number of reasons I wasn't able to implement the ideal solution so far, which involves removing from UI the tags that were unsubscribed and adding the ones that were subscribed to instead of refreshing the whole list (thanks for the help @thomashorta ).

If the current workaround fixes the problem you've found, I propose that we implement the ideal solution in another PR so we can merge the actions ASAP allowing us to better test the project. WDYT?

RenanLukas avatar May 13 '24 23:05 RenanLukas