mirror of
https://github.com/apache/superset.git
synced 2026-05-10 18:35:40 +00:00
refactor(Icons): Replaces custom icons with Ant Design 5 icons (#32112)
Replace custom icons with Ant Design 5 icons to standardize the icon
This commit is contained in:
@@ -102,7 +102,7 @@ describe('DatasourceControl', () => {
|
||||
expect(
|
||||
container.querySelector('[data-test="datasource-menu-trigger"]'),
|
||||
).toBeInTheDocument();
|
||||
userEvent.click(screen.getByLabelText('more-vert'));
|
||||
userEvent.click(screen.getByLabelText('more'));
|
||||
await waitFor(() => {
|
||||
expect(screen.queryAllByRole('menuitem')).toHaveLength(3);
|
||||
});
|
||||
@@ -121,7 +121,7 @@ describe('DatasourceControl', () => {
|
||||
expect(
|
||||
container.querySelector('[data-test="datasource-menu-trigger"]'),
|
||||
).toBeInTheDocument();
|
||||
userEvent.click(screen.getByLabelText('more-vert'));
|
||||
userEvent.click(screen.getByLabelText('more'));
|
||||
await waitFor(() => {
|
||||
expect(screen.queryAllByRole('menuitem')).toHaveLength(2);
|
||||
});
|
||||
@@ -129,7 +129,7 @@ describe('DatasourceControl', () => {
|
||||
|
||||
it('should render health check message', async () => {
|
||||
setup();
|
||||
const modalTrigger = screen.getByLabelText('alert-solid');
|
||||
const modalTrigger = screen.getByLabelText('warning');
|
||||
expect(modalTrigger).toBeInTheDocument();
|
||||
|
||||
// Hover the modal so healthcheck message can show up
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
import { PureComponent } from 'react';
|
||||
import PropTypes from 'prop-types';
|
||||
import {
|
||||
css,
|
||||
DatasourceType,
|
||||
SupersetClient,
|
||||
styled,
|
||||
@@ -116,7 +117,7 @@ const Styles = styled.div`
|
||||
span[aria-label='dataset-physical'] {
|
||||
color: ${({ theme }) => theme.colors.grayscale.base};
|
||||
}
|
||||
span[aria-label='more-vert'] {
|
||||
span[aria-label='more'] {
|
||||
color: ${({ theme }) => theme.colors.primary.base};
|
||||
}
|
||||
`;
|
||||
@@ -136,7 +137,7 @@ export const datasourceIconLookup = {
|
||||
[DatasourceType.Query]: (
|
||||
<Icons.ConsoleSqlOutlined className="datasource-svg" />
|
||||
),
|
||||
[DatasourceType.Table]: <Icons.DatasetPhysical className="datasource-svg" />,
|
||||
[DatasourceType.Table]: <Icons.TableOutlined className="datasource-svg" />,
|
||||
};
|
||||
|
||||
// Render title for datasource with tooltip only if text is longer than VISIBLE_TITLE_LENGTH
|
||||
@@ -400,7 +401,12 @@ class DatasourceControl extends PureComponent {
|
||||
{renderDatasourceTitle(titleText, tooltip)}
|
||||
{healthCheckMessage && (
|
||||
<Tooltip title={healthCheckMessage}>
|
||||
<Icons.AlertSolid iconColor={theme.colors.warning.base} />
|
||||
<Icons.WarningOutlined
|
||||
css={css`
|
||||
margin-left: ${theme.gridUnit * 2}px;
|
||||
`}
|
||||
iconColor={theme.colors.warning.base}
|
||||
/>
|
||||
</Tooltip>
|
||||
)}
|
||||
{extra?.warning_markdown && (
|
||||
@@ -415,7 +421,9 @@ class DatasourceControl extends PureComponent {
|
||||
trigger={['click']}
|
||||
data-test="datasource-menu"
|
||||
>
|
||||
<Icons.MoreVert
|
||||
<Icons.MoreOutlined
|
||||
IconSize="xl"
|
||||
iconColor={theme.colors.primary.base}
|
||||
className="datasource-modal-trigger"
|
||||
data-test="datasource-menu-trigger"
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user