-
-
Notifications
You must be signed in to change notification settings - Fork 59
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
CB-406: Extract pagination logic into common component #390
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi! Thanks for working on this and apologies for the late review.
The new pagination code is different from what we used originally. It looks like it allows to paginate among 5 pages at a time. I guess this way is probably fine too but any particular reason you chose to implement it this way instead of the existing previous and next buttons?
I chose to paginate 5 pages at a time because I felt that it is much better for easy navigation compared to the existing previous and next buttons. Also, I chose to paginate 5 pages mainly because it provides the best use. A smaller number would not add much utility, and any number greater than 5 would be too much for the user to navigate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the updates. A few more changes and we should be good to go!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
<nav aria-label="Page navigation"> | ||
<ul class="pagination"> | ||
|
||
<li class="previous {{'disabled' if current_page <= 1 }}"><a aria-label="Previous" href="{{ url_for(page_info, page=page-1, **parameter) }}">← {{ _('Previous') }}</a></li> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the aria-label should probably also be translated
CB-406