VisualizationSuggestions: Support image & text instead of real previews. Adds suggestions for all non data panels when there are no data (#42074)

* Make suggestion cards support img & text mode instead of only preview

* Generic solution for non data panels

* minor review tweaks
This commit is contained in:
Torkel Ödegaard
2021-11-25 10:52:01 +01:00
committed by GitHub
parent a897154017
commit 781067ee45
22 changed files with 163 additions and 145 deletions

View File

@@ -57,21 +57,6 @@ export const VisualizationSelectPane: FC<Props> = ({ panel, data }) => {
dispatch(toggleVizPicker(false));
};
// const onKeyPress = useCallback(
// (e: React.KeyboardEvent<HTMLInputElement>) => {
// if (e.key === 'Enter') {
// const query = e.currentTarget.value;
// const plugins = getAllPanelPluginMeta();
// const match = filterPluginList(plugins, query, plugin.meta);
// if (match && match.length) {
// onPluginTypeChange(match[0], false);
// }
// }
// },
// [onPluginTypeChange, plugin.meta]
// );
if (!plugin) {
return null;
}