You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by benkeen <gi...@git.apache.org> on 2014/12/31 03:56:15 UTC

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

GitHub user benkeen opened a pull request:

    https://github.com/apache/couchdb-fauxton/pull/210

    Keep track of sidebar status

    This is a simple usability fix: it keeps track of whether the user
    has expanded or shrunk the sidebar so on future refreshes it
    doesn't revert to the wrong state.

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

    $ git pull https://github.com/benkeen/couchdb-fauxton track-sidebar-status

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

    https://github.com/apache/couchdb-fauxton/pull/210.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 #210
    
----
commit 47404ff7316e89cd8342a7159eb4ab7ee842ff72
Author: Benjamin Keen <be...@gmail.com>
Date:   2014-12-31T02:53:40Z

    Keep track of sidebar status
    
    This is a simple usability fix: it keeps track of whether the user
    has expanded or shrunk the sidebar so on future refreshes it
    doesn't revert to the wrong state.

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/210#issuecomment-68832058
  
    @benkeen this is a nice idea. The code needs some neatening up. Rather create an object that hides away the fact that you using localStorage to keep state. The api could be something like:
    
        SideBarState = {
          isMinimized: function () { .... },
          setState: function () {....}
        };
    
    Then instead of reading the stored state and setting it in main.js rather do that in Fauxton/base.js. I think thats a better place to do that. Most likely in the module initialise method.


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

Posted by garrensmith <gi...@git.apache.org>.
Github user garrensmith commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/210#issuecomment-69143218
  
    +1 That is a nice solution. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/210#issuecomment-68889145
  
    Good idea @garrensmith, will do!


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/couchdb-fauxton/pull/210


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/210#issuecomment-68761254
  
    @garrensmith, this look okay to you? Checking local storage in main.js is a little new, so I wanted to run it by you before merging. 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

Posted by michellephung <gi...@git.apache.org>.
Github user michellephung commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/210#issuecomment-68727980
  
    this works +1


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] couchdb-fauxton pull request: Keep track of sidebar status

Posted by benkeen <gi...@git.apache.org>.
Github user benkeen commented on the pull request:

    https://github.com/apache/couchdb-fauxton/pull/210#issuecomment-69113675
  
    Hey @garrensmith, I think it's better now. I didn't end up using a separate object for the state, but instead just made all the changes within the NavBar View, which I think makes sense. It sets tracks it's own state as it's toggled and uses that info when first rendered during `initialize()`. Mind taking a glance? 


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---