Goal
Our goal of this walkthrough is to show how to set up a Proofreading Task Dashboard with Realtime Collaboration.
Key features
- You have your own dashboard with your own design card
- Your dashboard will be updated in realtime (when a task changes)
- You can change the priority of a proofreading task
Guide
1) Add your own metadata field on the server
As a first step, you have to configure a proofreading task metadata field. Later this field will be used to show documents on the right place on the proofreading dashboard (sort order, filter, status)
metadata: [
{
// handle of the proofreading metadata field
handle: 'my-proofreading',
type: 'li-task-v2',
config: {
label: 'My Proofreading',
realtimeNotification: true,
showInTaskList: true,
// handle of the proofreading dashboard (the dashboard will be configured later in the editor)
linkToDashboard: 'my-kanban-proofreading',
setPriority: true
}
}
]
References:
Add my-proofreading to Elasticsearch
The metadata field my-proofreading
should be searchable by the proofreading dashboard later. Therefore you have to extend the Elasticsearch document mapping.
You will find an example on the server.
2) Register your custom dashboard on the editor
As a second step you have to register a custom dashboard in the project config.
dashboards: [
{
handle: 'my-kanban-proofreading',
type: 'taskBoard',
pageTitle: 'My Proofreading',
// This is the name of the previously added metadata field on the server
taskName: 'my-proofreading',
displayFilters: ['documentState', 'timeRange']
}
]
References:
3) Add your custom dashboard to the menu
As third step you can add the custom dashboard to the main navigation.
{
label: 'My Proofreading',
// 'my-kanban-proofreading' is the dashboard handle configured in the last step
dashboard: 'my-kanban-proofreading',
icon: 'file-document'
}
🎉 After you have added your dashboard to the menu, you have a working custom realtime dashboard filtered by your custom metadata field 🎉
How to test it
- go to the tasks feature in the top bar of an article and change the status of your task
- go to the
My Proofreading
dashboard via the menu and look if your task is on the board
References:
4) Customise a card on the dashboard
If the default dashboard card for proofreading dashboards doesn’t meet all your requirements, you can bring your own dashboard card, which can differ both in design and behaviour.
To do so, you need to create and register a custom Vue component of type dashboardCard
in your downstream editor project. You can refer to one of our default dashboard cards (e.g. LiDocumentListCard
) to understand how to write such a component.
app.vueComponentRegistry.registerComponent({
type: 'dashboardCard',
name: 'myProofreadingCard',
component: require('./li-proofreading-card.vue').default
})
Finally, you need to reference this component in the project config by setting componentName
of your dashboard to your component’s name.
dashboards: [
{
handle: 'my-kanban-proofreading',
componentName: 'myProofreadingCard',
// ...
}
]