split workspace stories

This commit is contained in:
Mads Rasmussen
2023-03-01 14:45:24 +01:00
parent 5007445903
commit 6d303638f2
5 changed files with 76 additions and 18 deletions

View File

@@ -105,6 +105,7 @@ export const parameters = {
'Section Sidebar Items',
'Entity Actions',
'Workspaces',
['Intro', 'Views', 'Actions', '*'],
'Property Editors',
'Repositories',
'*',

View File

@@ -52,6 +52,8 @@ interface UmbHeaderAppElement {}
{}
```
**Default Element**
```ts
// TODO: get interface
interface UmbButtonHeaderAppElement {}

View File

@@ -0,0 +1,40 @@
import { Meta } from '@storybook/addon-docs';
<Meta
title="Guides/Extending the Backoffice/Workspaces/Actions"
parameters={{ previewTabs: { canvas: { hidden: true } } }}
/>
# Workspace Actions
// TODO: intro to workspace actions
- Relates to a workspace alias (Umb.Workspace.Document).
- Performs the action on the workspace draft state.
- Has Access to the workspace context.
<img src="docs/workspace-actions.svg" width="400" />
**Manifest**
```json
{
"type": "workspaceAction",
"alias": "My.WorkspaceAction.Workspace.Action",
"name": "My Workspace Action",
"meta": {
"workspaces": ["My.Workspace"],
"label": "Run",
"look": "primary",
"color": "positive",
},
},
```
**Default Element**
```ts
// TODO: get interface
interface UmbWorkspaceActionElement {}
```

View File

@@ -1,6 +1,9 @@
import { Meta } from '@storybook/addon-docs';
<Meta title="Guides/Extending the Backoffice/Workspaces" parameters={{ previewTabs: { canvas: { hidden: true } } }} />
<Meta
title="Guides/Extending the Backoffice/Workspaces/Intro"
parameters={{ previewTabs: { canvas: { hidden: true } } }}
/>
# Workspaces
@@ -19,22 +22,6 @@ TODO: add description of a workspace
interface UmbWorkspaceElement {}
```
## Workspace Views
TODO: descrtibe workspace views
<img src="docs/workspace-views.svg" width="400" />
```ts
// TODO: get typescript interface
```
## Workspace Actions
<img src="docs/workspace-actions.svg" width="400" />
Relates to a workspace alias (Umb.Workspace.Document). Performs the action on the workspace draft state.
## The Workspace Context
```ts
@@ -42,6 +29,6 @@ Relates to a workspace alias (Umb.Workspace.Document). Performs the action on th
interface UmbWorkspaceContext {}
```
#### Examples of workspaces:
## Examples of workspaces:
TODO: link to all workspaces in storybook. Can we somehow auto-generate this list?

View File

@@ -0,0 +1,28 @@
import { Meta } from '@storybook/addon-docs';
<Meta
title="Guides/Extending the Backoffice/Workspaces/Views"
parameters={{ previewTabs: { canvas: { hidden: true } } }}
/>
# Workspace Views
TODO: add description of a workspace views
<img src="docs/workspace-views.svg" width="400" />
**Manifest**
```json
{
"type": "workspaceView",
"alias": "My.WorkspaceView",
"name": "My Workspace View",
"meta": {
"workspaces": ["My.Workspace"],
"label": "My View",
"pathname": "/my-view"
},
},
```