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

Commit 303eca9

Browse files
hlomziksmorefacemakseq
authored
Docs for <Repeater/> tag (#346)
* Add docs for <Repeater/> using virtual tag file * fix jsdoc with nested function params * update description for Repeater tag * updating to add keywords to repeater tag Co-authored-by: smoreface <[email protected]> Co-authored-by: Max Tkachenko <[email protected]>
1 parent 50bc501 commit 303eca9

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

src/regions/BrushRegion.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,8 @@ const Model = types
348348
*/
349349

350350
/**
351-
* @param {{ fast?: boolean }} options `fast` is for saving only touches, without RLE
351+
* @param {object} options
352+
* @param {boolean} [options.fast] saving only touches, without RLE
352353
* @return {BrushRegionResult}
353354
*/
354355
serialize(options) {

src/tags/visual/Repeater.js

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
// this is just a virtual tag, expanded directly in Tree.tsx during config parsing
2+
3+
/**
4+
* 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.
5+
* It repeats tags inside it for every item in a given data array from your dataset. Supports all tags except Labels.
6+
* @example
7+
* <Repeater on="$utterances" indexFlag="{{idx}}">
8+
* <Text name="user_{{idx}}" value="$utterances[{{idx}}].text"/>
9+
* <Header value="Utterance Review"/>
10+
* <Choices name="utterance_action_{{idx}}" showInline="true" toName="user_{{idx}}">
11+
* <Choice value="No Action"/>
12+
* <Choice value="Training"/>
13+
* <Choice value="New Intent"/>
14+
* </Choices>
15+
* </Repeater>
16+
* @name Repeater
17+
* @meta_title Repeater Tag to duplicate annotation settings
18+
* @meta_description Customize Label Studio with the Repeater tag to repeat similar data blocks to accelerate labeling for machine learning and data science projects.
19+
* @param {string} on - Data field object with array with similar data
20+
* @param {string} [indexFlag={{idx}}] - Placeholder for array index in params of underlying tags
21+
*/
22+
export const Repeater = () => {};

0 commit comments

Comments
 (0)