DataTables / DataTables/Plugins
Need a trade-off between simple and full numbers pagination
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 1.1k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
Currently we have two main options for pagination:
- Simple/four_button that is simple and efficient don't need any calculation, user naturally navigates through the pages by clicking next button, but it is hard to go back because he can either go to previous page or need to return to first page.
- Full numbers that is easier for navigation but we need to know total number of rows. In server side processing mode this usually requires two database calls one to get the current page, and the second that gets total number for pagination, which might slow down response. Also, this type is too powerful - it is hard to imagine that regular user would navigate through the pages by clicking directly on 5th page without visiting first four pages.
It would be good to to have trade off between these two types. Something that will start as simple buttons without numbers, allow user to go to next page with Next button, but also to dynamically remember page numbers that he visited and put visited numbers between prev and next. This way user would natural navigate through the pages, have ability to go bag to any previous page. In addition, we don't need the last page to statically calculate last one so the response time is faster.
I'm using this pagination type with Bootstrap and I have submitted pull request here: https://github.com/DataTables/Plugins/pull/328
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing the existing DataTables pagination plug-ins and the proposed implementation in DataTables/Plugins pull request #328. Compare the simple/four_button and full-number approaches with the requested remembered-page behavior; done means users can navigate forward and return to visited pages without calculating the final page.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100