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: please make pagination stateless (i.e. store page number in url) #1389

Open
YakovL opened this issue Feb 11, 2023 · 1 comment
Open

Comments

@YakovL
Copy link

YakovL commented Feb 11, 2023

There are multiple issues why this feature would be helpful:

  • after editing a document, user is returned to the first page so if the doc was on the 10th page, returning there requires many clicks
  • there's a bug: if "next" button of pagination is clicked again before page is loaded, the document numbers are incremented while the page itself is not. For a DB with 500 docs it's possible to get a "Showing document 1900 - 2000" by just clicking ">" too fast
  • finally having page number in url is helpful in other workflows as one can copy a link and then return to that page

Expected Behavior

In /_utils/#database/db-name/_all_docs , switching a page should add something like ?pageSize=50&pageNumber=2 to url. When pageSize & pageNumber are set in query, the corresponding page is opened.

When editing a document (after clicking Save Changes/Cancel), user should be returned to the page where they came from (pageNumber=XX should be kept)

Current Behavior, Possible Solution

See above

Context

While developing an app using CouchDB, checking if expected changes were applied indeed and editing data to see how it is reflected in UI is highly hindered by the issues mentioned above.

Environment

  • Version used: 3.2.2 (not sure if it's version of CouchDB or Fauxton or they are the same)
  • Browser: Vivaldi 5.6
  • OS: Windows 10 Pro 64 bit
  • Link to your project: n/a yet

PS

Relevant bits of code that I've found so far:

It would be also helpful to see the total number of docs (like "Showing document 1 - 100" → "Showing document 1 - 100 of 527").

@big-r81
Copy link
Contributor

big-r81 commented Feb 13, 2023

Linking a similiar issue from the main repo: apache/couchdb#4403

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants