From 4ace045f5c16cc593ed22929a009f1e79eb1861e Mon Sep 17 00:00:00 2001 From: manivoxel51 Date: Tue, 22 Oct 2024 13:02:51 -0700 Subject: [PATCH] testing --- .../core/src/plugins/SchemaIO/components/index.ts | 1 + app/packages/operators/src/types.ts | 15 +++++++++++++++ fiftyone/operators/types.py | 10 ++++++++++ 3 files changed, 26 insertions(+) diff --git a/app/packages/core/src/plugins/SchemaIO/components/index.ts b/app/packages/core/src/plugins/SchemaIO/components/index.ts index d8809bd604..ed79e70f65 100644 --- a/app/packages/core/src/plugins/SchemaIO/components/index.ts +++ b/app/packages/core/src/plugins/SchemaIO/components/index.ts @@ -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"; diff --git a/app/packages/operators/src/types.ts b/app/packages/operators/src/types.ts index 8a9353aa4b..1f8d1b414c 100644 --- a/app/packages/operators/src/types.ts +++ b/app/packages/operators/src/types.ts @@ -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. @@ -1248,6 +1262,7 @@ const VIEWS = { MediaPlayerView, PromptView, FieldView, + TextView, TextFieldView, LazyFieldView, PillBadgeView, diff --git a/fiftyone/operators/types.py b/fiftyone/operators/types.py index a062bdbb70..acdad8aa4a 100644 --- a/fiftyone/operators/types.py +++ b/fiftyone/operators/types.py @@ -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.