From c41b5590633511651aa7ed1b5878c61f433daeae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Torkel=20=C3=96degaard?= Date: Fri, 26 Feb 2021 08:42:00 +0100 Subject: [PATCH] FolderPicker: Remove useNewForms from FolderPicker (#31485) * FolderPicker: Remove useNewForms from FolderPicker * Updated snapshot --- .../core/components/Select/FolderPicker.tsx | 46 +++++-------------- .../__snapshots__/FolderPicker.test.tsx.snap | 35 +++++--------- .../DashboardSettings/GeneralSettings.tsx | 1 - .../forms/SaveDashboardAsForm.tsx | 1 - .../components/ImportDashboardForm.tsx | 1 - .../search/components/MoveToFolderModal.tsx | 2 +- public/app/plugins/panel/dashlist/module.tsx | 1 - 7 files changed, 24 insertions(+), 63 deletions(-) diff --git a/public/app/core/components/Select/FolderPicker.tsx b/public/app/core/components/Select/FolderPicker.tsx index 0f78f3f94d8..eb849e7d803 100644 --- a/public/app/core/components/Select/FolderPicker.tsx +++ b/public/app/core/components/Select/FolderPicker.tsx @@ -18,7 +18,6 @@ export interface Props { dashboardId?: any; initialTitle?: string; initialFolderId?: number; - useNewForms?: boolean; } interface State { @@ -46,7 +45,6 @@ export class FolderPicker extends PureComponent { enableReset: false, initialTitle: '', enableCreateNew: false, - useNewForms: false, }; componentDidMount = async () => { @@ -148,41 +146,21 @@ export class FolderPicker extends PureComponent { render() { const { folder } = this.state; - const { enableCreateNew, useNewForms } = this.props; + const { enableCreateNew } = this.props; return (
- {useNewForms && ( - - )} - {!useNewForms && ( -
-
- - -
-
- )} +
); } diff --git a/public/app/core/components/Select/__snapshots__/FolderPicker.test.tsx.snap b/public/app/core/components/Select/__snapshots__/FolderPicker.test.tsx.snap index 3c42ca8d248..98b9a3bfde6 100644 --- a/public/app/core/components/Select/__snapshots__/FolderPicker.test.tsx.snap +++ b/public/app/core/components/Select/__snapshots__/FolderPicker.test.tsx.snap @@ -4,29 +4,16 @@ exports[`FolderPicker should render 1`] = `
-
-
- - -
-
+
`; diff --git a/public/app/features/dashboard/components/DashboardSettings/GeneralSettings.tsx b/public/app/features/dashboard/components/DashboardSettings/GeneralSettings.tsx index edfa4f71bd0..280e49ec8c3 100644 --- a/public/app/features/dashboard/components/DashboardSettings/GeneralSettings.tsx +++ b/public/app/features/dashboard/components/DashboardSettings/GeneralSettings.tsx @@ -84,7 +84,6 @@ export const GeneralSettings: React.FC = ({ dashboard }) => { diff --git a/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx b/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx index dc93b5effb0..566dcd5bb24 100644 --- a/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx +++ b/public/app/features/manage-dashboards/components/ImportDashboardForm.tsx @@ -68,7 +68,6 @@ export const ImportDashboardForm: FC = ({ = ({ results, onMoveItems, isOpen, onD Move the {selectedDashboards.length} selected dashboard{selectedDashboards.length === 1 ? '' : 's'} to the following folder:

- setFolder(f as FolderInfo)} useNewForms /> + setFolder(f as FolderInfo)} /> diff --git a/public/app/plugins/panel/dashlist/module.tsx b/public/app/plugins/panel/dashlist/module.tsx index c0b9ba67bc9..16817c5c953 100644 --- a/public/app/plugins/panel/dashlist/module.tsx +++ b/public/app/plugins/panel/dashlist/module.tsx @@ -48,7 +48,6 @@ export const plugin = new PanelPlugin(DashList) return ( props.onChange(id)}