Skip to content

Commit

Permalink
0.19 plugin doc updates part 2
Browse files Browse the repository at this point in the history
  • Loading branch information
ritch committed Jan 30, 2023
1 parent 6bc9b8f commit e77de3c
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion app/packages/embeddings/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ registerComponent({
name: "Embeddings",
label: "Embeddings",
component: Embeddings,
type: PluginComponentType.Plot,
type: PluginComponentType.Panel,
activator: () => true,
Icon: ScatterPlotIcon,
});
11 changes: 11 additions & 0 deletions app/packages/plugins/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -159,6 +159,13 @@ export function useActivePlugins(type: PluginComponentType, ctx: any) {
);
}

/**
* The type of plugin component.
*
* - `Panel` - A panel that can be added to `@fiftyone/spaces`
* - `Plot` - **deprecated** - A plot that can be added as a panel
* - `Visualizer` - Visualizes sample data
*/
export enum PluginComponentType {
Visualizer,
Plot,
Expand Down Expand Up @@ -231,6 +238,10 @@ class PluginComponentRegistry {
!this.data.has(name),
`${name} is already a registered Plugin Component`
);
warn(
registration.type === PluginComponentType.Plot,
`${name} is a Plot Plugin Component. This is deprecated. Please use "Panel" instead.`
);
this.data.set(name, registration);
}
unregister(name: string): boolean {
Expand Down

0 comments on commit e77de3c

Please sign in to comment.