couchdb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (COUCHDB-2187) Page size doesn't changes if view is limited with lower value
Date Fri, 07 Mar 2014 10:31:43 GMT

    [ https://issues.apache.org/jira/browse/COUCHDB-2187?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13923752#comment-13923752
] 

ASF GitHub Bot commented on COUCHDB-2187:
-----------------------------------------

GitHub user willholley opened a pull request:

    https://github.com/apache/couchdb/pull/168

    Store the initial collection parameters to allow a safe reset to the first page (COUCHDB-2187)

    When adjusting page size, the desired behaviour is to navigate back to the first page
of the collection. This was previously achieved by parsing the browser URL to get the query
parameters but that does not capture additional defaults that are set in JavaScript (such
as reduce=false for views).
    
    This commit adds 2 new methods to the document collections via a mixin:
    
    saveDefaultParameters()
    restoreDefaultParameters()
    
    When each collection is initialized, we save the parameters which represent the initial
state - these can then be restored when the page size is changed.
    
    Fixes COUCHDB-2187.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/willholley/couchdb 2187-views-pagination-implicitly-applies-reduce-function

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/couchdb/pull/168.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #168
    
----
commit adf9ae25c6be1c654fededfc72350b48abfda1de
Author: Will Holley <willholley@gmail.com>
Date:   2014-03-07T10:16:19Z

    Store the initial collection parameters to allow a safe reset to the first page.
    
    When adjusting page size, the desired behaviour is to navigate back to the
    first page of the collection. This was previously done using the browser
    URL but that does not capture additional defaults that are set in JavaScript.
    
    This commit adds 2 new methods to the document collections:
    
    saveDefaultParameters()
    restoreDefaultParameters()
    
    When each collection is initialized, we save the parameters (which represent the
    initial state) - these can then be correctly restored when the page size is changed.
    
    Fixes COUCHDB-2187.

----


> Page size doesn't changes if view is limited with lower value
> -------------------------------------------------------------
>
>                 Key: COUCHDB-2187
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2187
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Alexander Shorin
>
> 1. Open any database
> 2. Click Query options
> 3. Set limit as, say, 20
> 3.1 or add ?limit=20 to URL and hit Enter
> 4. Set page size 10 - note changes. 
> 5. Set page size 30 - nothing changes. Try 50 and 100 too and notice that nothing changes.
> 6. Get back to 20 - page size now is changed.
> Fauxton @ [4e60f0b|https://git-wip-us.apache.org/repos/asf?p=couchdb.git;a=commit;h=4e60f0b]



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Mime
View raw message