You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by hu...@apache.org on 2023/07/27 00:24:31 UTC

[superset] branch master updated: feat: add empty state for Tags (#24702)

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

hugh 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 e5d626c304 feat: add empty state for Tags (#24702)
e5d626c304 is described below

commit e5d626c30407e0d97d414d033a2a9167714589d8
Author: Hugh A. Miles II <hu...@gmail.com>
AuthorDate: Wed Jul 26 20:24:25 2023 -0400

    feat: add empty state for Tags (#24702)
---
 superset-frontend/src/pages/Tags/index.tsx | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/superset-frontend/src/pages/Tags/index.tsx b/superset-frontend/src/pages/Tags/index.tsx
index 87cf7c787b..41ab3ea5ae 100644
--- a/superset-frontend/src/pages/Tags/index.tsx
+++ b/superset-frontend/src/pages/Tags/index.tsx
@@ -43,6 +43,21 @@ import { Tag as AntdTag } from 'antd';
 import { Tag } from 'src/views/CRUD/types';
 import TagCard from 'src/features/tags/TagCard';
 
+const emptyState = {
+  title: t('No Tags created'),
+  image: 'dashboard.svg',
+  description:
+    'Create a new tag and assign it to existing entities like charts or dashboards',
+  buttonAction: () => {},
+  // todo(hughhh): Add this back once Tag modal is functional
+  // buttonText: (
+  //   <>
+  //     <i className="fa fa-plus" data-test="add-rule-empty" />{' '}
+  //     {'Create a new Tag'}{' '}
+  //   </>
+  // ),
+};
+
 const PAGE_SIZE = 25;
 
 interface TagListProps {
@@ -303,6 +318,7 @@ function TagList(props: TagListProps) {
                 count={tagCount}
                 data={tags.filter(tag => !tag.name.includes(':'))}
                 disableBulkSelect={toggleBulkSelect}
+                emptyState={emptyState}
                 fetchData={fetchData}
                 filters={filters}
                 initialSort={initialSort}