Skip to content
This repository was archived by the owner on Apr 18, 2024. It is now read-only.

Commit fdbd3da

Browse files
authored
docs: DEV-4153: Small docs fixes (#1140)
* docs: Remove useless color params in KeyPointLabels They use colors from `background` property from respective `Label` * docs: DEV-4153: Small docs fixes - fix missed AudioRegion documentation in Audio tag after v3 release - fix Brush example description - add missed Repeater docs about pagination mode (added to LS directly)
1 parent 271beab commit fdbd3da

File tree

5 files changed

+25
-38
lines changed

5 files changed

+25
-38
lines changed

src/regions/AudioRegion.js

+20
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,26 @@ import { AudioUltraRegionModel as _audioUltraRegionModel } from './AudioRegion/A
1111
import { AudioRegionModel as _audioRegionModel } from './AudioRegion/AudioRegionModel';
1212
import { EditableRegion } from './EditableRegion';
1313

14+
// this type is used in auto-generated documentation
15+
/**
16+
* @example
17+
* {
18+
* "original_length": 18,
19+
* "value": {
20+
* "start": 3.1,
21+
* "end": 8.2,
22+
* "channel": 0,
23+
* "labels": ["Voice"]
24+
* }
25+
* }
26+
* @typedef {Object} AudioRegionResult
27+
* @property {number} original_length length of the original audio (seconds)
28+
* @property {Object} value
29+
* @property {number} value.start start time of the fragment (seconds)
30+
* @property {number} value.end end time of the fragment (seconds)
31+
* @property {number} value.channel channel identifier which was targeted
32+
*/
33+
1434
const EditableAudioModel = types
1535
.model('EditableAudioModel', {})
1636
.volatile(() => ({

src/regions/AudioRegion/AudioRegionModel.js

-19
Original file line numberDiff line numberDiff line change
@@ -48,25 +48,6 @@ export const AudioRegionModel = types
4848
},
4949
}))
5050
.actions(self => ({
51-
/**
52-
* @example
53-
* {
54-
* "original_length": 18,
55-
* "value": {
56-
* "start": 3.1,
57-
* "end": 8.2,
58-
* "channel": 0,
59-
* "labels": ["Voice"]
60-
* }
61-
* }
62-
* @typedef {Object} AudioRegionResult
63-
* @property {number} original_length length of the original audio (seconds)
64-
* @property {Object} value
65-
* @property {number} value.start start time of the fragment (seconds)
66-
* @property {number} value.end end time of the fragment (seconds)
67-
* @property {number} value.channel channel identifier which was targeted
68-
*/
69-
7051
/**
7152
* @returns {AudioRegionResult}
7253
*/

src/regions/AudioRegion/AudioUltraRegionModel.js

-17
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,6 @@ export const AudioUltraRegionModel = types
3434
},
3535
}))
3636
.actions(self => {
37-
/**
38-
* @example
39-
* {
40-
* "original_length": 18,
41-
* "value": {
42-
* "start": 3.1,
43-
* "end": 8.2,
44-
* "labels": ["Voice"]
45-
* }
46-
* }
47-
* @typedef {Object} AudioRegionResult
48-
* @property {number} original_length length of the original audio (seconds)
49-
* @property {Object} value
50-
* @property {number} value.start start time of the fragment (seconds)
51-
* @property {number} value.end end time of the fragment (seconds)
52-
*/
53-
5437
/**
5538
* @returns {AudioRegionResult}
5639
*/

src/tags/control/Brush.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import { ToolManagerMixin } from '../../mixins/ToolManagerMixin';
1111
*
1212
* Use with the following data types: image.
1313
* @example
14-
* Basic image segmentation labeling configuration:
14+
* <!--Basic image segmentation labeling configuration:-->
1515
* <View>
1616
* <Brush name="labels" toName="image">
1717
* <Label value="Person" />

src/tags/visual/Repeater.js

+4-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@
44
* Repeater Tag for annotating multiple data objects in a dynamic range with the same semantics. You can loop through data items in a python-like `for` cycle in the labeling process.
55
* It repeats tags inside it for every item in a given data array from your dataset. All the occurences of `indexFlag` (default is `{{idx}}`) in parameter values will be replaced by the current index.
66
* Names should always be unique, so you can use this placeholder in tag names.
7+
*
8+
* The Repeater Tag supports the `mode` property. This creates the possibility to enable pagination in repeater for performance improvement.
9+
* You can add a parameter `<Repeater mode="pagination" ...>` to show only one page at a time, shrinking memory used to one tag set.
710
* @example
811
* <!-- How tags are repeated and placeholders are replaced internally. -->
912
* <!-- original config -->
@@ -46,6 +49,6 @@
4649
* @meta_description Customize Label Studio with the Repeater tag to repeat similar data blocks to accelerate labeling for machine learning and data science projects.
4750
* @param {string} on - Data field object with array with similar data
4851
* @param {string} [indexFlag={{idx}}] - Placeholder for array index in params of underlying tags
49-
* @param {list|pagination} [mode] - Select display mode between default and paginated
52+
* @param {list|pagination} [mode] - Select display mode between default and paginated
5053
*/
5154
export const Repeater = () => {};

0 commit comments

Comments
 (0)