Skip to content

Commit 9ecd531

Browse files
authored
feat(modeler/element-templates): add details for deprecated property
Related to camunda/camunda-modeler#5388
1 parent 6e9c1ab commit 9ecd531

File tree

2 files changed

+63
-3
lines changed

2 files changed

+63
-3
lines changed

docs/components/modeler/element-templates/template-metadata.md

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ A property can be assigned to a group by setting the [`group` key](./template-pr
202202

203203
```json
204204
{
205-
...,
205+
...,
206206
"groups": [
207207
{
208208
"id": "definition",
@@ -231,7 +231,33 @@ A property can be assigned to a group by setting the [`group` key](./template-pr
231231

232232
## Deprecating a template: `deprecated`
233233

234-
Indicates whether the element template is deprecated.
234+
- `deprecated` is an optional key.
235+
236+
Use `deprecated` to mark a [template as deprecated](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#deprecation).
237+
238+
:::info
239+
By deprecating an element template, you prevent its _future use_. Users will no longer see the template when choosing a template, changing an element's type, or creating a new element. Existing uses continue to work, with a deprecation hint shown in the modeler UI.
240+
:::
241+
242+
The `deprecated` property can be an object or a boolean. If an object, it has the following attributes:
243+
244+
- `message: String`: A message to display to the user
245+
- `documentationRef : String`: A link to documentation, i.e., to describe upgrade migration procedures
246+
247+
This information allows users to make sense of the deprecation and understand how to migrate to an undeprecated template:
248+
249+
```json
250+
{
251+
...,
252+
"deprecated": {
253+
"message": "Migrate to My Other Custom Task",
254+
"documentationRef": "https://localhost/migrate-to-other"
255+
},
256+
...
257+
}
258+
```
259+
260+
When `deprecated` is a boolean (`true`), a deprecation hint appears in the properties panel without further help for the user:
235261

236262
```json
237263
{
@@ -240,3 +266,7 @@ Indicates whether the element template is deprecated.
240266
...
241267
}
242268
```
269+
270+
:::tip
271+
Review the [upstream documentation](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#overview) to learn more about template evolution and the template lifecycle.
272+
:::

versioned_docs/version-8.8/components/modeler/element-templates/template-metadata.md

Lines changed: 31 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,7 +231,33 @@ A property can be assigned to a group by setting the [`group` key](./template-pr
231231

232232
## Deprecating a template: `deprecated`
233233

234-
Indicates whether the element template is deprecated.
234+
- `deprecated` is an optional key.
235+
236+
Use `deprecated` to mark a [template as deprecated](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#deprecation).
237+
238+
:::info
239+
By deprecating an element template, you prevent its _future use_. Users will no longer see the template when choosing a template, changing an element's type, or creating a new element. Existing uses continue to work, with a deprecation hint shown in the modeler UI.
240+
:::
241+
242+
The `deprecated` property can be an object or a boolean. If an object, it has the following attributes:
243+
244+
- `message: String`: A message to display to the user
245+
- `documentationRef : String`: A link to documentation, i.e., to describe upgrade migration procedures
246+
247+
This information allows users to make sense of the deprecation and understand how to migrate to an undeprecated template:
248+
249+
```json
250+
{
251+
...,
252+
"deprecated": {
253+
"message": "Migrate to My Other Custom Task",
254+
"documentationRef": "https://localhost/migrate-to-other"
255+
},
256+
...
257+
}
258+
```
259+
260+
When `deprecated` is a boolean (`true`), a deprecation hint appears in the properties panel without further help for the user:
235261

236262
```json
237263
{
@@ -240,3 +266,7 @@ Indicates whether the element template is deprecated.
240266
...
241267
}
242268
```
269+
270+
:::tip
271+
Review the [upstream documentation](https://github.com/bpmn-io/element-templates/blob/main/docs/LIFE_CYCLE.md#overview) to learn more about template evolution and the template lifecycle.
272+
:::

0 commit comments

Comments
 (0)