CouchDB
  1. CouchDB
  2. COUCHDB-476

Futon needs to remember rows per page.

    Details

    • Type: Improvement Improvement
    • Status: Reopened
    • Priority: Trivial Trivial
    • Resolution: Unresolved
    • 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
        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
        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
        Simon Thulbourn added a comment -

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

        Show
        Simon Thulbourn added a comment - Yeah, there's also a cookie for the active design view.
        Hide
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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
        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.

          People

          • Assignee:
            Sam Bisbee
            Reporter:
            Simon Thulbourn
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Time Tracking

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

                Development