Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-476

Futon needs to remember rows per page.

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Trivial
    • Resolution: Won't Fix
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: Futon
    • Labels:
      None
    • Environment:

      *

    • Skill Level:
      New Contributors Level (Easy)

      Description

      It would be nice if futon remembered the "rows per page" selection for every time you used it.

      This would be trivial to do, by using a cookie.

      I'll look into it after work.

        Activity

        Hide
        djc Dirkjan Ochtman added a comment -

        I think we already keep a cookie for recently used databases, so we could just add it to that.

        Show
        djc Dirkjan Ochtman added a comment - I think we already keep a cookie for recently used databases, so we could just add it to that.
        Hide
        sthulbourn Simon Thulbourn added a comment -

        Yeah, there's also a cookie for the active design view.

        Show
        sthulbourn Simon Thulbourn added a comment - Yeah, there's also a cookie for the active design view.
        Hide
        sthulbourn Simon Thulbourn added a comment -

        Here's a patch that changes it globally for 30 days, but I'm unsure if it's needed, I found out that futon does this already for a database during a session. I guess I've just never noticed it.

        Show
        sthulbourn Simon Thulbourn added a comment - Here's a patch that changes it globally for 30 days, but I'm unsure if it's needed, I found out that futon does this already for a database during a session. I guess I've just never noticed it.
        Hide
        sbisbee Sam Bisbee added a comment -

        Could someone please close this as a non issue? Futon already remembers rows-per-page as Simon mentions, which I also confirmed on Chromium.

        Show
        sbisbee Sam Bisbee added a comment - Could someone please close this as a non issue? Futon already remembers rows-per-page as Simon mentions, which I also confirmed on Chromium.
        Hide
        janl Jan Lehnardt added a comment -

        It looks like Futon maintains rows per page per db. at least here (in safari), two dbs and two different rpps are maintained.

        Show
        janl Jan Lehnardt added a comment - It looks like Futon maintains rows per page per db. at least here (in safari), two dbs and two different rpps are maintained.
        Hide
        sbisbee Sam Bisbee added a comment -

        Closing as Cannot Reproduce for now.

        If someone can reproduce then please re-open with browser information (name, version, etc.).

        Show
        sbisbee Sam Bisbee added a comment - Closing as Cannot Reproduce for now. If someone can reproduce then please re-open with browser information (name, version, etc.).
        Hide
        kxepal Alexander Shorin added a comment -

        Reproduced using Firefox 10.0, Chromium 18.0.1025.33, Opera 11.61 and 12.00 alpha, on Linux x86_64 against CouchDB 1.0.2 release, 1.2.0a-0d8ddc8-git and 1.3.0a-32a67c1-git.

        Same thing on Windows for Chrome 16.0.912.75 and IE-8 against same CouchDB instances.

        For all cases rows-per-page value was keeped only for current tab session. Or what I'm doing wrong?(:

        Show
        kxepal Alexander Shorin added a comment - Reproduced using Firefox 10.0, Chromium 18.0.1025.33, Opera 11.61 and 12.00 alpha, on Linux x86_64 against CouchDB 1.0.2 release, 1.2.0a-0d8ddc8-git and 1.3.0a-32a67c1-git. Same thing on Windows for Chrome 16.0.912.75 and IE-8 against same CouchDB instances. For all cases rows-per-page value was keeped only for current tab session. Or what I'm doing wrong?(:
        Hide
        sbisbee Sam Bisbee added a comment -

        Bah, now I'm seeing it happen on a different computer/browser combo: the rows-per-page is sticking for individual database pages, but does not carry over to all database pages.

        Sounds like a classic case of not just browser support but different browser/OS configurations.

        I'll hack something together tonight that uses cookies.

        Show
        sbisbee Sam Bisbee added a comment - Bah, now I'm seeing it happen on a different computer/browser combo: the rows-per-page is sticking for individual database pages, but does not carry over to all database pages. Sounds like a classic case of not just browser support but different browser/OS configurations. I'll hack something together tonight that uses cookies.
        Hide
        sbisbee Sam Bisbee added a comment -

        This patch tells Futon's "storage system" to store per_page in the cookie instead of `window`.

        The patch is also available on my github branch: https://github.com/sbisbee/couchdb/commit/e372836692f41926e56ec4d78d03b9fda364f09e

        Cheers.

        Show
        sbisbee Sam Bisbee added a comment - This patch tells Futon's "storage system" to store per_page in the cookie instead of `window`. The patch is also available on my github branch: https://github.com/sbisbee/couchdb/commit/e372836692f41926e56ec4d78d03b9fda364f09e Cheers.
        Hide
        jameshowe James Howe added a comment -

        A good system is to use window.localStorage if it's defined, and fallback to cookies if it isn't. This keeps the request headers free from unnecessary data that the server doesn't care about.

        Show
        jameshowe James Howe added a comment - A good system is to use window.localStorage if it's defined, and fallback to cookies if it isn't. This keeps the request headers free from unnecessary data that the server doesn't care about.
        Hide
        sbisbee Sam Bisbee added a comment -

        Hi James,

        I don't disagree, but that's not how the futon storage system current works. It uses either memory (the window object) or cookies. It could be extended to support localStorage, but that's for another ticket.

        Cheers.

        Show
        sbisbee Sam Bisbee added a comment - Hi James, I don't disagree, but that's not how the futon storage system current works. It uses either memory (the window object) or cookies. It could be extended to support localStorage, but that's for another ticket. Cheers.
        Hide
        wohali Joan Touzet added a comment -

        Futon will be EOL'ed in favour of Fauxton. If Fauxton does not remember number of rows per page, we should create a new ticket to cover that request.

        Show
        wohali Joan Touzet added a comment - Futon will be EOL'ed in favour of Fauxton. If Fauxton does not remember number of rows per page, we should create a new ticket to cover that request.

          People

          • Assignee:
            wohali Joan Touzet
            Reporter:
            sthulbourn Simon Thulbourn
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Time Tracking

              Estimated:
              Original Estimate - 48h
              48h
              Remaining:
              Remaining Estimate - 48h
              48h
              Logged:
              Time Spent - Not Specified
              Not Specified

                Development