4.0.13 • Published 2 months ago

goblin-desktop v4.0.13

Weekly downloads
1
License
MIT
Repository
-
Last release
2 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.12

2 months ago

4.0.13

2 months ago

4.0.9

3 months ago

4.0.8

4 months ago

4.0.5

6 months ago

4.0.4

6 months ago

4.0.7

6 months ago

4.0.3

6 months ago

4.0.2

7 months ago

4.0.1

7 months ago

3.1.3

1 year ago

3.1.2

1 year ago

3.1.5

1 year ago

3.1.4

1 year ago

3.0.3

1 year ago

3.1.1

1 year ago

3.1.0

1 year ago

2.1.2

2 years ago

2.1.1

2 years ago

2.1.4

1 year ago

2.1.3

1 year ago

2.1.0

2 years ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

2.0.19

2 years ago

2.0.18

2 years ago

2.0.24

2 years ago

2.0.22

2 years ago

2.0.20

2 years ago

2.0.21

2 years ago

2.0.16

2 years ago

2.0.15

2 years ago

2.0.14

2 years ago

2.0.13

2 years ago

2.0.11

2 years ago

2.0.7

2 years ago

2.0.12

2 years ago

2.0.6

3 years ago

2.0.9

2 years ago

2.0.10

2 years ago

2.0.8

2 years ago

2.0.5

3 years ago

2.0.2

3 years ago

2.0.0

3 years ago

1.1.1

3 years ago

1.1.0

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago