This is an automated email from the ASF dual-hosted git repository.

rusackas pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new c51ca98e14 fix: Add back description column to saved queries #12431 
(#28349)
c51ca98e14 is described below

commit c51ca98e142e951414c0ca6c0693c0a3624b5382
Author: Sivaramakrishnan Vaidyanathan <[email protected]>
AuthorDate: Fri May 17 12:18:14 2024 -0700

    fix: Add back description column to saved queries #12431 (#28349)
    
    Co-authored-by: SRK <[email protected]>
    Co-authored-by: ʈᵃᵢ <[email protected]>
---
 .../src/components/ListView/Filters/Search.tsx              | 13 ++++++++++++-
 superset-frontend/src/components/ListView/Filters/index.tsx |  2 ++
 superset-frontend/src/components/ListView/types.ts          |  1 +
 superset-frontend/src/pages/SavedQueryList/index.tsx        |  8 +++++++-
 4 files changed, 22 insertions(+), 2 deletions(-)

diff --git a/superset-frontend/src/components/ListView/Filters/Search.tsx 
b/superset-frontend/src/components/ListView/Filters/Search.tsx
index 60cfe41bac..9fd864c44a 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 | undefined;
 }
 
 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<FilterHandler>,
 ) {
   const [value, setValue] = useState(initialValue || '');
@@ -69,6 +77,9 @@ function SearchFilter(
   return (
     <Container>
       <FormLabel>{Header}</FormLabel>
+      {toolTipDescription && (
+        <InfoTooltip tooltip={toolTipDescription} viewBox="0 -7 28 28" />
+      )}
       <StyledInput
         allowClear
         data-test="filters-search"
diff --git a/superset-frontend/src/components/ListView/Filters/index.tsx 
b/superset-frontend/src/components/ListView/Filters/index.tsx
index dbbc761cb8..03228e8534 100644
--- a/superset-frontend/src/components/ListView/Filters/index.tsx
+++ b/superset-frontend/src/components/ListView/Filters/index.tsx
@@ -71,6 +71,7 @@ function UIFilters(
             input,
             paginate,
             selects,
+            toolTipDescription,
             onFilterUpdate,
           },
           index,
@@ -111,6 +112,7 @@ function UIFilters(
                 initialValue={initialValue}
                 key={key}
                 name={id}
+                toolTipDescription={toolTipDescription}
                 onSubmit={(value: string) => {
                   if (onFilterUpdate) {
                     onFilterUpdate(value);
diff --git a/superset-frontend/src/components/ListView/types.ts 
b/superset-frontend/src/components/ListView/types.ts
index 1082c764f5..ca3a8b3c70 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 bbad3c89fb..136f708122 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'),
@@ -443,11 +447,13 @@ function SavedQueryList({
   const filters: Filters = useMemo(
     () => [
       {
-        Header: t('Name'),
+        Header: t('Search'),
         id: 'label',
         key: 'search',
         input: 'search',
         operator: FilterOperator.AllText,
+        toolTipDescription:
+          'Searches all text fields: Name, Description, Database & Schema',
       },
       {
         Header: t('Database'),

Reply via email to