[Wikitech-l] Finding total results from the Pager class, jumping to x% of the results

2013-06-03 Thread Mark A. Hershberger
For some work I'm doing on a project, I'm using the Pager class. This is really good (and I've learned a lot along the way), but I would like to use a slider (like http://jqueryui.com/slider/) to allow the user to jump to different places in the paged results. I think that to do this right I

Re: [Wikitech-l] Finding total results from the Pager class, jumping to x% of the results

2013-06-03 Thread Brion Vibber
This is a tricky one to get right; we try to make pagers work on natural indices like timestamps, revision ids, or namespace/title pairs. As such, it's *easy* to look up the first and last entries but very hard to find the 50% entry. If it's something time-based you can fairly easily hook up a

Re: [Wikitech-l] Finding total results from the Pager class, jumping to x% of the results

2013-06-03 Thread Mark A. Hershberger
On 06/03/2013 02:09 PM, Brion Vibber wrote: This is a tricky one to get right I'm glad it isn't just me. :) If it's something time-based you can fairly easily hook up a slider to a date/time range, but there's no guarantee there'll be even numbers of items on each side. I'll look at what I

Re: [Wikitech-l] Finding total results from the Pager class, jumping to x% of the results

2013-06-03 Thread Brion Vibber
On Mon, Jun 3, 2013 at 11:18 AM, Mark A. Hershberger m...@everybody.orgwrote: IndexPager would let you dive right in to a row offset for any index type, but would be much more expensive in lookups on the table (and leaves unstable URLs whose contents change as the database changes).

Re: [Wikitech-l] Finding total results from the Pager class, jumping to x% of the results

2013-06-03 Thread Mark A. Hershberger
On 06/03/2013 05:46 PM, Brion Vibber wrote: I'm not too worried about unstable URLs at this point (maybe later), but do you have an example for row offsets? I'm probably missing something, but I don't see an easy way to get the total # of rows at this point. Since I'm using an older version