Skip to content

Commit 9b9b381

Browse files
authored
Update annotations -> notes in docs to correspond with updates to UI (#292)
* Update docs to reflect update to notes (aka annotations) * Update V4 notes docs and update internal docs links to notes page * Fix URL
1 parent 19920eb commit 9b9b381

File tree

6 files changed

+35
-41
lines changed

6 files changed

+35
-41
lines changed

docs/annotations.mdx

Lines changed: 12 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,32 @@
11
---
2-
title: Annotations
2+
title: Notes
33
---
44

5-
import EmbedMachine from '@site/src/components/EmbedMachine';
6-
7-
Annotations are notes you can use to annotate your machine, positioned anywhere inside your machine. Annotations are useful for information or comments you want to add to your machine that are only visible inside Stately Studio and not included when you export as code.
5+
You can use notes to annotate your machine, positioned anywhere inside your machine. Notes are useful for information or comments you want to add to your machine that are only visible inside Stately Studio and not included when you export as code.
86

97
<EmbedMachine
108
embedURL="https://stately.ai/registry/editor/embed/5b170468-d66a-4136-84c8-676c8fea82e8?machineId=7879be19-d267-4e75-9a7d-6a870d540257"
119
name="Annotated dog walk machine"
1210
/>
1311

14-
Unlike [**descriptions**](descriptions.mdx), annotations don’t need to be connected to a state or transition and can be added or positioned anywhere inside your machine.
12+
Notes are formatted with Markdown so you can add links, images, and other formatting to your annotations.
1513

1614
:::tip
1715

18-
For now, annotations only support plain text. If you want to include text formatting, links, or images, [use **descriptions**, which have markdown support](descriptions.mdx).
16+
Unlike [**descriptions**](descriptions.mdx), notes don’t need to be connected to a state or transition and can be added or positioned anywhere inside your machine.
1917

2018
:::
2119

22-
## Add annotations to your machine
23-
24-
You can add annotations anywhere on your machine from **Design** and **Simulate** mode, but you can only edit them in **Design** mode.
25-
26-
Annotations are unrelated to a state or transition. Still, their layout position is connected to the closest root or parent state when you create them, which helps give your annotations enough space in the auto layout.
20+
## Add notes to your machine
2721

28-
1. Right-click anywhere on the canvas to open the canvas menu.
29-
2. Choose **Add annotation** to create a new annotation on the canvas.
30-
3. Type your annotation text into the annotation.
22+
You can add notes anywhere on your machine from **Design** and **Simulate** mode, but you can only edit them in **Design** mode.
3123

32-
## Edit annotations
24+
Notes are unrelated to a state or transition. Still, their layout position is connected to the closest root or parent state when you create them, which helps give your notes enough space in the auto layout.
3325

34-
- Select an annotation to edit it, then click inside the annotation to edit its text.
35-
- Select and hold an annotation to drag and change its position on the canvas.
26+
- Use the <PlusSquare size={18}/> plus icon button in the canvas tools and choose **Note**.
27+
- Right-click anywhere on the canvas and choose **Add note**.
3628

37-
## Delete annotations
29+
### Edit and delete notes
3830

39-
- Select an annotation to edit it, then use backspace to delete the annotation.
40-
- Right-click on an annotation to open the **Delete** option menu, then use **Delete** to delete the annotation.
31+
- Double-click or use the <kbd>Enter</kbd> key to edit the contents of a note.
32+
- Use the <kbd>Backspace</kbd> key to delete the selected note.

docs/canvas-view-controls.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ Below is a preview of a machine _without_ the UI hidden.
6565

6666
The zoom menu and canvas context menu contain the same options:
6767

68-
- **Add [annotation](annotations.mdx)**
68+
- **Add [note](annotations.mdx)**
6969
- **[Autolayout](autolayout.mdx)**
7070
- **Zoom In**
7171
- **Zoom out**

docs/export-as-code.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ title: Export as code
44

55
Exporting as code is useful if you want to use your machine with [XState](xstate.mdx) inside your codebase or if you want to duplicate your machine without using **Fork**.
66

7-
Every feature of your state machine will be included in the code, except for colors and annotations.
7+
Every feature of your state machine will be included in the code, except for [colors](colors.mdx) and [notes](annotations.mdx).
88

99
## Export formats
1010

sidebars.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,11 @@ const sidebars = {
135135
label: 'Colors',
136136
id: 'colors',
137137
},
138-
'annotations',
138+
{
139+
type: 'doc',
140+
label: 'Notes',
141+
id: 'annotations',
142+
},
139143
'descriptions',
140144
{
141145
type: 'doc',

versioned_docs/version-4/annotations.mdx

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -2,37 +2,31 @@
22
title: Annotations
33
---
44

5-
Annotations are notes you can use to annotate your machine, positioned anywhere inside your machine. Annotations are useful for information or comments you want to add to your machine that are only visible inside Stately Studio and not included when you export as code.
5+
You can use notes to annotate your machine, positioned anywhere inside your machine. Notes are useful for information or comments you want to add to your machine that are only visible inside Stately Studio and not included when you export as code.
66

77
<EmbedMachine
88
embedURL="https://stately.ai/registry/editor/embed/5b170468-d66a-4136-84c8-676c8fea82e8?machineId=7879be19-d267-4e75-9a7d-6a870d540257"
99
name="Annotated dog walk machine"
1010
/>
1111

12-
Unlike [**descriptions**](descriptions.mdx), annotations don’t need to be connected to a state or transition and can be added or positioned anywhere inside your machine.
12+
Notes are formatted with Markdown so you can add links, images, and other formatting to your annotations.
1313

1414
:::tip
1515

16-
For now, annotations only support plain text. If you want to include text formatting, links, or images, [use **descriptions**, which have markdown support](descriptions.mdx).
16+
Unlike [**descriptions**](descriptions.mdx), notes don’t need to be connected to a state or transition and can be added or positioned anywhere inside your machine.
1717

1818
:::
1919

20-
## Add annotations to your machine
20+
## Add notes to your machine
2121

22-
You can add annotations anywhere on your machine from **Design** and **Simulate** mode, but you can only edit them in **Design** mode.
22+
You can add notes anywhere on your machine from **Design** and **Simulate** mode, but you can only edit them in **Design** mode.
2323

24-
Annotations are unrelated to a state or transition. Still, their layout position is connected to the closest root or parent state when you create them, which helps give your annotations enough space in the auto layout.
24+
Notes are unrelated to a state or transition. Still, their layout position is connected to the closest root or parent state when you create them, which helps give your notes enough space in the auto layout.
2525

26-
1. Right-click anywhere on the canvas to open the canvas menu.
27-
2. Choose **Add annotation** to create a new annotation on the canvas.
28-
3. Type your annotation text into the annotation.
26+
- Use the <PlusSquare size={18}/> plus icon button in the canvas tools and choose **Note**.
27+
- Right-click anywhere on the canvas and choose **Add note**.
2928

30-
## Edit annotations
29+
### Edit and delete notes
3130

32-
- Select an annotation to edit it, then click inside the annotation to edit its text.
33-
- Select and drag an annotation to change its position on the canvas.
34-
35-
## Delete annotations
36-
37-
- Select an annotation to edit it, then use backspace to delete the annotation.
38-
- Right-click on an annotation to open the **Delete** option menu, then use **Delete** to delete the annotation.
31+
- Double-click or use the <kbd>Enter</kbd> key to edit the contents of a note.
32+
- Use the <kbd>Backspace</kbd> key to delete the selected note.

versioned_sidebars/version-4-sidebars.json

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,11 @@
118118
"export-as-code",
119119
"machine-restore",
120120
"autolayout",
121-
"annotations",
121+
{
122+
"type": "doc",
123+
"label": "Notes",
124+
"id": "annotations"
125+
},
122126
"descriptions",
123127
{
124128
"type": "doc",

0 commit comments

Comments
 (0)