You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@couchdb.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2014/11/07 22:47:34 UTC

[jira] [Commented] (COUCHDB-2401) Create generic Tray component

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

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

GitHub user benkeen opened a pull request:

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

    Create generic Tray component

    This moves a lot of the logic from the individual trays (Add Database,
    Query Options, API Url) and into a generic Tray component.
    
    *** Note: the trays should function exactly as before. ***
    
    Closes COUCHDB-2401

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

    $ git pull https://github.com/benkeen/couchdb-fauxton 2401-create-generic-tray-component

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

    https://github.com/apache/couchdb-fauxton/pull/141.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 #141
    
----
commit 129610d69a24c1e1cc0d1bab5901ba5619121131
Author: Benjamin Keen <be...@gmail.com>
Date:   2014-11-07T21:43:58Z

    Create generic Tray component
    
    This moves a lot of the logic from the individual trays (Add Database,
    Query Options, API Url) and into a generic Tray component.
    
    Closes COUCHDB-2401

----


> Create generic Tray component
> -----------------------------
>
>                 Key: COUCHDB-2401
>                 URL: https://issues.apache.org/jira/browse/COUCHDB-2401
>             Project: CouchDB
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Fauxton
>            Reporter: Ben Keen
>            Assignee: Ben Keen
>
> Now we've moved most content to trays, the code can really be cleaned up. Create a generic Tray component that contains all boilerplate code, like hide/show/toggle, etc.
> Right now we're explicitly telling other components to do things, like in the Query Options / API Bar that tell eachother to close if they're about to be opened: 
> FauxtonAPI.Events.trigger("APIbar:closeTray");
> Now that the Add New Database is going to be a tray as well, I'd like to improve this. Namely, all of them would publish the same events:
> FauxtonAPI.Events.trigger("Tray:open"); // this would actually be a constant, like C.EVENT.TRAY.OPEN
> FauxtonAPI.Events.trigger("Tray:close"); // C.EVENT.TRAY.CLOSE
> They would then use that to subscribe to ANY tray's open event, and know to close itself if another's being opened. The benefits are that a component doesn't need to know about other components (loose coupling yay). And going forth it would mean less code.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)