maqetta/maqetta — Issue #1814: UI tweaks to palettes - bringing palettes to top for particular editors
Author: JonFerraiolo
Created: 2012-02-28 17:06:16+00:00
State: open
Labels: Priority High, Runtime, UI

@jhpedemonte, @peller , @waynevicknair

During today's phone call, we decided we needed to make the following changes to Maqetta's overall UI:

* Instead of Widgets, Files, Reviews at top left, it should be Files, Widgets, Reviews. (This is easily fixed: just cut the Files entry in ve.plugin.js and paste it above the Widgets entry)
* Add a mechanism to ve.plugin.js such that a particular editor can force certain palettes to come to the top. I think this isn't all that hard, either (famous last words). We have the following code in ve.plugin.js (and similar code in review.plugin.js):

```
"davinci.editor": [
{
id: "HTMLPageEditor",
...
},
{
id: "ThemeEditor",
...
}
],
```

What I'm thinking is an optional property for each editor object, such as "palettesToTop", which holds an array of the IDs for various Views (e.g., ```viewID: "davinci.ve.Palette",```) whose tab should be selected when switching to the given editor.

Then, to implement this, I'm pretty sure that _switchEditor() in Workbench.js gets called both when a new editor is opened and when switching to an already open editor by clicking on its tab. So maybe within _switchEditor() we determine the ID of the current editor, and then find its "palettesToTop", and then call the appropriate Dojo code to select the tab that corresponds to that particular palette.