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 issue in gallery when there's not enough labels to display more than 1 page #3625

Merged
merged 3 commits into from
Aug 27, 2024

Conversation

jsomeara
Copy link
Collaborator

Resolves #3621

In gallery queries with not enough entries to form more than one page, the gallery system was falsely enabling the next label button and next page button. They should be disabled because there is no next page, and no next label at the end. The issue was that the system did not check if there was enough labels until updateCardsNewPage was called. This was fixed by adding a check in the _init function.

Before/After screenshots (if applicable)

Before:
image
image

After:
image
image

Testing instructions
  1. Find a query that doesn't have enough entries to make a page
  2. Verify that the next page and next label (for the last label on the first page) buttons are disabled.
Things to check before submitting the PR
  • I've written a descriptive PR title.
  • I've included before/after screenshots above.

Copy link
Member

@misaugstad misaugstad left a comment

Choose a reason for hiding this comment

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

Perfect, thank you!!

@misaugstad misaugstad merged commit f8a2f41 into develop Aug 27, 2024
@misaugstad misaugstad deleted the 3621-proper-end-detection-gallery-expanded branch August 27, 2024 18:40
@misaugstad misaugstad mentioned this pull request Sep 3, 2024
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.

Gallery 'next label' button not disabled when using URL param filters
2 participants