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

Stop displaying first page link on second page pagination and last page link on penultimate page pagination #1005

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

tiagotex
Copy link

@tiagotex tiagotex commented Aug 22, 2019

While debugging a problem in ActiveAdmin pagination I found this unexpected behaviour.

I expected the first page link to not be shown in the second page pagination because it does exactly the same as the previous page link. I'm not sure if this link duplication is on purpose or not.

I've created a quick spike with a possible alternative, let me know if any other work needs to be done. If you decide that the current behaviour is the correct, feel free to close this PR.

Thank you for the nice work maintaining this gem 💚

@yuki24
Copy link
Member

yuki24 commented Aug 23, 2019

Thanks for your PR. This is an interesting change, and I think it makes total sense to reduce duplicate links whenever possible.

@amatsuda do you think we should be concerned about any sort of compatibility here? It might be safe to do this, btu also could be surprising to remove user-facing links.

@ruurd
Copy link
Contributor

ruurd commented Dec 20, 2020

Harumpf. So if I randomly click on page numbers and I happen to land on page 2 all of a sudden I have to change modes and click on 'First' if I want to go to page 1. Likewise for the one-but-last page.

It might be me but I should have an UX expert look at that.

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.

None yet

3 participants