apache / couchdb-fauxton

Fauxton is the new Web UI for CouchDB

Home Page:https://github.com/apache/couchdb-fauxton

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Feature: please make pagination stateless (i.e. store page number in url)

YakovL opened this issue · comments

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").

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