-
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
[Tags Feed] Implement retry action for error state #20839
[Tags Feed] Implement retry action for error state #20839
Conversation
Quality Gate passedIssues Measures |
📲 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 #20839 +/- ##
===================================================
+ Coverage 40.81% 40.82% +0.01%
===================================================
Files 1493 1493
Lines 68736 68750 +14
Branches 11346 11346
===================================================
+ Hits 28057 28070 +13
- Misses 38131 38132 +1
Partials 2548 2548 ☔ 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.
Code LGTM an works well @thomashorta! 👍
Thanks for providing the test branch as well, I also tested the code in this PR by turning off the network an waiting for the timeout to happen for some of the tags. At that point, restoring the network, the retry worked as as expected for each tag. The PTR also worked 🎉
Approving from my side and this can be merged 👍
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 theRetry
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.
reader_tags_feed
feature config is on (Debug Settings
->Remote features
)Your Tags
feedRetry
on the error/empty item for a tag that failed loading/has no postsRegression Notes
Potential unintended areas of impact
What 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)
PR Submission Checklist:
RELEASE-NOTES.txt
if necessary.Testing Checklist (strike-out the not-applying and unnecessary ones):