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

GIF search: correctly display partial page results. #14291

Merged
merged 2 commits into from
Jun 11, 2020

Conversation

ScoutHarris
Copy link
Contributor

Ref #13803 (comment)

This fixes the issue noted in the referenced comment:

Issue in the block editor where I saw search results appear briefly and then vanish. For some reason it happens for me every time with the search term 'blathers'.

The problem was TenorService was loading an additional page when it didn't need to because TenorPageable was telling it there was a next page. So, after correctly displaying the search results, the last fetch would return nothing, resulting in the no results message.

This change determines if the last page was partial or not. If it was, stop loading.

To test:

  • Add media via Free GIF Library. (media library or page/post editors)
  • Enter a search term that has few results. Specifically, less than 40. blathers or hammerhead should do it.
  • Verify search results are displayed.
blathers hammerhead

PR submission checklist:

  • I have considered adding unit tests where possible.
  • 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.

@ScoutHarris ScoutHarris added this to the 15.1 milestone Jun 10, 2020
@ScoutHarris ScoutHarris requested a review from frosty June 10, 2020 23:08
@ScoutHarris ScoutHarris self-assigned this Jun 10, 2020
@peril-wordpress-mobile
Copy link

peril-wordpress-mobile bot commented Jun 10, 2020

You can trigger an installable build for these changes by visiting CircleCI here.

@peril-wordpress-mobile
Copy link

You can trigger optional UI/connected tests for these changes by visiting CircleCI here.

Copy link
Contributor

@frosty frosty left a comment

Choose a reason for hiding this comment

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

Nice detective work! Works great 👍

@ScoutHarris ScoutHarris merged commit 784aa0a into develop Jun 11, 2020
@ScoutHarris ScoutHarris deleted the fix/13803-gif_search_partial_page_fails branch June 11, 2020 15:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants