"It is not for gnomes..."
Provide simple API for adding contexts, tabs, tasks, forms, status, notifications, hinters...
Usualy we create a desktop in a start quest, for a laboratory:
// Create a desktop for laboratory
const desktop = yield quest.createFor ('laboratory', labId, 'desktop', {
labId: lab.id
});
The famouse laboratory identifier looks like: laboratory@some-long-uuid-v4
Adding context:
const docContext = {contextId: 'doc', name: 'Doc'};
desktop.addContext(docContext);
-
contextId: a context identifier, lower-case, used for retreiving context tasks js files
-
name: the displayed name
You can write a tasks.js
file in a folder named like the context id, in the
widgets directory:
// exemple path for this file:
// goblin-name/widgets/codispatch/tasks.js
export default [
{
text: 'Search',
glyph: 'solid/search',
workitem: {
name: 'mission-search',
icon: 'solid/search',
kind: 'tab',
isClosable: true,
navigate: true,
},
},
{
text: 'Mission',
glyph: 'solid/plus',
workitem: {
name: 'mission-workflow',
},
},
];
Minimal tab API:
desktop.addTab({
name: 'New tab',
contextId: 'some-context',
view: 'default',
workitemId: 'content@exemple-uuid-v4',
});
-
name: the displayed name
-
contextId: a context identifier, where the tab will be displayed
-
view: name of the view, when the tab is clicked, import a
view.js
from a folder, named with this value -
workitemId: a unique identifier for wiring a workitem (an existing goblin instance widget) in the selected view
-
closable: if true, show a close button and notify close request
-
navigate: if true, navigate the current view directly the tab workitem view
todo