From 90c3d74955dc96274d0fe21155e450623ec1145b Mon Sep 17 00:00:00 2001 From: Josh Hunt Date: Fri, 14 Jun 2024 14:01:18 +0100 Subject: [PATCH] LibraryPanels: Replace 'General' folder with 'Dashboards' (#89220) Show 'Dashboards' for library panels not in a folder --- .betterer.results | 3 +++ .../components/LibraryPanelCard/LibraryPanelCard.tsx | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/.betterer.results b/.betterer.results index 0266d833b36..2efe1b0e08a 100644 --- a/.betterer.results +++ b/.betterer.results @@ -4553,6 +4553,9 @@ exports[`better eslint`] = { [0, 0, 0, "No untranslated strings. Wrap text with ", "3"], [0, 0, 0, "No untranslated strings. Wrap text with ", "4"] ], + "public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx:5381": [ + [0, 0, 0, "No untranslated strings. Wrap text with ", "0"] + ], "public/app/features/library-panels/components/LibraryPanelInfo/LibraryPanelInfo.tsx:5381": [ [0, 0, 0, "No untranslated strings. Wrap text with ", "0"], [0, 0, 0, "No untranslated strings. Wrap text with ", "1"], diff --git a/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx b/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx index dea580a005e..f3f68dde0f0 100644 --- a/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx +++ b/public/app/features/library-panels/components/LibraryPanelCard/LibraryPanelCard.tsx @@ -80,11 +80,12 @@ function FolderLink({ libraryPanel }: FolderLinkProps): ReactElement | null { return null; } + // LibraryPanels API returns folder-less library panels with an empty string folder UID if (!libraryPanel.meta.folderUid) { return ( - {libraryPanel.meta.folderName} + Dashboards ); }