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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reader: Update when the results controller is reset for tags feed #23179

Merged
merged 1 commit into from May 10, 2024

Conversation

wargcm
Copy link
Contributor

@wargcm wargcm commented May 9, 2024

Description

Fixes selecting a filter on the "Your Tags" feed. There was a race condition with recreating the results controller which caused unexpected behavior. This moves the recreation of that controller to when the setContent is called.

Testing

To test:

  • Launch Jetpack and login
  • Navigate to the "Your Tags" feed
  • Scroll the feed down
  • Tap on the tags filter chip
  • Select a tag to filter
  • 馃攷 Verify the feed is properly filtered and scrolls to the top
  • Scroll down on the filtered feed
  • Tap on the X to remove the filter
  • 馃攷 Verify the filter is removed, the tags feed displays again, and it starts at the top of the feed

Regression Notes

  1. Potential unintended areas of impact
    Subscriptions feed filtering

  2. What I did to test those areas of impact (or what existing automated tests I relied on)
    Manual testing

  3. What automated tests I added (or what prevented me from doing so)
    N/A
    PR submission checklist:

  • I have completed the Regression Notes.
  • I have considered adding unit tests for my changes.
  • 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:

  • WordPress.com sites and self-hosted Jetpack sites.
  • Portrait and landscape orientations.
  • Light and dark modes.
  • Fonts: Larger, smaller and bold text.
  • High contrast.
  • VoiceOver.
  • Languages with large words or with letters/accents not frequently used in English.
  • Right-to-left languages. (Even if translation isn鈥檛 complete, formatting should still respect the right-to-left layout)
  • iPhone and iPad.
  • Multi-tasking: Split view and Slide over. (iPad)

@wargcm wargcm added this to the 24.9 milestone May 9, 2024
@wargcm wargcm requested a review from dvdchr May 9, 2024 18:45
@wargcm wargcm self-assigned this May 9, 2024
@dangermattic
Copy link
Collaborator

1 Warning
鈿狅笍 This PR is assigned to the milestone 24.9. This milestone is due in less than 4 days.
Please make sure to get it merged by then or assign it to a milestone with a later deadline.

Generated by 馃毇 Danger

tableViewHandler?.tableView.layoutIfNeeded()

if !isEmpty {
tableViewHandler?.tableView.scrollToRow(at: IndexPath(row: 0, section: 0), at: .top, animated: false)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

I had to use scrollToRow here because using setContentOffset would scroll too high sometimes above the first card. I believe this was due to the pull-to-refresh.

@wpmobilebot
Copy link
Contributor

WordPress Alpha馃摬 You can test the changes from this Pull Request in WordPress Alpha by scanning the QR code below to install the corresponding build.
App NameWordPress Alpha WordPress Alpha
ConfigurationRelease-Alpha
Build Numberpr23179-0bafe68
Version24.8
Bundle IDorg.wordpress.alpha
Commit0bafe68
App Center BuildWPiOS - One-Offs #9860
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

@wpmobilebot
Copy link
Contributor

Jetpack Alpha馃摬 You can test the changes from this Pull Request in Jetpack Alpha by scanning the QR code below to install the corresponding build.
App NameJetpack Alpha Jetpack Alpha
ConfigurationRelease-Alpha
Build Numberpr23179-0bafe68
Version24.8
Bundle IDcom.jetpack.alpha
Commit0bafe68
App Center Buildjetpack-installable-builds #8908
Automatticians: You can use our internal self-serve MC tool to give yourself access to App Center if needed.

Copy link
Contributor

@dvdchr dvdchr left a comment

Choose a reason for hiding this comment

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

I've tested and verified that the race condition no longer happens in the 'Your Tags' stream. I've also tested this with a self-hosted site without Jetpack connection (where the issue was happening more often before this fix.)

Looking good! :shipit:

@wargcm wargcm merged commit f749f04 into trunk May 10, 2024
24 of 28 checks passed
@wargcm wargcm deleted the fix/tags-feed-filter branch May 10, 2024 18:37
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

4 participants