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 IA][Bug][0 tags/blogs] Infinite loading indicator on Subscription feed after subscribing to tags #20010

Closed
thomashorta opened this issue Jan 23, 2024 · 0 comments · Fixed by #20216
Assignees

Comments

@thomashorta
Copy link
Contributor

thomashorta commented Jan 23, 2024

Expected behavior

After going to "Suggested tags" flow inside the Tag filter bottom and returning to the Subscriptions feed it should still show the empty state (as there are still 0 blogs being followed) and not show a loading indicator indefinitely.

Actual behavior

After going to "Suggested tags" flow inside the Tag filter bottom and returning to the Subscriptions feed it shows a loading indicator indefinitely on top of a blank feed.

20010-reader-ia-subscriptions-infinite-loading.mp4

Steps to reproduce the behavior

Make sure to unsubscribe from all tags and blogs.

  1. Install and log into Jetpack on a feature/reader-ia branch build
  2. Go to reader
  3. Go to the Subscriptions feed
  4. Tap "0 tags" filter pill
  5. Tap "Suggested tags"
  6. Choose zero or more tags and tap "Done"/back
  7. Verify it goes back to Subscription Feed in an infinite loading state
@thomashorta thomashorta changed the title [Reader IA][Bug][0 blogs/tags] Infinite loading indicator on Subscription feed after subscribing to tags [Reader IA][Bug][0 blogs/tags] Infinite loading indicator on Subscription feed after subscribing to tags and blogs Feb 3, 2024
@thomashorta thomashorta changed the title [Reader IA][Bug][0 blogs/tags] Infinite loading indicator on Subscription feed after subscribing to tags and blogs [Reader IA][Bug] Infinite loading indicator on Subscription feed after subscribing to tags and blogs Feb 3, 2024
@thomashorta thomashorta changed the title [Reader IA][Bug] Infinite loading indicator on Subscription feed after subscribing to tags and blogs [Reader IA][Bug][0 tags/blogs] Infinite loading indicator on Subscription feed after subscribing to tags Feb 3, 2024
@thomashorta thomashorta self-assigned this Feb 6, 2024
thomashorta pushed a commit that referenced this issue Feb 19, 2024
Upon investigation I realized that most places using this event were actually
using it as a callback for the end of the fetch task rather than something that
is ONLY emitted when the tags CHANGE, which was what the name implied.

That only worked because of the bug mentioned in commit 3017bab that did not
properly compare the local and server tags and considered all fetches as
requiring a local database write, which in turn triggered the event.

The constant triggering of that FollowedTagsChanged event was also the cause of
bugs #20009 and #20010 since part of the code that runs there was actually only
supposed to run some times.

To fix that I renamed it to FollowedTagsFetched to better represent what it does
and figured out which parts of the code inside `ReaderPostListFragment` event
listener were supposed to run and in which scenario. I also added a `didChange`
field in the `FollowedTagsFetched` event for completeness but that part might
not be needed in the future, since the only code using that is legacy code
related to the old subfilter which should be removed in the future.
thomashorta pushed a commit that referenced this issue Feb 20, 2024
Upon investigation I realized that most places using this event were actually
using it as a callback for the end of the fetch task rather than something that
is ONLY emitted when the tags CHANGE, which was what the name implied.

That only worked because of the bug mentioned in commit 3017bab that did not
properly compare the local and server tags and considered all fetches as
requiring a local database write, which in turn triggered the event.

The constant triggering of that FollowedTagsChanged event was also the cause of
bugs #20009 and #20010 since part of the code that runs there was actually only
supposed to run some times.

To fix that I renamed it to FollowedTagsFetched to better represent what it does
and figured out which parts of the code inside `ReaderPostListFragment` event
listener were supposed to run and in which scenario. I also added a `didChange`
field in the `FollowedTagsFetched` event for completeness but that part might
not be needed in the future, since the only code using that is legacy code
related to the old subfilter which should be removed in the future.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant