From 7e33dfcb371e7230797e54d5c9d866467737bb37 Mon Sep 17 00:00:00 2001 From: stephenLYZ <750188453@qq.com> Date: Thu, 10 Feb 2022 22:24:30 +0800 Subject: [PATCH 01/16] feat(viz-gallery): add 'feature' tag and fuzzy search weighting --- .../src/chart/models/ChartMetadata.ts | 13 +++++ .../src/index.js | 7 +++ .../src/DistBar/index.js | 7 +++ .../src/BigNumber/BigNumberTotal/index.ts | 7 +++ .../BigNumber/BigNumberWithTrendline/index.ts | 7 +++ .../plugin-chart-echarts/src/Pie/index.ts | 7 +++ .../src/Timeseries/Area/index.ts | 7 +++ .../src/Timeseries/Regular/Bar/index.ts | 7 +++ .../src/Timeseries/Regular/Line/index.ts | 7 +++ .../src/Timeseries/Regular/Scatter/index.ts | 7 +++ .../src/plugin/index.ts | 7 +++ .../plugins/plugin-chart-table/src/index.ts | 7 +++ .../VizTypeControl/VizTypeGallery.tsx | 56 ++++++++++++++++++- 13 files changed, 145 insertions(+), 1 deletion(-) diff --git a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts index 8b1c4590a3e92..96277b276c93c 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts @@ -44,6 +44,11 @@ export interface ChartMetadataConfig { exampleGallery?: ExampleImage[]; tags?: string[]; category?: string | null; + label?: { + name: string; + description: string; + weight: number; + }; } export default class ChartMetadata { @@ -79,6 +84,12 @@ export default class ChartMetadata { category: string | null; + label?: { + name: string; + description: string; + weight: number; + }; + constructor(config: ChartMetadataConfig) { const { name, @@ -96,6 +107,7 @@ export default class ChartMetadata { exampleGallery = [], tags = [], category = null, + label, } = config; this.name = name; @@ -122,6 +134,7 @@ export default class ChartMetadata { this.exampleGallery = exampleGallery; this.tags = tags; this.category = category; + this.label = label; } canBeAnnotationType(type: string): boolean { diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js index d97adfadf36c9..7fb5cb9b96943 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js @@ -45,6 +45,13 @@ const metadata = new ChartMetadata({ ], thumbnail, useLegacyApi: true, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }); export default class WorldMapChartPlugin extends ChartPlugin { diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js index 16b66c00b4c6d..192b2f81d65ca 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js @@ -51,6 +51,13 @@ const metadata = new ChartMetadata({ ], thumbnail, useLegacyApi: true, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }); export default class DistBarChartPlugin extends ChartPlugin { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts index 3f45db74cfd95..d151f4f9e9e7d 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts @@ -46,6 +46,13 @@ const metadata = new ChartMetadata({ t('Description'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }); export default class BigNumberTotalChartPlugin extends ChartPlugin< diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts index e774db4824e06..3851e19da6d95 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts @@ -45,6 +45,13 @@ const metadata = new ChartMetadata({ t('Trend'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }); export default class BigNumberWithTrendlineChartPlugin extends ChartPlugin< diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts index 873a6ac2343e4..306f4afc66634 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts @@ -72,6 +72,13 @@ export default class EchartsPieChartPlugin extends ChartPlugin< t('ECharts'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }), transformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts index ee7c89993cb7e..e1a5505bb8107 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts @@ -83,6 +83,13 @@ export default class EchartsAreaChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }), transformProps: areaTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts index 0ffc09098c70b..fff531183d68b 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts @@ -92,6 +92,13 @@ export default class EchartsTimeseriesBarChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }), transformProps: barTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts index 6f4a780c36fc3..03b8ac983f1f9 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts @@ -85,6 +85,13 @@ export default class EchartsTimeseriesLineChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }), transformProps: lineTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts index 7c77868a58451..f84cfe2e43531 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts @@ -86,6 +86,13 @@ export default class EchartsTimeseriesScatterChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }), transformProps: scatterTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts index 423ac596251bc..6a54b0ca0bb74 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts @@ -54,6 +54,13 @@ export default class PivotTableChartPlugin extends ChartPlugin< name: t('Pivot Table v2'), tags: [t('Additive'), t('Report'), t('Tabular'), t('Popular')], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }); super({ diff --git a/superset-frontend/plugins/plugin-chart-table/src/index.ts b/superset-frontend/plugins/plugin-chart-table/src/index.ts index bce2112d922df..0e5edd0a1dddf 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/index.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/index.ts @@ -51,6 +51,13 @@ const metadata = new ChartMetadata({ t('Description'), ], thumbnail, + label: { + name: t('verified'), + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + weight: 2, + }, }); export default class TableChartPlugin extends ChartPlugin< diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index c817c50c42ae5..7ea3efe105ab6 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -34,7 +34,7 @@ import { SupersetTheme, useTheme, } from '@superset-ui/core'; -import { Collapse, Input } from 'src/common/components'; +import { Collapse, Input, Tooltip } from 'src/common/components'; import Label from 'src/components/Label'; import { usePluginContext } from 'src/components/DynamicPlugins'; import Icons from 'src/components/Icons'; @@ -309,6 +309,7 @@ const Examples = styled.div` const thumbnailContainerCss = (theme: SupersetTheme) => css` cursor: pointer; width: ${theme.gridUnit * THUMBNAIL_GRID_UNITS}px; + position: relative; img { min-width: ${theme.gridUnit * THUMBNAIL_GRID_UNITS}px; @@ -332,6 +333,38 @@ const thumbnailContainerCss = (theme: SupersetTheme) => css` } `; +const BetaBadge = styled.div` + ${({ theme }) => ` + border: 1px solid #1985a0; + box-sizing: border-box; + border-radius: 4px; + background: #ffffff; + line-height: ${theme.gridUnit * 2.5}px; + color: #1985a0; + font-size: 12px; + font-weight: 500; + text-align: center; + padding: ${theme.gridUnit * 0.5}px ${theme.gridUnit}px; + text-transform: uppercase; + cursor: pointer; + + div { + transform: scale(0.83,0.83); + } + `} +`; + +const ThumbnailBadgeWrapper = styled.div` + position: absolute; + right: ${({ theme }) => theme.gridUnit}px; + top: ${({ theme }) => theme.gridUnit * 19}px; +`; + +const TitleBadgeWrapper = styled.div` + display: inline-block !important; + margin-left: ${({ theme }) => theme.gridUnit * 2}px; +`; + function vizSortFactor(entry: VizEntry) { if (typesWithDefaultOrder.has(entry.key)) { return DEFAULT_ORDER.indexOf(entry.key); @@ -377,6 +410,13 @@ const Thumbnail: React.FC = ({ > {type.name} + {type.label && ( + + +
{type.label.name}
+
+
+ )} ); }; @@ -738,9 +778,23 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { {selectedVizMetadata?.name} + {selectedVizMetadata?.label && ( + + + +
{selectedVizMetadata.label.name}
+
+
+
+ )}
{selectedVizMetadata?.tags.map(tag => ( From 8b2f857908371fb15d55fca8a732aaf1730e0400 Mon Sep 17 00:00:00 2001 From: stephenLYZ <750188453@qq.com> Date: Fri, 11 Feb 2022 00:26:18 +0800 Subject: [PATCH 02/16] add search weight --- .../superset-ui-core/src/chart/models/ChartMetadata.ts | 7 +++++-- .../plugins/legacy-plugin-chart-world-map/src/index.js | 2 +- .../plugins/legacy-preset-chart-nvd3/src/DistBar/index.js | 2 +- .../src/BigNumber/BigNumberTotal/index.ts | 2 +- .../src/BigNumber/BigNumberWithTrendline/index.ts | 2 +- .../plugins/plugin-chart-echarts/src/Pie/index.ts | 2 +- .../plugin-chart-echarts/src/Timeseries/Area/index.ts | 2 +- .../src/Timeseries/Regular/Bar/index.ts | 2 +- .../src/Timeseries/Regular/Line/index.ts | 2 +- .../src/Timeseries/Regular/Scatter/index.ts | 2 +- .../plugins/plugin-chart-pivot-table/src/plugin/index.ts | 2 +- superset-frontend/plugins/plugin-chart-table/src/index.ts | 2 +- .../components/controls/VizTypeControl/VizTypeGallery.tsx | 7 ++++++- 13 files changed, 22 insertions(+), 14 deletions(-) diff --git a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts index 96277b276c93c..c57e37d53c357 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts @@ -47,8 +47,8 @@ export interface ChartMetadataConfig { label?: { name: string; description: string; - weight: number; }; + searchWeight?: number; } export default class ChartMetadata { @@ -87,9 +87,10 @@ export default class ChartMetadata { label?: { name: string; description: string; - weight: number; }; + searchWeight: number; + constructor(config: ChartMetadataConfig) { const { name, @@ -108,6 +109,7 @@ export default class ChartMetadata { tags = [], category = null, label, + searchWeight = 0, } = config; this.name = name; @@ -135,6 +137,7 @@ export default class ChartMetadata { this.tags = tags; this.category = category; this.label = label; + this.searchWeight = searchWeight; } canBeAnnotationType(type: string): boolean { diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js index 7fb5cb9b96943..6a1c8314e394c 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js @@ -50,8 +50,8 @@ const metadata = new ChartMetadata({ description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }); export default class WorldMapChartPlugin extends ChartPlugin { diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js index 192b2f81d65ca..2ce2d12f9e3bd 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js @@ -56,8 +56,8 @@ const metadata = new ChartMetadata({ description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }); export default class DistBarChartPlugin extends ChartPlugin { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts index d151f4f9e9e7d..4d6c1da2ca215 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts @@ -51,8 +51,8 @@ const metadata = new ChartMetadata({ description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }); export default class BigNumberTotalChartPlugin extends ChartPlugin< diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts index 3851e19da6d95..0ff1f86aa84d0 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts @@ -50,8 +50,8 @@ const metadata = new ChartMetadata({ description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }); export default class BigNumberWithTrendlineChartPlugin extends ChartPlugin< diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts index 306f4afc66634..aa3068d5f0b62 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts @@ -77,8 +77,8 @@ export default class EchartsPieChartPlugin extends ChartPlugin< description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }), transformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts index e1a5505bb8107..9b9574e8dbb37 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts @@ -88,8 +88,8 @@ export default class EchartsAreaChartPlugin extends ChartPlugin< description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }), transformProps: areaTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts index fff531183d68b..5042ece758410 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts @@ -97,8 +97,8 @@ export default class EchartsTimeseriesBarChartPlugin extends ChartPlugin< description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }), transformProps: barTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts index 03b8ac983f1f9..a4c5a37badeee 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts @@ -90,8 +90,8 @@ export default class EchartsTimeseriesLineChartPlugin extends ChartPlugin< description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }), transformProps: lineTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts index f84cfe2e43531..d87fcb63cbfa4 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts @@ -91,8 +91,8 @@ export default class EchartsTimeseriesScatterChartPlugin extends ChartPlugin< description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }), transformProps: scatterTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts index 6a54b0ca0bb74..c5132ce19c095 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts @@ -59,8 +59,8 @@ export default class PivotTableChartPlugin extends ChartPlugin< description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }); super({ diff --git a/superset-frontend/plugins/plugin-chart-table/src/index.ts b/superset-frontend/plugins/plugin-chart-table/src/index.ts index 0e5edd0a1dddf..e7989cc2097cf 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/index.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/index.ts @@ -56,8 +56,8 @@ const metadata = new ChartMetadata({ description: t( 'This chart was tested and verified, so the overall experience should be stable.', ), - weight: 2, }, + searchWeight: 0.5, }); export default class TableChartPlugin extends ChartPlugin< diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 7ea3efe105ab6..965241ad17c18 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -584,7 +584,12 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { if (searchInputValue.trim() === '') { return []; } - return fuse.search(searchInputValue).map(result => result.item); + return fuse + .search(searchInputValue) + .map(result => result.item) + .sort( + (a, b) => (b.value?.searchWeight || 0) - (a.value?.searchWeight || 0), + ); }, [searchInputValue, fuse]); const focusSearch = useCallback(() => { From 994c400e52c98a92ed803c8f52c5beecaed8e020 Mon Sep 17 00:00:00 2001 From: Stephen Liu <750188453@qq.com> Date: Fri, 11 Feb 2022 11:33:46 +0800 Subject: [PATCH 03/16] Update superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx Co-authored-by: Evan Rusackas --- .../components/controls/VizTypeControl/VizTypeGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 965241ad17c18..b89258fa83494 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -338,7 +338,7 @@ const BetaBadge = styled.div` border: 1px solid #1985a0; box-sizing: border-box; border-radius: 4px; - background: #ffffff; + background: ${theme.colors.grayscale.light5}; line-height: ${theme.gridUnit * 2.5}px; color: #1985a0; font-size: 12px; From aad71a0d570583dfc4e53be9dd8175757d76a45a Mon Sep 17 00:00:00 2001 From: Stephen Liu <750188453@qq.com> Date: Fri, 11 Feb 2022 11:33:55 +0800 Subject: [PATCH 04/16] Update superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx Co-authored-by: Evan Rusackas --- .../components/controls/VizTypeControl/VizTypeGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index b89258fa83494..97a74bc6be9ce 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -335,7 +335,7 @@ const thumbnailContainerCss = (theme: SupersetTheme) => css` const BetaBadge = styled.div` ${({ theme }) => ` - border: 1px solid #1985a0; + border: 1px solid ${theme.colors.primary.dark1}; box-sizing: border-box; border-radius: 4px; background: ${theme.colors.grayscale.light5}; From 88c67288e3a8f4b84fc7c1bf7febf4bfd8040249 Mon Sep 17 00:00:00 2001 From: Stephen Liu <750188453@qq.com> Date: Fri, 11 Feb 2022 11:34:25 +0800 Subject: [PATCH 05/16] Update superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx Co-authored-by: Evan Rusackas --- .../components/controls/VizTypeControl/VizTypeGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 97a74bc6be9ce..0ebb5ddf5b51f 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -337,7 +337,7 @@ const BetaBadge = styled.div` ${({ theme }) => ` border: 1px solid ${theme.colors.primary.dark1}; box-sizing: border-box; - border-radius: 4px; + border-radius: ${theme.gridUnit}px; background: ${theme.colors.grayscale.light5}; line-height: ${theme.gridUnit * 2.5}px; color: #1985a0; From 698f8cd381fe86abb953a80ccd6d4a2d37fb5b15 Mon Sep 17 00:00:00 2001 From: Stephen Liu <750188453@qq.com> Date: Fri, 11 Feb 2022 11:34:52 +0800 Subject: [PATCH 06/16] Update superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx Co-authored-by: Evan Rusackas --- .../components/controls/VizTypeControl/VizTypeGallery.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 0ebb5ddf5b51f..13a4407913d73 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -340,7 +340,7 @@ const BetaBadge = styled.div` border-radius: ${theme.gridUnit}px; background: ${theme.colors.grayscale.light5}; line-height: ${theme.gridUnit * 2.5}px; - color: #1985a0; + color: ${theme.colors.primary.dark1}; font-size: 12px; font-weight: 500; text-align: center; From 306ffb3fc6fea0351f5a3bd65d71c0d2dc6f10ee Mon Sep 17 00:00:00 2001 From: stephenLYZ <750188453@qq.com> Date: Fri, 11 Feb 2022 11:49:52 +0800 Subject: [PATCH 07/16] some improvements --- .../VizTypeControl/VizTypeGallery.tsx | 26 +++++++++---------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 13a4407913d73..2fa31f594ef1b 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -333,7 +333,7 @@ const thumbnailContainerCss = (theme: SupersetTheme) => css` } `; -const BetaBadge = styled.div` +const HighlightLabel = styled.div` ${({ theme }) => ` border: 1px solid ${theme.colors.primary.dark1}; box-sizing: border-box; @@ -341,8 +341,8 @@ const BetaBadge = styled.div` background: ${theme.colors.grayscale.light5}; line-height: ${theme.gridUnit * 2.5}px; color: ${theme.colors.primary.dark1}; - font-size: 12px; - font-weight: 500; + font-size: ${theme.typography.sizes.s}px; + font-weight: ${theme.typography.weights.bold}; text-align: center; padding: ${theme.gridUnit * 0.5}px ${theme.gridUnit}px; text-transform: uppercase; @@ -354,13 +354,13 @@ const BetaBadge = styled.div` `} `; -const ThumbnailBadgeWrapper = styled.div` +const ThumbnailLabelWrapper = styled.div` position: absolute; right: ${({ theme }) => theme.gridUnit}px; top: ${({ theme }) => theme.gridUnit * 19}px; `; -const TitleBadgeWrapper = styled.div` +const TitleLabelWrapper = styled.div` display: inline-block !important; margin-left: ${({ theme }) => theme.gridUnit * 2}px; `; @@ -411,11 +411,11 @@ const Thumbnail: React.FC = ({ {type.name} {type.label && ( - - + +
{type.label.name}
-
-
+ + )} ); @@ -793,11 +793,11 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { placement="top" title={selectedVizMetadata?.label.description} > - - + +
{selectedVizMetadata.label.name}
-
-
+ + )} From cab3d573c99318eb49fee6c256bec9267acfdde3 Mon Sep 17 00:00:00 2001 From: stephenLYZ <750188453@qq.com> Date: Tue, 22 Feb 2022 21:05:23 +0800 Subject: [PATCH 08/16] take metadata out --- .../plugins/legacy-plugin-chart-world-map/src/index.js | 7 ------- .../plugins/legacy-preset-chart-nvd3/src/DistBar/index.js | 7 ------- .../src/BigNumber/BigNumberTotal/index.ts | 7 ------- .../src/BigNumber/BigNumberWithTrendline/index.ts | 7 ------- .../plugins/plugin-chart-echarts/src/Pie/index.ts | 7 ------- .../plugin-chart-echarts/src/Timeseries/Area/index.ts | 7 ------- .../src/Timeseries/Regular/Bar/index.ts | 7 ------- .../src/Timeseries/Regular/Line/index.ts | 7 ------- .../src/Timeseries/Regular/Scatter/index.ts | 7 ------- .../plugins/plugin-chart-pivot-table/src/plugin/index.ts | 7 ------- superset-frontend/plugins/plugin-chart-table/src/index.ts | 7 ------- 11 files changed, 77 deletions(-) diff --git a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js index 6a1c8314e394c..d97adfadf36c9 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js +++ b/superset-frontend/plugins/legacy-plugin-chart-world-map/src/index.js @@ -45,13 +45,6 @@ const metadata = new ChartMetadata({ ], thumbnail, useLegacyApi: true, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }); export default class WorldMapChartPlugin extends ChartPlugin { diff --git a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js index 2ce2d12f9e3bd..16b66c00b4c6d 100644 --- a/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js +++ b/superset-frontend/plugins/legacy-preset-chart-nvd3/src/DistBar/index.js @@ -51,13 +51,6 @@ const metadata = new ChartMetadata({ ], thumbnail, useLegacyApi: true, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }); export default class DistBarChartPlugin extends ChartPlugin { diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts index 4d6c1da2ca215..3f45db74cfd95 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberTotal/index.ts @@ -46,13 +46,6 @@ const metadata = new ChartMetadata({ t('Description'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }); export default class BigNumberTotalChartPlugin extends ChartPlugin< diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts index 0ff1f86aa84d0..e774db4824e06 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/BigNumber/BigNumberWithTrendline/index.ts @@ -45,13 +45,6 @@ const metadata = new ChartMetadata({ t('Trend'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }); export default class BigNumberWithTrendlineChartPlugin extends ChartPlugin< diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts index aa3068d5f0b62..873a6ac2343e4 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Pie/index.ts @@ -72,13 +72,6 @@ export default class EchartsPieChartPlugin extends ChartPlugin< t('ECharts'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }), transformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts index 9b9574e8dbb37..ee7c89993cb7e 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Area/index.ts @@ -83,13 +83,6 @@ export default class EchartsAreaChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }), transformProps: areaTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts index 5042ece758410..0ffc09098c70b 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts @@ -92,13 +92,6 @@ export default class EchartsTimeseriesBarChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }), transformProps: barTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts index a4c5a37badeee..6f4a780c36fc3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts @@ -85,13 +85,6 @@ export default class EchartsTimeseriesLineChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }), transformProps: lineTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts index d87fcb63cbfa4..7c77868a58451 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Scatter/index.ts @@ -86,13 +86,6 @@ export default class EchartsTimeseriesScatterChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }), transformProps: scatterTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts index c5132ce19c095..423ac596251bc 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/plugin/index.ts @@ -54,13 +54,6 @@ export default class PivotTableChartPlugin extends ChartPlugin< name: t('Pivot Table v2'), tags: [t('Additive'), t('Report'), t('Tabular'), t('Popular')], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }); super({ diff --git a/superset-frontend/plugins/plugin-chart-table/src/index.ts b/superset-frontend/plugins/plugin-chart-table/src/index.ts index e7989cc2097cf..bce2112d922df 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/index.ts +++ b/superset-frontend/plugins/plugin-chart-table/src/index.ts @@ -51,13 +51,6 @@ const metadata = new ChartMetadata({ t('Description'), ], thumbnail, - label: { - name: t('verified'), - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, - searchWeight: 0.5, }); export default class TableChartPlugin extends ChartPlugin< From 778b59ac05afcbd7d06bae8de1bb440feb88ccf6 Mon Sep 17 00:00:00 2001 From: stephenLYZ <750188453@qq.com> Date: Thu, 24 Feb 2022 23:33:38 +0800 Subject: [PATCH 09/16] use chartLabel enum to unify --- .../src/chart/models/ChartMetadata.ts | 26 ++++++----------- .../superset-ui-core/src/chart/types/Base.ts | 5 ++++ .../VizTypeControl/VizTypeGallery.tsx | 28 +++++++++++++------ 3 files changed, 32 insertions(+), 27 deletions(-) diff --git a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts index c57e37d53c357..1013eeee2d3b3 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/models/ChartMetadata.ts @@ -17,7 +17,7 @@ * under the License. */ -import { Behavior } from '../types/Base'; +import { Behavior, ChartLabel } from '../types/Base'; interface LookupTable { [key: string]: boolean; @@ -40,15 +40,13 @@ export interface ChartMetadataConfig { thumbnail: string; useLegacyApi?: boolean; behaviors?: Behavior[]; - deprecated?: boolean; exampleGallery?: ExampleImage[]; tags?: string[]; category?: string | null; label?: { - name: string; - description: string; - }; - searchWeight?: number; + name?: ChartLabel; + description?: string; + } | null; } export default class ChartMetadata { @@ -76,8 +74,6 @@ export default class ChartMetadata { enableNoResults: boolean; - deprecated: boolean; - exampleGallery: ExampleImage[]; tags: string[]; @@ -85,11 +81,9 @@ export default class ChartMetadata { category: string | null; label?: { - name: string; - description: string; - }; - - searchWeight: number; + name?: ChartLabel; + description?: string; + } | null; constructor(config: ChartMetadataConfig) { const { @@ -104,12 +98,10 @@ export default class ChartMetadata { behaviors = [], datasourceCount = 1, enableNoResults = true, - deprecated = false, exampleGallery = [], tags = [], category = null, - label, - searchWeight = 0, + label = null, } = config; this.name = name; @@ -132,12 +124,10 @@ export default class ChartMetadata { this.behaviors = behaviors; this.datasourceCount = datasourceCount; this.enableNoResults = enableNoResults; - this.deprecated = deprecated; this.exampleGallery = exampleGallery; this.tags = tags; this.category = category; this.label = label; - this.searchWeight = searchWeight; } canBeAnnotationType(type: string): boolean { diff --git a/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts b/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts index a3fe0f70a3fa2..694dd2a8bc120 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts @@ -52,4 +52,9 @@ export interface PlainObject { [key: string]: any; } +export enum ChartLabel { + VERIFIED = 'VERIFIED', + DEPRECATED = 'DEPRECATED', +} + export default {}; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 2fa31f594ef1b..009756241151c 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -33,6 +33,7 @@ import { ChartMetadata, SupersetTheme, useTheme, + ChartLabel, } from '@superset-ui/core'; import { Collapse, Input, Tooltip } from 'src/common/components'; import Label from 'src/components/Label'; @@ -111,6 +112,8 @@ const DEFAULT_ORDER = [ 'country_map', ]; +const CHART_LABEL_ORDER = [ChartLabel.DEPRECATED, ChartLabel.VERIFIED]; + const typesWithDefaultOrder = new Set(DEFAULT_ORDER); const THUMBNAIL_GRID_UNITS = 24; @@ -410,10 +413,10 @@ const Thumbnail: React.FC = ({ > {type.name} - {type.label && ( + {type.label?.name && ( -
{type.label.name}
+
{t(type.label?.name)}
)} @@ -499,7 +502,8 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { .map(([key, value]) => ({ key, value })) .filter( ({ value }) => - nativeFilterGate(value.behaviors || []) && !value.deprecated, + nativeFilterGate(value.behaviors || []) && + value.label?.name !== ChartLabel.DEPRECATED, ); result.sort((a, b) => vizSortFactor(a) - vizSortFactor(b)); return result; @@ -587,9 +591,15 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { return fuse .search(searchInputValue) .map(result => result.item) - .sort( - (a, b) => (b.value?.searchWeight || 0) - (a.value?.searchWeight || 0), - ); + .sort((a, b) => { + const aOrder = a.value?.label?.name + ? CHART_LABEL_ORDER.indexOf(a.value?.label?.name) + : 0; + const bOrder = b.value?.label?.name + ? CHART_LABEL_ORDER.indexOf(b.value?.label?.name) + : 0; + return bOrder - aOrder; + }); }, [searchInputValue, fuse]); const focusSearch = useCallback(() => { @@ -787,15 +797,15 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { `} > {selectedVizMetadata?.name} - {selectedVizMetadata?.label && ( + {selectedVizMetadata?.label?.name && ( -
{selectedVizMetadata.label.name}
+
{t(selectedVizMetadata.label?.name)}
From b0996972c434f1a6ee980b27c4819a7de01967d2 Mon Sep 17 00:00:00 2001 From: stephenLYZ <750188453@qq.com> Date: Tue, 8 Mar 2022 23:57:32 +0800 Subject: [PATCH 10/16] add test chart --- .../superset-ui-core/src/chart/types/Base.ts | 13 +++++++++++++ .../src/Timeseries/Regular/Bar/index.ts | 7 +++++++ .../src/Timeseries/Regular/Line/index.ts | 7 +++++++ .../src/Timeseries/Regular/SmoothLine/index.ts | 7 +++++++ .../plugin-chart-echarts/src/Treemap/index.ts | 8 +++++++- .../controls/VizTypeControl/VizTypeGallery.tsx | 15 +++++++-------- 6 files changed, 48 insertions(+), 9 deletions(-) diff --git a/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts b/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts index 694dd2a8bc120..aad547ca2aa5d 100644 --- a/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts +++ b/superset-frontend/packages/superset-ui-core/src/chart/types/Base.ts @@ -55,6 +55,19 @@ export interface PlainObject { export enum ChartLabel { VERIFIED = 'VERIFIED', DEPRECATED = 'DEPRECATED', + FEATURED = 'FEATURED', } +export const ChartLabelWeight = { + [ChartLabel.DEPRECATED]: { + weight: -0.1, + }, + [ChartLabel.VERIFIED]: { + weight: 0.2, + }, + [ChartLabel.FEATURED]: { + weight: 0.1, + }, +}; + export default {}; diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts index 0ffc09098c70b..855dd88689ee2 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts @@ -19,6 +19,7 @@ import { AnnotationType, Behavior, + ChartLabel, ChartMetadata, ChartPlugin, FeatureFlag, @@ -92,6 +93,12 @@ export default class EchartsTimeseriesBarChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, + label: { + name: ChartLabel.VERIFIED, + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + }, }), transformProps: barTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts index 6f4a780c36fc3..b162623de2468 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts @@ -19,6 +19,7 @@ import { AnnotationType, Behavior, + ChartLabel, ChartMetadata, ChartPlugin, FeatureFlag, @@ -85,6 +86,12 @@ export default class EchartsTimeseriesLineChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, + label: { + name: ChartLabel.FEATURED, + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + }, }), transformProps: lineTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts index ee348b272cd45..83a47bb5af705 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts @@ -19,6 +19,7 @@ import { AnnotationType, Behavior, + ChartLabel, ChartMetadata, ChartPlugin, FeatureFlag, @@ -85,6 +86,12 @@ export default class EchartsTimeseriesSmoothLineChartPlugin extends ChartPlugin< t('Transformable'), ], thumbnail, + label: { + name: ChartLabel.DEPRECATED, + description: t( + 'This chart was tested and verified, so the overall experience should be stable.', + ), + }, }), transformProps: smoothTransformProps, }); diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts index 575bb41fb9ee6..0b3f79b379021 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts @@ -17,7 +17,13 @@ * specific language governing permissions and limitations * under the License. */ -import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; +import { + Behavior, + ChartLabel, + ChartMetadata, + ChartPlugin, + t, +} from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; diff --git a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx index 31359e23c17ee..27d52f31fc981 100644 --- a/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx +++ b/superset-frontend/src/explore/components/controls/VizTypeControl/VizTypeGallery.tsx @@ -34,6 +34,7 @@ import { SupersetTheme, useTheme, ChartLabel, + ChartLabelWeight, } from '@superset-ui/core'; import { Collapse, Tooltip } from 'src/common/components'; import { Input } from 'src/components/Input'; @@ -113,8 +114,6 @@ const DEFAULT_ORDER = [ 'country_map', ]; -const CHART_LABEL_ORDER = [ChartLabel.DEPRECATED, ChartLabel.VERIFIED]; - const typesWithDefaultOrder = new Set(DEFAULT_ORDER); const THUMBNAIL_GRID_UNITS = 24; @@ -593,12 +592,12 @@ export default function VizTypeGallery(props: VizTypeGalleryProps) { .search(searchInputValue) .map(result => result.item) .sort((a, b) => { - const aOrder = a.value?.label?.name - ? CHART_LABEL_ORDER.indexOf(a.value?.label?.name) - : 0; - const bOrder = b.value?.label?.name - ? CHART_LABEL_ORDER.indexOf(b.value?.label?.name) - : 0; + const aName = a.value?.label?.name; + const bName = b.value?.label?.name; + const aOrder = + aName && ChartLabelWeight[aName] ? ChartLabelWeight[aName].weight : 0; + const bOrder = + bName && ChartLabelWeight[bName] ? ChartLabelWeight[bName].weight : 0; return bOrder - aOrder; }); }, [searchInputValue, fuse]); From 25a1cbeeacb557befbe75b735d00261cec550dc1 Mon Sep 17 00:00:00 2001 From: stephenLYZ <750188453@qq.com> Date: Thu, 10 Mar 2022 20:26:11 +0800 Subject: [PATCH 11/16] fix cache --- cache/00636784717bac3c630fdf38b6c5869d | Bin 45 -> 0 bytes cache/01933f71dc64dd593fac9f7ef979a8b4 | Bin 45 -> 0 bytes cache/04d83e7d3ec6b0943b2d04dce8cc4bcc | Bin 45 -> 0 bytes cache/0645c6a5260e9bc39fcc1e1208552dfb | Bin 45 -> 0 bytes cache/0bd655a438eb1715f3dfc024b3ba61fe | Bin 45 -> 0 bytes cache/1a122d92d565e037df6f834bd3c810f5 | Bin 45 -> 0 bytes cache/1cf43974d727e72a7eb46ab4fcf0701c | Bin 45 -> 0 bytes cache/23b82acc42f049a9b6722b98aa3ebc2f | Bin 45 -> 0 bytes cache/27154a02b55a4a7ae6eafe5a0bc7ce26 | Bin 45 -> 0 bytes cache/27d90410f18b617b03de14d3cf9247e2 | Bin 45 -> 0 bytes cache/290a29ada65a1539653c5bcb33d55e4b | Bin 45 -> 0 bytes cache/2b9d9fcb4ef69a4e26010552d02cb0c5 | Bin 45 -> 0 bytes cache/32d7563bae1eaee01f5b903c19c21050 | Bin 45 -> 0 bytes cache/32f246293fe6cc7c6dab30e24b530ad8 | Bin 45 -> 0 bytes cache/3c95b9ec84ce71d7a7057932d1e6c806 | Bin 45 -> 0 bytes cache/3cbaa3c7c1002ad2a9bfe3ce54c04c99 | Bin 45 -> 0 bytes cache/3d4c7c1797a7906b8bb9ef762d693462 | Bin 45 -> 0 bytes cache/419f1a706ca37a8e89cd3389e72ea50f | Bin 45 -> 0 bytes cache/41bc76502aaa17d747e7eed510087872 | Bin 45 -> 0 bytes cache/44f2946bfba7d56f9b9fe33fb0bb63df | Bin 45 -> 0 bytes cache/4d49b3cb3b8e7281f0cb13303c9ebef4 | Bin 45 -> 0 bytes cache/4e00f22aa9b9b9f685f3847c935d2924 | Bin 45 -> 0 bytes cache/4fe1e6f63edac5c9d924e9d961892525 | Bin 45 -> 0 bytes cache/5bd0a9be29c8ec869293478ae1501a27 | Bin 45 -> 0 bytes cache/640c00165e68bb3911f30de93c87454c | Bin 45 -> 0 bytes cache/6459cef815166c5de00f085ed3ea5f61 | Bin 45 -> 0 bytes cache/64b6d9f568048dd737180bc4208a224f | Bin 45 -> 0 bytes cache/6dbd6c3b755220a2d80256d90af042d7 | Bin 45 -> 0 bytes cache/71859bcac5bd3fde00952cf445cd2a72 | Bin 45 -> 0 bytes cache/77d1224cf583b2fb577de33514639f78 | Bin 45 -> 0 bytes cache/79548211a6177f436ad9eb0706afc7bd | Bin 45 -> 0 bytes cache/7c2348b7471c0bc6eaae445f19119ef1 | Bin 45 -> 0 bytes cache/7d127b68039b09d118eed582bd919c48 | Bin 45 -> 0 bytes cache/7e5eb83450d2c189f61f24e09a7de6e4 | Bin 45 -> 0 bytes cache/8151943005eba9b9e262bc71ffb3e41e | Bin 45 -> 0 bytes cache/88e6c43a2a3748b1627c635f777499e3 | Bin 45 -> 0 bytes cache/8a470169f6eacab8762086958caa6dac | Bin 45 -> 0 bytes cache/8a72cbf9fffec2d275dd30d90b682a6e | Bin 45 -> 0 bytes cache/8d3c245ab2bd087e81ba751e35f6d192 | Bin 45 -> 0 bytes cache/8e4699d3ec977e99426e37e9f27934d7 | Bin 45 -> 0 bytes cache/8f8ca0f6eb5e718dec36001af046036b | Bin 45 -> 0 bytes cache/917351f7f6538a3c39f1997aaee8f7f2 | Bin 45 -> 0 bytes cache/934baf843b92ba1d75a71465a138f066 | Bin 45 -> 0 bytes cache/9caa76381b918bcbf119b9599bf14078 | Bin 45 -> 0 bytes cache/a07a7ba0817412e797612a3a429bfc6f | Bin 45 -> 0 bytes cache/b54eeb3f22fd7b58f9abb118912e63b9 | Bin 45 -> 0 bytes cache/b60e9123f5be6d0caaca5a05acb440b9 | Bin 45 -> 0 bytes cache/b8bf663925a3752a0e1a2ce0193102cb | Bin 45 -> 0 bytes cache/b9adbc01cc5ee7a856e1304383766730 | Bin 45 -> 0 bytes cache/baad18b2313642939925c058e58049e4 | Bin 45 -> 0 bytes cache/c0242957517663512586b036620091fc | Bin 45 -> 0 bytes cache/c7e90a8c5b6d3e8e3ab49032add8b568 | Bin 45 -> 0 bytes cache/c9206adebf2928ae194c05363fab74c5 | Bin 45 -> 0 bytes cache/cd48046b1c641ccaac7594df75042d29 | Bin 45 -> 0 bytes cache/d346f820bfec36aecac205d7e37a2a9e | Bin 45 -> 0 bytes cache/d42b9ac9d87cd6c5db70bb4d81e2d0d1 | Bin 45 -> 0 bytes cache/d6f46690dcd230764e565a116e8abf8d | Bin 45 -> 0 bytes cache/e386e91bf32b401cbbe979e4d5e49e48 | Bin 153 -> 0 bytes cache/e41f95a65c969a6dbeee5705e3ef3b6d | Bin 45 -> 0 bytes cache/ea5f965c5216b3ab81db056655f5a9cc | Bin 45 -> 0 bytes cache/ee4ac302200a0d4831e832b4efee21a2 | Bin 45 -> 0 bytes cache/ee78c36abde3ede0b3b1b084370f30dd | Bin 45 -> 0 bytes cache/eeaeec4a16fcaf59171a71a3bd6e96b5 | Bin 45 -> 0 bytes cache/f181a3649f70294602fddba86f94a730 | Bin 45 -> 0 bytes cache/f894231cc97124a69b057a3e038704e9 | Bin 45 -> 0 bytes cache/fc9ece6d1dac7bcb6a574b8d43f244df | Bin 45 -> 0 bytes cache/fce5d4b4618d2069664790ed0698fa31 | Bin 45 -> 0 bytes 67 files changed, 0 insertions(+), 0 deletions(-) delete mode 100644 cache/00636784717bac3c630fdf38b6c5869d delete mode 100644 cache/01933f71dc64dd593fac9f7ef979a8b4 delete mode 100644 cache/04d83e7d3ec6b0943b2d04dce8cc4bcc delete mode 100644 cache/0645c6a5260e9bc39fcc1e1208552dfb delete mode 100644 cache/0bd655a438eb1715f3dfc024b3ba61fe delete mode 100644 cache/1a122d92d565e037df6f834bd3c810f5 delete mode 100644 cache/1cf43974d727e72a7eb46ab4fcf0701c delete mode 100644 cache/23b82acc42f049a9b6722b98aa3ebc2f delete mode 100644 cache/27154a02b55a4a7ae6eafe5a0bc7ce26 delete mode 100644 cache/27d90410f18b617b03de14d3cf9247e2 delete mode 100644 cache/290a29ada65a1539653c5bcb33d55e4b delete mode 100644 cache/2b9d9fcb4ef69a4e26010552d02cb0c5 delete mode 100644 cache/32d7563bae1eaee01f5b903c19c21050 delete mode 100644 cache/32f246293fe6cc7c6dab30e24b530ad8 delete mode 100644 cache/3c95b9ec84ce71d7a7057932d1e6c806 delete mode 100644 cache/3cbaa3c7c1002ad2a9bfe3ce54c04c99 delete mode 100644 cache/3d4c7c1797a7906b8bb9ef762d693462 delete mode 100644 cache/419f1a706ca37a8e89cd3389e72ea50f delete mode 100644 cache/41bc76502aaa17d747e7eed510087872 delete mode 100644 cache/44f2946bfba7d56f9b9fe33fb0bb63df delete mode 100644 cache/4d49b3cb3b8e7281f0cb13303c9ebef4 delete mode 100644 cache/4e00f22aa9b9b9f685f3847c935d2924 delete mode 100644 cache/4fe1e6f63edac5c9d924e9d961892525 delete mode 100644 cache/5bd0a9be29c8ec869293478ae1501a27 delete mode 100644 cache/640c00165e68bb3911f30de93c87454c delete mode 100644 cache/6459cef815166c5de00f085ed3ea5f61 delete mode 100644 cache/64b6d9f568048dd737180bc4208a224f delete mode 100644 cache/6dbd6c3b755220a2d80256d90af042d7 delete mode 100644 cache/71859bcac5bd3fde00952cf445cd2a72 delete mode 100644 cache/77d1224cf583b2fb577de33514639f78 delete mode 100644 cache/79548211a6177f436ad9eb0706afc7bd delete mode 100644 cache/7c2348b7471c0bc6eaae445f19119ef1 delete mode 100644 cache/7d127b68039b09d118eed582bd919c48 delete mode 100644 cache/7e5eb83450d2c189f61f24e09a7de6e4 delete mode 100644 cache/8151943005eba9b9e262bc71ffb3e41e delete mode 100644 cache/88e6c43a2a3748b1627c635f777499e3 delete mode 100644 cache/8a470169f6eacab8762086958caa6dac delete mode 100644 cache/8a72cbf9fffec2d275dd30d90b682a6e delete mode 100644 cache/8d3c245ab2bd087e81ba751e35f6d192 delete mode 100644 cache/8e4699d3ec977e99426e37e9f27934d7 delete mode 100644 cache/8f8ca0f6eb5e718dec36001af046036b delete mode 100644 cache/917351f7f6538a3c39f1997aaee8f7f2 delete mode 100644 cache/934baf843b92ba1d75a71465a138f066 delete mode 100644 cache/9caa76381b918bcbf119b9599bf14078 delete mode 100644 cache/a07a7ba0817412e797612a3a429bfc6f delete mode 100644 cache/b54eeb3f22fd7b58f9abb118912e63b9 delete mode 100644 cache/b60e9123f5be6d0caaca5a05acb440b9 delete mode 100644 cache/b8bf663925a3752a0e1a2ce0193102cb delete mode 100644 cache/b9adbc01cc5ee7a856e1304383766730 delete mode 100644 cache/baad18b2313642939925c058e58049e4 delete mode 100644 cache/c0242957517663512586b036620091fc delete mode 100644 cache/c7e90a8c5b6d3e8e3ab49032add8b568 delete mode 100644 cache/c9206adebf2928ae194c05363fab74c5 delete mode 100644 cache/cd48046b1c641ccaac7594df75042d29 delete mode 100644 cache/d346f820bfec36aecac205d7e37a2a9e delete mode 100644 cache/d42b9ac9d87cd6c5db70bb4d81e2d0d1 delete mode 100644 cache/d6f46690dcd230764e565a116e8abf8d delete mode 100644 cache/e386e91bf32b401cbbe979e4d5e49e48 delete mode 100644 cache/e41f95a65c969a6dbeee5705e3ef3b6d delete mode 100644 cache/ea5f965c5216b3ab81db056655f5a9cc delete mode 100644 cache/ee4ac302200a0d4831e832b4efee21a2 delete mode 100644 cache/ee78c36abde3ede0b3b1b084370f30dd delete mode 100644 cache/eeaeec4a16fcaf59171a71a3bd6e96b5 delete mode 100644 cache/f181a3649f70294602fddba86f94a730 delete mode 100644 cache/f894231cc97124a69b057a3e038704e9 delete mode 100644 cache/fc9ece6d1dac7bcb6a574b8d43f244df delete mode 100644 cache/fce5d4b4618d2069664790ed0698fa31 diff --git a/cache/00636784717bac3c630fdf38b6c5869d b/cache/00636784717bac3c630fdf38b6c5869d deleted file mode 100644 index 4be6cf990e5b48144ef6b6f3ba7e10203b65b829..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY|@w6vNuYq-{3|rfS%qdNs(!*3;JEc?)05>8In*aa+ diff --git a/cache/04d83e7d3ec6b0943b2d04dce8cc4bcc b/cache/04d83e7d3ec6b0943b2d04dce8cc4bcc deleted file mode 100644 index 0f2b9a59814c07a4f5bf308ff452ec2afea6244d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmebByV8@S*T6beh5-U|rfS%qdNs(!*3;JEc?)05!`FlK=n! diff --git a/cache/0645c6a5260e9bc39fcc1e1208552dfb b/cache/0645c6a5260e9bc39fcc1e1208552dfb deleted file mode 100644 index 07146ddcff627db14c532f4cd6ed4c48835c338c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZ@e%_O$*T6beh5-U|rfS%qdNs(!*3;JEc?)06RDivj6}9 diff --git a/cache/0bd655a438eb1715f3dfc024b3ba61fe b/cache/0bd655a438eb1715f3dfc024b3ba61fe deleted file mode 100644 index 76732062a37e6a58f722364ab9c95760c1ce7816..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZz{<0@YuYq-{3z>% diff --git a/cache/1a122d92d565e037df6f834bd3c810f5 b/cache/1a122d92d565e037df6f834bd3c810f5 deleted file mode 100644 index a314e6a6d285b431538cd1314e5704193a015fe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea0c-fPr*T6beh5-U|rfS%qdNs(!*3;JEc?)05A#;asU7T diff --git a/cache/1cf43974d727e72a7eb46ab4fcf0701c b/cache/1cf43974d727e72a7eb46ab4fcf0701c deleted file mode 100644 index c637706fac97fbebd19dd5e81fbf4dc25a1e24de..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeaud(o4m*T6beh5-U|rfS%qdNs(!*3;JEc?)06wP<#{d8T diff --git a/cache/23b82acc42f049a9b6722b98aa3ebc2f b/cache/23b82acc42f049a9b6722b98aa3ebc2f deleted file mode 100644 index 0f9a33f9a19d833b18759d1708b1d94d434bbf88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZT__QZUuYq-{3|rfS%qdNs(!*3;JEc?)04zxkTmS$7 diff --git a/cache/27d90410f18b617b03de14d3cf9247e2 b/cache/27d90410f18b617b03de14d3cf9247e2 deleted file mode 100644 index 7c25fd34c0e668fde7d1390a09c579b3185a2997..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZLf6$Yp*T6beh5-U|rfS%qdNs(!*3;JEc?)05Ka5cmMzZ diff --git a/cache/290a29ada65a1539653c5bcb33d55e4b b/cache/290a29ada65a1539653c5bcb33d55e4b deleted file mode 100644 index 1d81878cbe38041bfb056013b02343726c3ed155..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY|^Ry>PuYq-{3|rfS%qdNs(!*3;JEc?)051*>YybcN diff --git a/cache/32d7563bae1eaee01f5b903c19c21050 b/cache/32d7563bae1eaee01f5b903c19c21050 deleted file mode 100644 index 5b411a3ff09adfc2ed86ab025b084835d9320223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeYgd)bqu*T6beh5-U|rfS%qdNs(!*3;JEc?)057r*Z~y=R diff --git a/cache/32f246293fe6cc7c6dab30e24b530ad8 b/cache/32f246293fe6cc7c6dab30e24b530ad8 deleted file mode 100644 index 1d81878cbe38041bfb056013b02343726c3ed155..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY|^Ry>PuYq-{3|rfS%qdNs(!*3;JEc?)04(_qU;qFB diff --git a/cache/3cbaa3c7c1002ad2a9bfe3ce54c04c99 b/cache/3cbaa3c7c1002ad2a9bfe3ce54c04c99 deleted file mode 100644 index ed3543c13eae30b9610f061c4cb95dd3872769ba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmebBz1x$d*T6beh5-U|rfS%qdNs(!*3;JEc?)05>8In*aa+ diff --git a/cache/3d4c7c1797a7906b8bb9ef762d693462 b/cache/3d4c7c1797a7906b8bb9ef762d693462 deleted file mode 100644 index 5ce96720bc3ad493552dc00534974b4755c9802d..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea0c+iui*T6beh5-U|rfS%qdNs(!*3;JEc?)04|3PX#fBK diff --git a/cache/419f1a706ca37a8e89cd3389e72ea50f b/cache/419f1a706ca37a8e89cd3389e72ea50f deleted file mode 100644 index 2b636b07c51cf8701adc2ffeff7038336aede31a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea8@S-P4uYq-{3Px# diff --git a/cache/41bc76502aaa17d747e7eed510087872 b/cache/41bc76502aaa17d747e7eed510087872 deleted file mode 100644 index 22eb05d7156f463785d657e5e41aa64195a1888e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea0eA$zv*T6beh5-U|rfS%qdNs(!*3;JEc?)05CQVa{vGU diff --git a/cache/44f2946bfba7d56f9b9fe33fb0bb63df b/cache/44f2946bfba7d56f9b9fe33fb0bb63df deleted file mode 100644 index 1a3fd21114129d5253bddf5d05d68baaa832820e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY&eAttu*T6beh5-U|rfS%qdNs(!*3;JEc?)06qQ=!vFvP diff --git a/cache/4d49b3cb3b8e7281f0cb13303c9ebef4 b/cache/4d49b3cb3b8e7281f0cb13303c9ebef4 deleted file mode 100644 index 37203029594a1466846556846fa7a9a86da083e9..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea8_@XCCuYq-{3Hq)$ diff --git a/cache/4e00f22aa9b9b9f685f3847c935d2924 b/cache/4e00f22aa9b9b9f685f3847c935d2924 deleted file mode 100644 index 41c28a10915d9c35e262ecc8d255df8416153866..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY|ccmvuuYq-{3|rfS%qdNs(!*3;JEc?)06Pp0vH$=8 diff --git a/cache/5bd0a9be29c8ec869293478ae1501a27 b/cache/5bd0a9be29c8ec869293478ae1501a27 deleted file mode 100644 index 8ce070bf265ec83e97481ea41f51203e7855b4a4..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZDc;1tw*T6beh5-U|rfS%qdNs(!*3;JEc?)06Y{9xBvhE diff --git a/cache/640c00165e68bb3911f30de93c87454c b/cache/640c00165e68bb3911f30de93c87454c deleted file mode 100644 index 82cab9c0f1602ff85c5de32e7969211be274627e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZ@c;1tw*T6beh5-U|rfS%qdNs(!*3;JEc?)06Me|umAu6 diff --git a/cache/6459cef815166c5de00f085ed3ea5f61 b/cache/6459cef815166c5de00f085ed3ea5f61 deleted file mode 100644 index 5601431a3fa6dfbbfa3c459d4a763a34b35dcd3e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeaeaHS_nuYq-{3|rfS%qdNs(!*3;JEc?)05OV diff --git a/cache/71859bcac5bd3fde00952cf445cd2a72 b/cache/71859bcac5bd3fde00952cf445cd2a72 deleted file mode 100644 index 6f0b9786e3d25bc854cc16fbef5ea4263aff13fa..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZz_Od5QuYq-{3|rfS%qdNs(!*3;JEc?)04#A1T>t<8 diff --git a/cache/79548211a6177f436ad9eb0706afc7bd b/cache/79548211a6177f436ad9eb0706afc7bd deleted file mode 100644 index 22eb05d7156f463785d657e5e41aa64195a1888e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea0eA$zv*T6beh5-U|rfS%qdNs(!*3;JEc?)05CQVa{vGU diff --git a/cache/7c2348b7471c0bc6eaae445f19119ef1 b/cache/7c2348b7471c0bc6eaae445f19119ef1 deleted file mode 100644 index b7452fadc60c84fa93ef98c9e5744e6865ce24f3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeaebfqUruYq-{3|rfS%qdNs(!*3;JEc?)051*>YybcN diff --git a/cache/7e5eb83450d2c189f61f24e09a7de6e4 b/cache/7e5eb83450d2c189f61f24e09a7de6e4 deleted file mode 100644 index cc66cf85c307ee7c62c22192e86bb2e19f0dc97a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeaudfAht*T6beh5-U|rfS%qdNs(!*3;JEc?)06roP!~g&Q diff --git a/cache/8151943005eba9b9e262bc71ffb3e41e b/cache/8151943005eba9b9e262bc71ffb3e41e deleted file mode 100644 index 4cfdedb72a9f5c7e0f09c17d754883cb6c42c145..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeae{|rfS%qdNs(!*3;JEc?)04@U#W&i*H diff --git a/cache/8a470169f6eacab8762086958caa6dac b/cache/8a470169f6eacab8762086958caa6dac deleted file mode 100644 index a314e6a6d285b431538cd1314e5704193a015fe1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea0c-fPr*T6beh5-U|rfS%qdNs(!*3;JEc?)05A#;asU7T diff --git a/cache/8a72cbf9fffec2d275dd30d90b682a6e b/cache/8a72cbf9fffec2d275dd30d90b682a6e deleted file mode 100644 index 9036670ccf64a2cea9587535f775989bb0164c44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeaecBLmtuYq-{3|rfS%qdNs(!*3;JEc?)04>)JWdHyG diff --git a/cache/8e4699d3ec977e99426e37e9f27934d7 b/cache/8e4699d3ec977e99426e37e9f27934d7 deleted file mode 100644 index 4cfdedb72a9f5c7e0f09c17d754883cb6c42c145..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeae{|rfS%qdNs(!*3;JEc?)05G}^b^rhX diff --git a/cache/917351f7f6538a3c39f1997aaee8f7f2 b/cache/917351f7f6538a3c39f1997aaee8f7f2 deleted file mode 100644 index 2b636b07c51cf8701adc2ffeff7038336aede31a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea8@S-P4uYq-{3Px# diff --git a/cache/934baf843b92ba1d75a71465a138f066 b/cache/934baf843b92ba1d75a71465a138f066 deleted file mode 100644 index 1a83b666fee085b7a03dba1f219df181fe96601f..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeYgf6$Yp*T6beh5-U|rfS%qdNs(!*3;JEc?)04`e&XaE2J diff --git a/cache/9caa76381b918bcbf119b9599bf14078 b/cache/9caa76381b918bcbf119b9599bf14078 deleted file mode 100644 index 07146ddcff627db14c532f4cd6ed4c48835c338c..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZ@e%_O$*T6beh5-U|rfS%qdNs(!*3;JEc?)06RDivj6}9 diff --git a/cache/a07a7ba0817412e797612a3a429bfc6f b/cache/a07a7ba0817412e797612a3a429bfc6f deleted file mode 100644 index 4fdec6199f90ec809fa3ffbe7a33bcce25230653..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea`ebker*T6beh5-U|rfS%qdNs(!*3;JEc?)04(_qU;qFB diff --git a/cache/b54eeb3f22fd7b58f9abb118912e63b9 b/cache/b54eeb3f22fd7b58f9abb118912e63b9 deleted file mode 100644 index f8cfcc183797831906d34d49d0a4152707a88241..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea8{h}vHuYq-{3Px# diff --git a/cache/b8bf663925a3752a0e1a2ce0193102cb b/cache/b8bf663925a3752a0e1a2ce0193102cb deleted file mode 100644 index 022c2b306c9c8143407b9a4d7e9fdd6180e4cd85..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmebBx!aSZ*T6beh5-U|rfS%qdNs(!*3;JEc?)05|rfS%qdNs(!*3;JEc?)06RDivj6}9 diff --git a/cache/baad18b2313642939925c058e58049e4 b/cache/baad18b2313642939925c058e58049e4 deleted file mode 100644 index 0f9a33f9a19d833b18759d1708b1d94d434bbf88..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZT__QZUuYq-{3|rfS%qdNs(!*3;JEc?)04yC2TL1t6 diff --git a/cache/c7e90a8c5b6d3e8e3ab49032add8b568 b/cache/c7e90a8c5b6d3e8e3ab49032add8b568 deleted file mode 100644 index 1d81878cbe38041bfb056013b02343726c3ed155..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY|^Ry>PuYq-{3&vuYq-{3|rfS%qdNs(!*3;JEc?)05A#;asU7T diff --git a/cache/d346f820bfec36aecac205d7e37a2a9e b/cache/d346f820bfec36aecac205d7e37a2a9e deleted file mode 100644 index 82cab9c0f1602ff85c5de32e7969211be274627e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZ@c;1tw*T6beh5-U|rfS%qdNs(!*3;JEc?)06Me|umAu6 diff --git a/cache/d42b9ac9d87cd6c5db70bb4d81e2d0d1 b/cache/d42b9ac9d87cd6c5db70bb4d81e2d0d1 deleted file mode 100644 index 809edeeb64f69ca136eb8afed980676760aee3cd..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZ@dft|rfS%qdNs(!*3;JEc?)06Pp0vH$=8 diff --git a/cache/d6f46690dcd230764e565a116e8abf8d b/cache/d6f46690dcd230764e565a116e8abf8d deleted file mode 100644 index 24f8058f331326b111ab39db09cabb87a49646b1..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmea`deoDo*T6beh5-U|rfS%qdNs(!*3;JEc?)04#M5T>t<8 diff --git a/cache/e386e91bf32b401cbbe979e4d5e49e48 b/cache/e386e91bf32b401cbbe979e4d5e49e48 deleted file mode 100644 index 653799c7b1cb66e144cc511231cf6b869d8e4cb3..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 153 zcmeaWzS5JV*T6cpg8>3+r)c!B=9lNC7ESSH>|rfS%qdNs(vw%Myt=#&&6;uEQ>WL2${nWAKcQ(i|YwW6db(Jj9y*Cnwe5vaaaM=32crzEu~xFoS8 Q6(Rt%5zecvol>d?0CDUw=Kufz diff --git a/cache/e41f95a65c969a6dbeee5705e3ef3b6d b/cache/e41f95a65c969a6dbeee5705e3ef3b6d deleted file mode 100644 index 9036670ccf64a2cea9587535f775989bb0164c44..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeaecBLmtuYq-{3|rfS%qdNs(!*3;JEc?)051*>YybcN diff --git a/cache/ee4ac302200a0d4831e832b4efee21a2 b/cache/ee4ac302200a0d4831e832b4efee21a2 deleted file mode 100644 index 9bb5368c21e0dd23cb89c040555c2a468a9ef1e5..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeYgzT1|rfS%qdNs(!*3;JEc?)04*vGVE_OC diff --git a/cache/ee78c36abde3ede0b3b1b084370f30dd b/cache/ee78c36abde3ede0b3b1b084370f30dd deleted file mode 100644 index dfee25be9353aa07ca5d585d9ced7241630eacba..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY&c-WJq*T6beh5-U|rfS%qdNs(!*3;JEc?)06o$U!T|rfS%qdNs(!*3;JEc?)06(-2%>V!Z diff --git a/cache/f181a3649f70294602fddba86f94a730 b/cache/f181a3649f70294602fddba86f94a730 deleted file mode 100644 index d3762ee2f144e9e40b55eff974a5067aabbc1021..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeaOebSSp*T6beh5-U|rfS%qdNs(!*3;JEc?)06>op(f|Me diff --git a/cache/f894231cc97124a69b057a3e038704e9 b/cache/f894231cc97124a69b057a3e038704e9 deleted file mode 100644 index 5b411a3ff09adfc2ed86ab025b084835d9320223..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeYgd)bqu*T6beh5-U|rfS%qdNs(!*3;JEc?)057r*Z~y=R diff --git a/cache/fc9ece6d1dac7bcb6a574b8d43f244df b/cache/fc9ece6d1dac7bcb6a574b8d43f244df deleted file mode 100644 index d419ce1ef936f105f02014f81136bbb804912235..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeZrzS5JV*T6beh5-U|rfS%qdNs(!*3;JEc?)05j(fhyVZp diff --git a/cache/fce5d4b4618d2069664790ed0698fa31 b/cache/fce5d4b4618d2069664790ed0698fa31 deleted file mode 100644 index 1a3fd21114129d5253bddf5d05d68baaa832820e..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 45 wcmeY&eAttu*T6beh5-U|rfS%qdNs(!*3;JEc?)06qQ=!vFvP From 3f4a56f5598fd522c34b4fffa885598bf1256ff5 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Thu, 10 Mar 2022 15:08:34 -0700 Subject: [PATCH 12/16] Resolving TS Lint issue --- .../plugins/plugin-chart-echarts/src/Treemap/index.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts index 0b3f79b379021..a86b4cfea1541 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts @@ -19,7 +19,6 @@ */ import { Behavior, - ChartLabel, ChartMetadata, ChartPlugin, t, From 653667de52460aed17fba4362274ad2ab2b62a22 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Thu, 10 Mar 2022 15:17:52 -0700 Subject: [PATCH 13/16] Appeasing the linter --- .../plugins/plugin-chart-echarts/src/Treemap/index.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts index a86b4cfea1541..575bb41fb9ee6 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Treemap/index.ts @@ -17,12 +17,7 @@ * specific language governing permissions and limitations * under the License. */ -import { - Behavior, - ChartMetadata, - ChartPlugin, - t, -} from '@superset-ui/core'; +import { Behavior, ChartMetadata, ChartPlugin, t } from '@superset-ui/core'; import buildQuery from './buildQuery'; import controlPanel from './controlPanel'; import transformProps from './transformProps'; From 910bf2c67bcd1870662f6772f62b043b8feef336 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Fri, 11 Mar 2022 00:28:42 -0700 Subject: [PATCH 14/16] Removing one example implementation --- .../src/Timeseries/Regular/Bar/index.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts index 855dd88689ee2..0ffc09098c70b 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Bar/index.ts @@ -19,7 +19,6 @@ import { AnnotationType, Behavior, - ChartLabel, ChartMetadata, ChartPlugin, FeatureFlag, @@ -93,12 +92,6 @@ export default class EchartsTimeseriesBarChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, - label: { - name: ChartLabel.VERIFIED, - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, }), transformProps: barTransformProps, }); From cf7cb8cf099aae15a477e259e58bf2d87ceec626 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Fri, 11 Mar 2022 00:29:22 -0700 Subject: [PATCH 15/16] Removing another example label implementation --- .../src/Timeseries/Regular/Line/index.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts index b162623de2468..6f4a780c36fc3 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/Line/index.ts @@ -19,7 +19,6 @@ import { AnnotationType, Behavior, - ChartLabel, ChartMetadata, ChartPlugin, FeatureFlag, @@ -86,12 +85,6 @@ export default class EchartsTimeseriesLineChartPlugin extends ChartPlugin< t('Popular'), ], thumbnail, - label: { - name: ChartLabel.FEATURED, - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, }), transformProps: lineTransformProps, }); From e65142c9f21376af2a9996b685507450781e2607 Mon Sep 17 00:00:00 2001 From: Evan Rusackas Date: Fri, 11 Mar 2022 00:30:02 -0700 Subject: [PATCH 16/16] Removing the third example label implementation --- .../src/Timeseries/Regular/SmoothLine/index.ts | 7 ------- 1 file changed, 7 deletions(-) diff --git a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts index 83a47bb5af705..ee348b272cd45 100644 --- a/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts +++ b/superset-frontend/plugins/plugin-chart-echarts/src/Timeseries/Regular/SmoothLine/index.ts @@ -19,7 +19,6 @@ import { AnnotationType, Behavior, - ChartLabel, ChartMetadata, ChartPlugin, FeatureFlag, @@ -86,12 +85,6 @@ export default class EchartsTimeseriesSmoothLineChartPlugin extends ChartPlugin< t('Transformable'), ], thumbnail, - label: { - name: ChartLabel.DEPRECATED, - description: t( - 'This chart was tested and verified, so the overall experience should be stable.', - ), - }, }), transformProps: smoothTransformProps, });