diff --git a/superset-frontend/src/components/CertifiedIcon/CertifiedIcon.stories.tsx b/superset-frontend/src/components/CertifiedBadge/CertifiedBadge.stories.tsx
similarity index 84%
rename from superset-frontend/src/components/CertifiedIcon/CertifiedIcon.stories.tsx
rename to superset-frontend/src/components/CertifiedBadge/CertifiedBadge.stories.tsx
index 0bafe583a67df..bd2e39287fd19 100644
--- a/superset-frontend/src/components/CertifiedIcon/CertifiedIcon.stories.tsx
+++ b/superset-frontend/src/components/CertifiedBadge/CertifiedBadge.stories.tsx
@@ -17,14 +17,14 @@
* under the License.
*/
import React from 'react';
-import CertifiedIcon, { CertifiedIconProps } from '.';
+import CertifiedBadge, { CertifiedBadgeProps } from '.';
export default {
- title: 'CertifiedIconWithTooltip',
+ title: 'CertifiedBadgeWithTooltip',
};
-export const InteractiveIcon = (args: CertifiedIconProps) => (
-
+export const InteractiveIcon = (args: CertifiedBadgeProps) => (
+
);
InteractiveIcon.args = {
diff --git a/superset-frontend/src/components/CertifiedIcon/CertifiedIcon.test.tsx b/superset-frontend/src/components/CertifiedBadge/CertifiedBadge.test.tsx
similarity index 88%
rename from superset-frontend/src/components/CertifiedIcon/CertifiedIcon.test.tsx
rename to superset-frontend/src/components/CertifiedBadge/CertifiedBadge.test.tsx
index 3bdb36d80c1bc..dd7ebb8bf9371 100644
--- a/superset-frontend/src/components/CertifiedIcon/CertifiedIcon.test.tsx
+++ b/superset-frontend/src/components/CertifiedBadge/CertifiedBadge.test.tsx
@@ -19,29 +19,29 @@
import React from 'react';
import { render, screen } from 'spec/helpers/testing-library';
import userEvent from '@testing-library/user-event';
-import CertifiedIcon from 'src/components/CertifiedIcon';
+import CertifiedBadge from 'src/components/CertifiedBadge';
test('renders with default props', () => {
- render();
+ render();
expect(screen.getByRole('img')).toBeInTheDocument();
});
test('renders a tooltip when hovered', async () => {
- render();
+ render();
userEvent.hover(screen.getByRole('img'));
expect(await screen.findByRole('tooltip')).toBeInTheDocument();
});
test('renders with certified by', async () => {
const certifiedBy = 'Trusted Authority';
- render();
+ render();
userEvent.hover(screen.getByRole('img'));
expect(await screen.findByRole('tooltip')).toHaveTextContent(certifiedBy);
});
test('renders with details', async () => {
const details = 'All requirements have been met.';
- render();
+ render();
userEvent.hover(screen.getByRole('img'));
expect(await screen.findByRole('tooltip')).toHaveTextContent(details);
});
diff --git a/superset-frontend/src/components/CertifiedIcon/index.tsx b/superset-frontend/src/components/CertifiedBadge/index.tsx
similarity index 92%
rename from superset-frontend/src/components/CertifiedIcon/index.tsx
rename to superset-frontend/src/components/CertifiedBadge/index.tsx
index 4aa0dad236b12..6ad82fb1c83a8 100644
--- a/superset-frontend/src/components/CertifiedIcon/index.tsx
+++ b/superset-frontend/src/components/CertifiedBadge/index.tsx
@@ -21,17 +21,17 @@ import { t, supersetTheme } from '@superset-ui/core';
import Icons, { IconType } from 'src/components/Icons';
import { Tooltip } from 'src/components/Tooltip';
-export interface CertifiedIconProps {
+export interface CertifiedBadgeProps {
certifiedBy?: string;
details?: string;
size?: IconType['iconSize'];
}
-function CertifiedIcon({
+function CertifiedBadge({
certifiedBy,
details,
size = 'l',
-}: CertifiedIconProps) {
+}: CertifiedBadgeProps) {
return (
{record.is_certified && (
-
@@ -302,7 +302,7 @@ function ColumnCollectionTable({
) : (
{record.is_certified && (
-
@@ -1113,7 +1113,7 @@ class DatasourceEditor extends React.PureComponent {
metric_name: (v, onChange, _, record) => (
{record.is_certified && (
-
diff --git a/superset-frontend/src/components/EditableTitle/index.tsx b/superset-frontend/src/components/EditableTitle/index.tsx
index c5350416ca9f6..b0d1f7abcd2f5 100644
--- a/superset-frontend/src/components/EditableTitle/index.tsx
+++ b/superset-frontend/src/components/EditableTitle/index.tsx
@@ -20,7 +20,7 @@ import React, { useEffect, useState, useRef } from 'react';
import cx from 'classnames';
import { styled, t } from '@superset-ui/core';
import { Tooltip } from 'src/components/Tooltip';
-import CertifiedIcon from '../CertifiedIcon';
+import CertifiedBadge from '../CertifiedBadge';
export interface EditableTitleProps {
canEdit?: boolean;
@@ -39,7 +39,7 @@ export interface EditableTitleProps {
certificationDetails?: string;
}
-const StyledCertifiedIcon = styled(CertifiedIcon)`
+const StyledCertifiedBadge = styled(CertifiedBadge)`
vertical-align: middle;
`;
@@ -233,7 +233,7 @@ export default function EditableTitle({
>
{certifiedBy && (
<>
- {' '}
diff --git a/superset-frontend/src/components/ListViewCard/index.tsx b/superset-frontend/src/components/ListViewCard/index.tsx
index f40cead9c81d2..6f0e822069d76 100644
--- a/superset-frontend/src/components/ListViewCard/index.tsx
+++ b/superset-frontend/src/components/ListViewCard/index.tsx
@@ -21,7 +21,7 @@ import { styled, useTheme } from '@superset-ui/core';
import { AntdCard, Skeleton, ThinSkeleton } from 'src/common/components';
import { Tooltip } from 'src/components/Tooltip';
import ImageLoader, { BackgroundPosition } from './ImageLoader';
-import CertifiedIcon from '../CertifiedIcon';
+import CertifiedBadge from '../CertifiedBadge';
const ActionsWrapper = styled.div`
width: 64px;
@@ -257,7 +257,7 @@ function ListViewCard({
{certifiedBy && (
<>
- {' '}
diff --git a/superset-frontend/src/components/TableSelector/index.tsx b/superset-frontend/src/components/TableSelector/index.tsx
index 952cf124bd471..171c817eede7d 100644
--- a/superset-frontend/src/components/TableSelector/index.tsx
+++ b/superset-frontend/src/components/TableSelector/index.tsx
@@ -31,7 +31,7 @@ import DatabaseSelector, {
DatabaseObject,
} from 'src/components/DatabaseSelector';
import RefreshLabel from 'src/components/RefreshLabel';
-import CertifiedIcon from 'src/components/CertifiedIcon';
+import CertifiedBadge from 'src/components/CertifiedBadge';
import WarningIconWithTooltip from 'src/components/WarningIconWithTooltip';
const TableSelectorWrapper = styled.div`
@@ -123,7 +123,7 @@ const TableOption = ({ table }: { table: Table }) => {
)}
{extra?.certification && (
-
{slice?.certified_by && (
<>
- {' '}
diff --git a/superset-frontend/src/views/CRUD/chart/ChartList.tsx b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
index 6982f784bbb4c..33236591b0580 100644
--- a/superset-frontend/src/views/CRUD/chart/ChartList.tsx
+++ b/superset-frontend/src/views/CRUD/chart/ChartList.tsx
@@ -58,7 +58,7 @@ import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
import { nativeFilterGate } from 'src/dashboard/components/nativeFilters/utils';
import setupPlugins from 'src/setup/setupPlugins';
-import CertifiedIcon from 'src/components/CertifiedIcon';
+import CertifiedBadge from 'src/components/CertifiedBadge';
import ChartCard from './ChartCard';
const PAGE_SIZE = 25;
@@ -249,7 +249,7 @@ function ChartList(props: ChartListProps) {
{certifiedBy && (
<>
- {' '}
diff --git a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
index 6d4ba8b4847eb..075af9fd7b545 100644
--- a/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
+++ b/superset-frontend/src/views/CRUD/dashboard/DashboardList.tsx
@@ -49,7 +49,7 @@ import ImportModelsModal from 'src/components/ImportModal/index';
import OmniContainer from 'src/components/OmniContainer';
import Dashboard from 'src/dashboard/containers/Dashboard';
-import CertifiedIcon from 'src/components/CertifiedIcon';
+import CertifiedBadge from 'src/components/CertifiedBadge';
import DashboardCard from './DashboardCard';
import { DashboardStatus } from './types';
@@ -266,7 +266,7 @@ function DashboardList(props: DashboardListProps) {
{certifiedBy && (
<>
- {' '}
diff --git a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
index ea3048cf575d6..39f8ba0e0265a 100644
--- a/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
+++ b/superset-frontend/src/views/CRUD/data/dataset/DatasetList.tsx
@@ -51,7 +51,7 @@ import withToasts from 'src/components/MessageToasts/withToasts';
import { Tooltip } from 'src/components/Tooltip';
import Icons from 'src/components/Icons';
import FacePile from 'src/components/FacePile';
-import CertifiedIcon from 'src/components/CertifiedIcon';
+import CertifiedBadge from 'src/components/CertifiedBadge';
import InfoTooltip from 'src/components/InfoTooltip';
import ImportModelsModal from 'src/components/ImportModal/index';
import { isFeatureEnabled, FeatureFlag } from 'src/featureFlags';
@@ -254,7 +254,7 @@ const DatasetList: FunctionComponent = ({
return (
{parsedExtra?.certification && (
-