Skip to content

Commit

Permalink
switch some built-in operators from listed/unlisted
Browse files Browse the repository at this point in the history
  • Loading branch information
imanjra committed Jul 9, 2024
1 parent 463b727 commit 1f71557
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 15 deletions.
11 changes: 5 additions & 6 deletions app/packages/operators/src/built-in-operators.ts
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,6 @@ class OpenDataset extends Operator {
return new OperatorConfig({
name: "open_dataset",
label: "Open Dataset",
unlisted: true,
});
}
async resolveInput(): Promise<types.Property> {
Expand Down Expand Up @@ -781,7 +780,11 @@ class ClearSelectedLabels extends Operator {

class SetSpaces extends Operator {
get config(): OperatorConfig {
return new OperatorConfig({ name: "set_spaces", label: "Set spaces" });
return new OperatorConfig({
name: "set_spaces",
label: "Set spaces",
unlisted: true,
});
}
useHooks() {
const setSessionSpacesState = useSetRecoilState(fos.sessionSpaces);
Expand All @@ -799,10 +802,6 @@ class SetSpaces extends Operator {
}
}

function usePanelStateForContext(ctx: ExecutionContext) {
return usePanelState(ctx.getCurrentPanelId());
}

class ClearPanelState extends Operator {
get config(): OperatorConfig {
return new OperatorConfig({
Expand Down
12 changes: 3 additions & 9 deletions fiftyone/operators/builtin.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,9 +434,7 @@ class LoadWorkspace(foo.Operator):
@property
def config(self):
return foo.OperatorConfig(
name="load_workspace",
label="Load Workspace",
unlisted=True,
name="load_workspace", label="Load Workspace"
)

def resolve_input(self, ctx):
Expand All @@ -454,9 +452,7 @@ class SaveWorkspace(foo.Operator):
@property
def config(self):
return foo.OperatorConfig(
name="save_workspace",
label="Save Workspace",
unlisted=True,
name="save_workspace", label="Save Workspace"
)

def resolve_input(self, ctx):
Expand Down Expand Up @@ -496,9 +492,7 @@ class DeleteWorkspace(foo.Operator):
@property
def config(self):
return foo.OperatorConfig(
name="delete_workspace",
label="Delete Workspace",
unlisted=True,
name="delete_workspace", label="Delete Workspace"
)

def resolve_input(self, ctx):
Expand Down

0 comments on commit 1f71557

Please sign in to comment.