-
Notifications
You must be signed in to change notification settings - Fork 236
set pager size #1356 #1414
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
set pager size #1356 #1414
Conversation
|
@rwstauner or @haarg Would one of you like to review the JS in this pull request? |
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.
I think we could pare this down a bit by moving most of this logic into lib/MetaCPAN/Web/Role/Request.pm
Something like:
sub get_page_size {
my $req = shift;
my $default_page_size = shift;
my $page_size = $req->param('size');
unless ( is_PositiveInt($page_size) && $page_size <= 500 ) {
$page_size = $default_page_size;
}
return $page_size;
}The controllers should consume this role by default, so this would cut down on some boilerplate. If you're short on time, I can make these changes for you. Just let me know. I also see that you have different default page sizes, so we could deal with this here by suppl
|
I apologize that it has taken me so long to review the code. Thanks very much for taking this on. :) |
|
Rebased in pull request #1417 |
|
Thanks for the refactor. BTW, if you just force-push your branch that's enough to update the current pull request. There's no need to open a new pull request, unless you have other reasons for wanting to go that route. |
|
OK, I did not know that. Next time I'll try that. |
No description provided.