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

Fix large gap between results in Instant Results when there are few results #3200

Merged
merged 2 commits into from
Dec 16, 2022

Conversation

JakePT
Copy link
Contributor

@JakePT JakePT commented Dec 13, 2022

Description of the Change

Fixes an issue where a large gap appeared between results when few results were being displayed (the exact amount depended on display size). The fix replaces the use of CSS grid with using the gap property with a flex object, which is now supported by the last 2 major versions of all major browsers.

This also includes a tweak to how the Next and Previous buttons are hidden when unavailable. Previously they were simply not rendered, but now they are rendered and hidden with visibility: hidden. This allows them to occupy space which will prevent the "Page X of Y" from shifting around as the buttons are rendered and un-rendered.

Closes #3173

How to test the Change

  1. Activate Instant Results.
  2. Perform a search or filter such that the number of returned results does not require scrolling, and where a large gap would be expected after the last result.
  3. Check that the results are no inappropriately spread out vertically. Instead there should be small gaps between results and a large gap between the last result and the "Page X of Y" text.

Changelog Entry

Fixed - An layout issue in Instant Results that would occur with small result sets.

Credits

Props @JakePT

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@JakePT JakePT self-assigned this Dec 13, 2022
@felipeelia felipeelia added this to the 4.4.1 milestone Dec 13, 2022
@felipeelia felipeelia merged commit fab7b73 into develop Dec 16, 2022
@felipeelia felipeelia deleted the fix/3173 branch December 16, 2022 12:39
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.

BUG: Large gap between results in Instant Results when there are few results
2 participants