Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add empty state for Tags #24702

Merged
merged 3 commits into from
Jul 27, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions superset-frontend/src/pages/Tags/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we have a different image to use here?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes but this is what @kasiazjc wanted for the empty for tags

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 {
Expand Down Expand Up @@ -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}
Expand Down
Loading