From f4f586b79d058f99e91b059f71655b549c4229e1 Mon Sep 17 00:00:00 2001 From: SRK Date: Sun, 5 May 2024 18:09:57 -0700 Subject: [PATCH 1/7] fix: Add back description column to saved queries #12431 --- superset-frontend/src/pages/SavedQueryList/index.tsx | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx index bbad3c89fb884..4aeb03ed070a8 100644 --- a/superset-frontend/src/pages/SavedQueryList/index.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -297,6 +297,10 @@ function SavedQueryList({ accessor: 'label', Header: t('Name'), }, + { + accessor: 'description', + Header: t('Description'), + }, { accessor: 'database.database_name', Header: t('Database'), @@ -449,6 +453,12 @@ function SavedQueryList({ input: 'search', operator: FilterOperator.AllText, }, + { + Header: t('Description'), + id: 'description', + key: 'description', + operator: FilterOperator.AllText, + }, { Header: t('Database'), key: 'database', From 64b97bb53b346830e6657e1c1719a25ca13d392b Mon Sep 17 00:00:00 2001 From: SRK Date: Sun, 5 May 2024 19:34:02 -0700 Subject: [PATCH 2/7] fix: Add back description column to saved queries #12431 - Review comments --- superset-frontend/src/pages/SavedQueryList/index.tsx | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx index 4aeb03ed070a8..c3051d7ea70b5 100644 --- a/superset-frontend/src/pages/SavedQueryList/index.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -447,18 +447,12 @@ function SavedQueryList({ const filters: Filters = useMemo( () => [ { - Header: t('Name'), + Header: t('search'), id: 'label', key: 'search', input: 'search', operator: FilterOperator.AllText, }, - { - Header: t('Description'), - id: 'description', - key: 'description', - operator: FilterOperator.AllText, - }, { Header: t('Database'), key: 'database', From 4c962fb7ba6e5f39b6b561b3fa40c83b5be93376 Mon Sep 17 00:00:00 2001 From: Sivaramakrishnan Vaidyanathan Date: Mon, 6 May 2024 07:58:45 -0700 Subject: [PATCH 3/7] Update superset-frontend/src/pages/SavedQueryList/index.tsx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: ʈᵃᵢ --- superset-frontend/src/pages/SavedQueryList/index.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx index c3051d7ea70b5..1709d102c103f 100644 --- a/superset-frontend/src/pages/SavedQueryList/index.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -447,7 +447,7 @@ function SavedQueryList({ const filters: Filters = useMemo( () => [ { - Header: t('search'), + Header: t('Search'), id: 'label', key: 'search', input: 'search', From 20ac8d9b8219e3a95277300b4c80607067653066 Mon Sep 17 00:00:00 2001 From: SRK Date: Mon, 6 May 2024 16:27:09 -0700 Subject: [PATCH 4/7] chore: add tooltip for search box --- .../src/components/ListView/Filters/Search.tsx | 11 ++++++++++- .../src/components/ListView/Filters/index.tsx | 2 ++ superset-frontend/src/components/ListView/types.ts | 1 + superset-frontend/src/pages/SavedQueryList/index.tsx | 2 ++ 4 files changed, 15 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/components/ListView/Filters/Search.tsx b/superset-frontend/src/components/ListView/Filters/Search.tsx index 60cfe41bac070..41e262d47d97c 100644 --- a/superset-frontend/src/components/ListView/Filters/Search.tsx +++ b/superset-frontend/src/components/ListView/Filters/Search.tsx @@ -22,12 +22,14 @@ import Icons from 'src/components/Icons'; import { AntdInput } from 'src/components'; import { SELECT_WIDTH } from 'src/components/ListView/utils'; import { FormLabel } from 'src/components/Form'; +import InfoTooltip from 'src/components/InfoTooltip'; import { BaseFilter, FilterHandler } from './Base'; interface SearchHeaderProps extends BaseFilter { Header: string; onSubmit: (val: string) => void; name: string; + toolTipDescription: string; } const Container = styled.div` @@ -43,7 +45,13 @@ const StyledInput = styled(AntdInput)` `; function SearchFilter( - { Header, name, initialValue, onSubmit }: SearchHeaderProps, + { + Header, + name, + initialValue, + toolTipDescription, + onSubmit, + }: SearchHeaderProps, ref: React.RefObject, ) { const [value, setValue] = useState(initialValue || ''); @@ -69,6 +77,7 @@ function SearchFilter( return ( {Header} + {toolTipDescription && } { if (onFilterUpdate) { onFilterUpdate(value); diff --git a/superset-frontend/src/components/ListView/types.ts b/superset-frontend/src/components/ListView/types.ts index 1082c764f58ee..ca3a8b3c70923 100644 --- a/superset-frontend/src/components/ListView/types.ts +++ b/superset-frontend/src/components/ListView/types.ts @@ -39,6 +39,7 @@ export interface Filter { Header: ReactNode; key: string; id: string; + toolTipDescription?: string; urlDisplay?: string; operator?: FilterOperator; input?: diff --git a/superset-frontend/src/pages/SavedQueryList/index.tsx b/superset-frontend/src/pages/SavedQueryList/index.tsx index 1709d102c103f..136f708122f82 100644 --- a/superset-frontend/src/pages/SavedQueryList/index.tsx +++ b/superset-frontend/src/pages/SavedQueryList/index.tsx @@ -452,6 +452,8 @@ function SavedQueryList({ key: 'search', input: 'search', operator: FilterOperator.AllText, + toolTipDescription: + 'Searches all text fields: Name, Description, Database & Schema', }, { Header: t('Database'), From 5985dc04ef2eb6a6aa3302af83d60194926bc15f Mon Sep 17 00:00:00 2001 From: SRK Date: Tue, 7 May 2024 21:23:16 -0700 Subject: [PATCH 5/7] chore: add tooltip for search box --- superset-frontend/src/components/InfoTooltip/index.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/superset-frontend/src/components/InfoTooltip/index.tsx b/superset-frontend/src/components/InfoTooltip/index.tsx index a3ad7aa21acb3..d92bd67e811d6 100644 --- a/superset-frontend/src/components/InfoTooltip/index.tsx +++ b/superset-frontend/src/components/InfoTooltip/index.tsx @@ -83,7 +83,11 @@ export default function InfoTooltip({ overlayStyle={overlayStyle} color={bgColor} > - + ); } From 33444615c3ae8ff2a07700bba2390b2e0bd99090 Mon Sep 17 00:00:00 2001 From: SRK Date: Tue, 7 May 2024 21:23:16 -0700 Subject: [PATCH 6/7] chore: add tooltip for search box --- .../src/components/ListView/Filters/Search.tsx | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/superset-frontend/src/components/ListView/Filters/Search.tsx b/superset-frontend/src/components/ListView/Filters/Search.tsx index 41e262d47d97c..9fd864c44a41f 100644 --- a/superset-frontend/src/components/ListView/Filters/Search.tsx +++ b/superset-frontend/src/components/ListView/Filters/Search.tsx @@ -29,7 +29,7 @@ interface SearchHeaderProps extends BaseFilter { Header: string; onSubmit: (val: string) => void; name: string; - toolTipDescription: string; + toolTipDescription: string | undefined; } const Container = styled.div` @@ -77,7 +77,9 @@ function SearchFilter( return ( {Header} - {toolTipDescription && } + {toolTipDescription && ( + + )} Date: Thu, 9 May 2024 19:36:12 -0700 Subject: [PATCH 7/7] chore: add tooltip for search box --- superset-frontend/src/components/InfoTooltip/index.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/superset-frontend/src/components/InfoTooltip/index.tsx b/superset-frontend/src/components/InfoTooltip/index.tsx index d92bd67e811d6..a3ad7aa21acb3 100644 --- a/superset-frontend/src/components/InfoTooltip/index.tsx +++ b/superset-frontend/src/components/InfoTooltip/index.tsx @@ -83,11 +83,7 @@ export default function InfoTooltip({ overlayStyle={overlayStyle} color={bgColor} > - + ); }