feat: deprecate plugins by their metadata (#15882)

This commit is contained in:
David Aaron Suddjian 2021-07-24 01:52:07 -07:00 committed by GitHub
parent 65728ea049
commit 7330aefeac
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 1 deletions

View File

@ -398,7 +398,10 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) {
const chartMetadata: VizEntry[] = useMemo(() => {
const result = Object.entries(mountedPluginMetadata)
.map(([key, value]) => ({ key, value }))
.filter(({ value }) => nativeFilterGate(value.behaviors || []));
.filter(
({ value }) =>
nativeFilterGate(value.behaviors || []) && !value.deprecated,
);
result.sort((a, b) => vizSortFactor(a) - vizSortFactor(b));
return result;
}, [mountedPluginMetadata]);