Skip to content

Commit

Permalink
testing
Browse files Browse the repository at this point in the history
  • Loading branch information
manivoxel51 committed Oct 22, 2024
1 parent 5d93825 commit 4ace045
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/packages/core/src/plugins/SchemaIO/components/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,7 @@ export { default as SwitchView } from "./SwitchView";
export { default as TableView } from "./TableView";
export { default as TabsView } from "./TabsView";
export { default as TagsView } from "./TagsView";
export { default as TextView } from "./TextView";
export { default as TextFieldView } from "./TextFieldView";
export { default as TupleView } from "./TupleView";
export { default as UnsupportedView } from "./UnsupportedView";
15 changes: 15 additions & 0 deletions app/packages/operators/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -1111,6 +1111,20 @@ export class FieldView extends View {
}
}

/**
* Operator class for describing a TextView {@link View} for an
* operator type.
*/
export class TextView extends View {
constructor(options: ViewProps) {
super(options);
this.name = "TextView";
}
static fromJSON(json) {
return new TextView(json);
}
}

/**
* Operator class for describing a TextFieldView {@link View} for an
* operator type.
Expand Down Expand Up @@ -1248,6 +1262,7 @@ const VIEWS = {
MediaPlayerView,
PromptView,
FieldView,
TextView,
TextFieldView,
LazyFieldView,
PillBadgeView,
Expand Down
10 changes: 10 additions & 0 deletions fiftyone/operators/types.py
Original file line number Diff line number Diff line change
Expand Up @@ -1854,6 +1854,16 @@ def __init__(self, **kwargs):
super().__init__(**kwargs)


class TextView(View):
"""Displays a text.
.. note::
Must be used with :class:`String` properties.
"""

def __init__(self, **kwargs):
super().__init__(**kwargs)


class TextFieldView(View):
"""Displays a text input.
Expand Down

0 comments on commit 4ace045

Please sign in to comment.