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

feature(settings): adds setting for default number of items per page #7598

Merged
merged 1 commit into from Dec 5, 2014

Conversation

mrclay
Copy link
Member

@mrclay mrclay commented Dec 3, 2014

(replaces #7339 -- trying to squeeze this in)

Most queries that default to 10 now use the setting, whose valid range
is, for now, 2 to 5000. In order to keep this simple, queries that
default to 20 items will continue showing at least 20 items; the setting
is used only if it’s greater than 20.

Fixes #2650

Most queries that default to 10 now use the setting, whose valid range
is, for now, 2 to 5000. In order to keep this simple, queries that
default to 20 items will continue showing at least 20 items; the setting
is used only if it’s greater than 20.

Fixes Elgg#2650
@ewinslow
Copy link
Contributor

ewinslow commented Dec 3, 2014

Fine with this. Definitely an improvement.

@ewinslow
Copy link
Contributor

ewinslow commented Dec 3, 2014

@jdalsem and @beck24 who reviewed the other PR.

@@ -11,7 +11,7 @@

// YYYYMMDD = Elgg Date
// XX = Interim incrementer
$version = 2014111800;
$version = 2014130300;
Copy link
Member

Choose a reason for hiding this comment

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

huh... why the version bump in this PR?

Copy link
Member

Choose a reason for hiding this comment

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

Because of engine/lib/upgrades/2014130300-1.10.0-add_default_limit-fcef9e7ce01e26a4.php

Copy link
Member

Choose a reason for hiding this comment

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

facepalm

Copy link
Member

Choose a reason for hiding this comment

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

:)

@jdalsem
Copy link
Member

jdalsem commented Dec 4, 2014

Other than the remark on the version it LGTM

@juho-jaakkola
Copy link
Member

I'm not sure about this PR. Do we really want to have a setting that affects every single list that doesn't specify their own limit? Is this useful enough feature?

I doubt the same default limit would work with all the different contents that can be listed on a site.

@jdalsem
Copy link
Member

jdalsem commented Dec 4, 2014

If for some reason that does not work... leave it at 10. This gives you more control (if you need it)

@juho-jaakkola
Copy link
Member

Yes, but this adds new logic to many files. I'm not sure if the ROI for maintaining that logic is worth it.

@mrclay
Copy link
Member Author

mrclay commented Dec 4, 2014

This feature is a reaction to the complexity and sheer amount of API that would be added by #6256, which would give extremely fine-tuned (and too much) control over query $options.

Would you argue that 10 is such a natural number for list length that had you built Elgg from scratch you would hardcode it everywhere?

Is the answer somewhere between these two PRs? Eg the granularity of named queries but limited to changing limit.

@mrclay
Copy link
Member Author

mrclay commented Dec 4, 2014

Because I do think https://github.com/Elgg/Elgg/pull/6256/files is a powerful path to go down if we can have a more reasonable balance of control over the queries.

(But still I think almost all our global constants that affect UI should be able to be altered without too much trouble)

@juho-jaakkola
Copy link
Member

I agree devs should be able to change the limit. I'm just not sure if this is the best way to do it.

@juho-jaakkola
Copy link
Member

I think I'd prefer the named queries, but with a limited amount of options at first.

@mrclay
Copy link
Member Author

mrclay commented Dec 4, 2014

I think this brings a big return to site owners. "Can we show more items per page" is one of the most common questions I get. Worth the maintenance overhead IMO.

@ewinslow
Copy link
Contributor

ewinslow commented Dec 4, 2014

Agreed with Steve.

On Thu Dec 04 2014 at 11:19:35 AM Steve Clay notifications@github.com
wrote:

I think this brings a big return to site owners. "Can we show more items
per page" is one of the most common questions I get. Worth the maintenance
overhead IMO.


Reply to this email directly or view it on GitHub
#7598 (comment).

@juho-jaakkola
Copy link
Member

Ok, I won't block.

@juho-jaakkola
Copy link
Member

How do we get devs to add this to their community plugins?

@jdalsem jdalsem added this to the Elgg 1.10.0 milestone Dec 5, 2014
jdalsem added a commit that referenced this pull request Dec 5, 2014
feature(settings): adds setting for default number of items per page
@jdalsem jdalsem merged commit e312101 into Elgg:1.10 Dec 5, 2014
@Srokap Srokap removed the in progress label Dec 5, 2014
@jdalsem
Copy link
Member

jdalsem commented Dec 5, 2014

How do we get devs to add this to their community plugins?

we could write a small piece on it on docs learn.elgg.org... at least it is in all the bundled plugins so if devs copy/paste it will be good

@mrclay mrclay deleted the default_limit_110 branch April 17, 2016 15:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants