You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/pages/docs/messages/annotations.mdx
+41-14Lines changed: 41 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,8 @@ A given client can contribute to the summary only once per annotation type.
75
75
{
76
76
"reactions:flag.v1": {
77
77
"total": 3,
78
-
"clientIds": ["client1", "client2", "client3"]
78
+
"clientIds": ["client1", "client2", "client3"],
79
+
"clipped": false
79
80
}
80
81
}
81
82
```
@@ -95,11 +96,13 @@ Deleting an annotation removes the `clientId` from the list of clients that cont
95
96
"categories:distinct.v1": {
96
97
"important": {
97
98
"total": 2,
98
-
"clientIds": ["client1", "client3"]
99
+
"clientIds": ["client1", "client3"],
100
+
"clipped": false
99
101
},
100
102
"urgent": {
101
103
"total": 3,
102
-
"clientIds": ["client1", "client2", "client3"]
104
+
"clientIds": ["client1", "client2", "client3"],
105
+
"clipped": false
103
106
}
104
107
}
105
108
}
@@ -120,11 +123,13 @@ Deleting an annotation removes the `clientId` from the list of clients that cont
120
123
"status:unique.v1": {
121
124
"important": {
122
125
"total": 2,
123
-
"clientIds": ["client1", "client3"]
126
+
"clientIds": ["client1", "client3"],
127
+
"clipped": false
124
128
},
125
129
"urgent": {
126
130
"total": 1,
127
-
"clientIds": ["client2"]
131
+
"clientIds": ["client2"],
132
+
"clipped": false
128
133
}
129
134
}
130
135
}
@@ -151,15 +156,19 @@ Deleting an annotation removes all contributions made by that `clientId` for tha
151
156
"client1": 3,
152
157
"client2": 2
153
158
},
154
-
"totalUnidentified": 2
159
+
"totalUnidentified": 2,
160
+
"clipped": false,
161
+
"totalClientIds": 2
155
162
},
156
163
"option-b": {
157
164
"total": 4,
158
165
"clientCounts": {
159
166
"client1": 2,
160
167
"client3": 1
161
168
},
162
-
"totalUnidentified": 1
169
+
"totalUnidentified": 1,
170
+
"clipped": false,
171
+
"totalClientIds": 2
163
172
}
164
173
}
165
174
}
@@ -350,26 +359,31 @@ The summary will be included in a `summary` field nested within the message's `a
350
359
},
351
360
"reactions:flag.v1": {
352
361
"total": 3,
353
-
"clientIds": ["client1", "client2", "client3"]
362
+
"clientIds": ["client1", "client2", "client3"],
363
+
"clipped": false
354
364
},
355
365
"categories:distinct.v1": {
356
366
"important": {
357
367
"total": 2,
358
-
"clientIds": ["client1", "client3"]
368
+
"clientIds": ["client1", "client3"],
369
+
"clipped": false
359
370
},
360
371
"urgent": {
361
372
"total": 3,
362
-
"clientIds": ["client1", "client2", "client3"]
373
+
"clientIds": ["client1", "client2", "client3"],
374
+
"clipped": false
363
375
}
364
376
},
365
377
"status:unique.v1": {
366
378
"important": {
367
379
"total": 2,
368
-
"clientIds": ["client1", "client3"]
380
+
"clientIds": ["client1", "client3"],
381
+
"clipped": false
369
382
},
370
383
"urgent": {
371
384
"total": 1,
372
-
"clientIds": ["client2"]
385
+
"clientIds": ["client2"],
386
+
"clipped": false
373
387
}
374
388
},
375
389
"voting:multiple.v1": {
@@ -379,21 +393,34 @@ The summary will be included in a `summary` field nested within the message's `a
379
393
"client1": 3,
380
394
"client2": 2
381
395
},
382
-
"totalUnidentified": 2
396
+
"totalUnidentified": 2,
397
+
"clipped": false,
398
+
"totalClientIds": 2
383
399
},
384
400
"option-b": {
385
401
"total": 4,
386
402
"clientCounts": {
387
403
"client1": 2,
388
404
"client3": 1
389
405
},
390
-
"totalUnidentified": 1
406
+
"totalUnidentified": 1,
407
+
"clipped": false,
408
+
"totalClientIds": 2
391
409
}
392
410
}
393
411
}
394
412
```
395
413
</Code>
396
414
415
+
### Large summaries <aid="large-summaries"/>
416
+
417
+
If many clients publish the same annotation to the same message, the list of client IDs in that annotation summary will get clipped in order to keep the event size within the maximum message size.
418
+
419
+
When a summary is clipped:
420
+
- The `total` property shows the total number of annotations as expected, but the `clientIds` property will contain only a partial list of client IDs.
421
+
- The `clipped` property is set to `true`.
422
+
- For the `multiple` annotation type, use the `totalClientIds` property to determine the total number of clients that have published the annotation. For the other annotation types this is equal to `total`.
423
+
397
424
## Subscribe to individual annotation events <aid="individual-annotations"/>
398
425
399
426
It is also possible to subscribe to individual annotation events, rather than annotation summaries. These are the emitted when [publishing](#publish) or [deleting](#delete) an annotation.
0 commit comments