From e5d626c30407e0d97d414d033a2a9167714589d8 Mon Sep 17 00:00:00 2001 From: "Hugh A. Miles II" Date: Wed, 26 Jul 2023 20:24:25 -0400 Subject: [PATCH] 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: ( + // <> + // {' '} + // {'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}