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

[Tags Feed] Implement retry action for error state

Open thomashorta opened this issue 9 months ago • 4 comments

Fixes #20823

Implement the retry action by calling the fetchTag method for the appropriate tag. I also adjusted the height of the Error item layout, since it was not matching the height from other items, causing the vertical list content to shift.


To Test:

Suggestion: use the branch test/20823-reader-tags-feed-retry to test this PR, since the code there forces the second tag in the list to alternate between the Error and Loaded states every third time when fetching its posts, which is useful for testing the Retry behavior.

Ex: first fetch for the tag causes an Error state, second fetch does the same, third fetch loads the posts correctly, then it cycles.

  1. Open Jetpack
  2. Make sure the reader_tags_feed feature config is on (Debug Settings -> Remote features)
  3. Go to Reader
  4. Go to Your Tags feed
  5. Tap Retry on the error/empty item for a tag that failed loading/has no posts
  6. Verify it tries to fetch the posts again
  7. (if using the suggested branch) Verify it loads the posts successfully every third fetch (use pull-to-refresh and retry to fetch multiple times)

Regression Notes

  1. Potential unintended areas of impact

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

    • N/A
  3. What automated tests I added (or what prevented me from doing so)

    • Fixed existing tests
    • Added unit tests for the retry code

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.
  • [x] Portrait and landscape orientations.
  • [ ] Light and dark modes.
  • [ ] Fonts: Larger, smaller and bold text.
  • [ ] High contrast.
  • [x] 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)

thomashorta avatar May 16 '24 20:05 thomashorta