[
https://issues.apache.org/jira/browse/COUCHDB-2401?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Ben Keen updated COUCHDB-2401:
------------------------------
Description:
Now we've moved most content to trays, the code can really be cleaned up.
1. CSS can be largely standardized between them
2. Create a generic Tray component that contains all boilerplate code, like
hide/show/toggle, etc.
3. Refactor: tray open/close events
This last one is small, but significant. 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.
was:
Small thing, but significant. 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.
Summary: Clean up trays code/CSS (was: Refactor: tray open/close
events)
> Clean up trays code/CSS
> -----------------------
>
> 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.
> 1. CSS can be largely standardized between them
> 2. Create a generic Tray component that contains all boilerplate code, like
> hide/show/toggle, etc.
> 3. Refactor: tray open/close events
> This last one is small, but significant. 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)