Categories

Sorted tray into categories.
Just a thought: why not let the tagging system tell you which elements fit
into each category?
On Jun 24, 2014 3:10 PM, "Simon Wex" <notifications@github.com> wrote:

> In public/designer/js/component-tray.js:
>
> > @@ -18,14 +18,21 @@ define(
> >      };
> >
> >      var knownComponents = [];
> > +    var tags = [];
> > +    var categories = {};
> > +
> > +    // Component Categories
> > +    categories.names = ["Basic","Layout","Connectors","Audio","Logic","Media","Other"];
> > +    categories.basic = ["ceci-button","ceci-header","ceci-counter","ceci-metronome","ceci-image"];
> > +    categories.layout = ["ceci-button-with-confirmation","ceci-button","ceci-double-button","ceci-image","ceci-textbox","ceci-spacer","ceci-header"];
> > +    categories.navigation = ["ceci-button","ceci-header"];
> > +    categories.connectors = ["ceci-transformer","ceci-channel-gate","ceci-alternating-gate","ceci-splitter","ceci-combiner"];
> > +    categories.audio = ["ceci-snaredrum","ceci-audio","ceci-metronome","ceci-cowbell","ceci-kickdrum","ceci-sequencer","ceci-microphone-button"];
> > +    categories.logic = ["ceci-daily-counter","ceci-counter","ceci-random","ceci-bool"];
> > +    categories.media = ["ceci-meatspaces-messages","ceci-meatspaces-input","ceci-hot-potato","ceci-text-input","ceci-notebook","ceci-todo-list","ceci-component-canvas","ceci-camera-button","ceci-chat-window","ceci-fireworks","ceci-jazzhands","ceci-pad-grid","ceci-chart"];
>
> @flukeout <https://github.com/flukeout> a more readable and maintainable
> way to write this is:
>
> var categories = {
>   "Basic": ["ceci-button", "ceci-header", ..],
>   "Layout": [...
>
> —
> Reply to this email directly or view it on GitHub
> <https://github.com/mozilla-appmaker/appmaker/pull/1540/files#r14148791>.
>