Skip to content
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ dependencies = [
"tldextract (>=5.1.3)",
"uuid-utils (>=0.11.0,<1.0.0)",
## HumanSignal repo dependencies :start
"label-studio-sdk @ https://github.com/HumanSignal/label-studio-sdk/archive/9c4849589314c7288665cc48d83f9a5124eda65c.zip",
"label-studio-sdk @ https://github.com/HumanSignal/label-studio-sdk/archive/067290aac0c7afec06c717c5ff858e9a3537ef10.zip",
## HumanSignal repo dependencies :end
]

Expand Down
2 changes: 0 additions & 2 deletions web/libs/editor/src/regions/Area.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ import { TimeSeriesRegionModel } from "./TimeSeriesRegion";
import { ParagraphsRegionModel } from "./ParagraphsRegion";
import { VideoRectangleRegionModel } from "./VideoRectangleRegion";
import { BitmaskRegionModel } from "./BitmaskRegion";
import { CustomRegionModel } from "./CustomRegion";

// general Area type for classification Results which doesn't belong to any real Area
const ClassificationArea = types.compose(
Expand Down Expand Up @@ -100,7 +99,6 @@ const Area = types.union(
BitmaskRegionModel,
VideoRectangleRegionModel,
ClassificationArea,
CustomRegionModel,
...Registry.customTags.map((t) => t.region).filter(Boolean),
);

Expand Down
147 changes: 0 additions & 147 deletions web/libs/editor/src/regions/CustomRegion.js

This file was deleted.

2 changes: 0 additions & 2 deletions web/libs/editor/src/regions/Result.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ const resultTypes = [
"pairwise",
"videorectangle",
"ranker",
"custominterface",
];

const resultValues = {
Expand Down Expand Up @@ -66,7 +65,6 @@ const resultValues = {
bitmasklabels: types.maybe(types.array(types.string)),
taxonomy: types.frozen(), // array of arrays of strings
sequence: types.frozen(),
custom: types.maybe(types.frozen()), // for CustomInterface regions
};

const Result = types
Expand Down
3 changes: 0 additions & 3 deletions web/libs/editor/src/regions/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ import { HtxTextAreaRegion, TextAreaRegionModel } from "./TextAreaRegion";
import { RichTextRegionModel } from "./RichTextRegion";
import { TimelineRegionModel } from "./TimelineRegion";
import { VideoRectangleRegionModel } from "./VideoRectangleRegion";
import { CustomRegionModel } from "./CustomRegion";

const AllRegionsType = types.union(
AudioRegionModel,
Expand All @@ -33,7 +32,6 @@ const AllRegionsType = types.union(
TimelineRegionModel,
ParagraphsRegionModel,
VideoRectangleRegionModel,
CustomRegionModel,
...Registry.customTags.map((t) => t.region).filter(Boolean),
);

Expand Down Expand Up @@ -62,5 +60,4 @@ export {
TextAreaRegionModel,
TimelineRegionModel,
VideoRectangleRegionModel,
CustomRegionModel,
};
15 changes: 13 additions & 2 deletions web/libs/editor/src/tags/Custom.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import { EnterpriseBadge } from "@humansignal/ui";
import Registry from "../core/Registry";
import ControlBase from "./control/Base";

const ENTERPRISE_URL = "https://docs.humansignal.com/guide/label_studio_compare";

const CustomInterfaceModel = types.compose(
"CustomInterfaceModel",
ControlBase,
Expand All @@ -12,13 +14,22 @@ const CustomInterfaceModel = types.compose(
}),
);

const Code = ({ children }) => (
<code className="text-sm font-mono bg-neutral-surface border border-neutral-border rounded px-tighter py-tightest">
{children}
</code>
);

// Register custom tag placeholder for opensource
if (!APP_SETTINGS?.billing?.enterprise && !Registry.models.custominterface) {
const CustomComponentWrapper = observer(({ item }) => {
return (
<div className="flex items-center gap-2 py-base">
<div className="py-base">
<EnterpriseBadge />
CustomInterface tag is only available in the enterprise.
{" "}
<Code>CustomInterface</Code> / <Code>React</Code> tag is only available in{" "}
<a className="no-go" href={ENTERPRISE_URL} target="_blank" rel="noreferrer">Enterprise</a>
.
</div>
);
});
Expand Down
Empty file.
Loading
Loading