Github user benkeen commented on a diff in the pull request:

    https://github.com/apache/couchdb-fauxton/pull/230#discussion_r23398775
  
    --- Diff: app/addons/documents/views.js ---
    @@ -453,25 +458,31 @@ function(app, FauxtonAPI, Components, Documents, 
Databases, Views, QueryOptions)
           }
     
           this.toggleTrash();
    +      this.updateExpandButtonLabel();
         },
     
         serialize: function() {
           return {
             viewList: this.viewList,
    -        expandDocs: this.expandDocs,
             endOfResults: !this.pagination.canShowNextfn()
           };
         },
     
    -    collapse: function (event) {
    -      event.preventDefault();
    +    toggleExpandCollapse: function (e) {
    +      e.preventDefault();
    +      var expand = this.$(e.target).find("i").hasClass('icon-plus');
     
    -      if (this.expandDocs) {
    -        this.expandDocs = false;
    --- End diff --
    
    Yeah... I kinda agree. I'll change this.
    
    One thing though: I never liked the simple toggling of a boolean to keep 
track of something - I've found it can lead to problems when there's disconnect 
between what's in the var, and the reality of what's actually in the DOM. But I 
guess this'll be eliminated once we're using react state, which will have a 1-1 
relation.


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to