4.0.24 • Published 10 months ago

goblin-desktop v4.0.24

Weekly downloads
1
License
MIT
Repository
-
Last release
10 months ago

Goblin Desktop

"It is not for gnomes..."

Provide simple API for adding contexts, tabs, tasks, forms, status, notifications, hinters...

Creating a desktop

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
});

create (labId)

labId (string)

The famouse laboratory identifier looks like: laboratory@some-long-uuid-v4

Describing the desktop

addContext (context)

Adding context:

const docContext = {contextId: 'doc', name: 'Doc'};
desktop.addContext(docContext);

context (context object)

  • contextId: a context identifier, lower-case, used for retreiving context tasks js files

  • name: the displayed name

Describe context tasks

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',
    },
  },
];

Creating tabs

Minimal tab API:

desktop.addTab({
  name: 'New tab',
  contextId: 'some-context',
  view: 'default',
  workitemId: 'content@exemple-uuid-v4',
});

addTab (tab)

tab (tab object)

  • 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

Working withs form and hinters

todo

Navigating

4.0.19

11 months ago

4.0.21

10 months ago

4.0.23

10 months ago

4.0.22

10 months ago

4.0.24

10 months ago

4.0.18

11 months ago

4.0.17

1 year ago

4.0.14

1 year ago

4.0.12

1 year ago

4.0.13

1 year ago

4.0.9

1 year ago

4.0.8

2 years ago

4.0.5

2 years ago

4.0.4

2 years ago

4.0.7

2 years ago

4.0.3

2 years ago

4.0.2

2 years ago

4.0.1

2 years ago

3.1.3

2 years ago

3.1.2

2 years ago

3.1.5

2 years ago

3.1.4

2 years ago

3.0.3

3 years ago

3.1.1

3 years ago

3.1.0

3 years ago

2.1.2

3 years ago

2.1.1

3 years ago

2.1.4

3 years ago

2.1.3

3 years ago

2.1.0

3 years ago

3.0.2

3 years ago

3.0.1

3 years ago

3.0.0

3 years ago

2.0.19

3 years ago

2.0.18

3 years ago

2.0.24

3 years ago

2.0.22

3 years ago

2.0.20

3 years ago

2.0.21

3 years ago

2.0.16

3 years ago

2.0.15

3 years ago

2.0.14

4 years ago

2.0.13

4 years ago

2.0.11

4 years ago

2.0.7

4 years ago

2.0.12

4 years ago

2.0.6

4 years ago

2.0.9

4 years ago

2.0.10

4 years ago

2.0.8

4 years ago

2.0.5

4 years ago

2.0.2

4 years ago

2.0.0

4 years ago

1.1.1

5 years ago

1.1.0

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago