addons-frontend
addons-frontend copied to clipboard
Use the `page_count` returned from the API response to determine the maximum number of pages for pagination links
This was discovered during the investigation of https://github.com/mozilla/addons-server/issues/17362.
According to @diox:
"We have configured Elasticsearch in a way that doesn't allow pagination to go past 25000 items (1000 pages of 25). The search API returns a 404 on purpose here."
Therefore, we should not base the maximum number of pages that we use for pagination links on a calculation, but rather we should use page_count
which is returned to us in the API response.
We had an issue opened for this since the beginning of the new frontend, but we never got to fixing it :) - https://github.com/mozilla/addons-frontend/issues/3887
Wow, yeah, that's an old issue! Thanks @AlexandraMoga!
Given that there is an API field returning the page count, I think the frontend should use that. We should probably close this and re-open the old one...
Reading through the old issues, I'm not sure it makes sense to re-open any of them, as they are somewhat confusing. Let's just rename this one to have it be about using page_count
.
This issue has been automatically marked as stale because it has not had recent activity. If you think this bug should stay open, please comment on the issue with further details. Thank you for your contributions.