Skip to content

Commit 46b29b7

Browse files
authored
Added column icon in explore page (#27672)
* Added column icon in explore page * updated the column icon in all the pages * address gitar comment * added column with bg icon * fix the column icon color in explore page * addressed gitar comment * rename the column icon * removed unused column icon * lint fixes
1 parent 48a7de3 commit 46b29b7

15 files changed

Lines changed: 31 additions & 30 deletions

File tree

Lines changed: 1 addition & 1 deletion
Loading
Lines changed: 3 additions & 3 deletions
Loading

openmetadata-ui/src/main/resources/ui/src/assets/svg/ic-column-new.svg

Lines changed: 0 additions & 10 deletions
This file was deleted.
Lines changed: 2 additions & 3 deletions
Loading

openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/ColumnDetailPanel.component.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ import { isString } from 'lodash';
2525
import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
2626
import { useTranslation } from 'react-i18next';
2727
import { ReactComponent as IconEdit } from '../../../assets/svg/edit-new.svg';
28-
import { ReactComponent as ColumnIcon } from '../../../assets/svg/ic-column-new.svg';
28+
import { ReactComponent as ColumnIcon } from '../../../assets/svg/ic-column.svg';
2929
import { ReactComponent as KeyIcon } from '../../../assets/svg/icon-key.svg';
3030
import {
3131
DE_ACTIVE_COLOR,

openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/ColumnDetailPanel.test.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ jest.mock('../../../assets/svg/up-arrow-icon.svg', () => ({
122122
ReactComponent: () => <div data-testid="arrow-up-icon">ArrowUp</div>,
123123
}));
124124

125-
jest.mock('../../../assets/svg/ic-column-new.svg', () => ({
125+
jest.mock('../../../assets/svg/ic-column.svg', () => ({
126126
ReactComponent: () => <div data-testid="column-icon">ColumnIcon</div>,
127127
}));
128128

openmetadata-ui/src/main/resources/ui/src/components/Database/ColumnDetailPanel/NestedColumnsSection.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import { Badge } from '@openmetadata/ui-core-components';
1414
import { Typography } from 'antd';
1515
import React from 'react';
1616
import { useTranslation } from 'react-i18next';
17-
import { ReactComponent as ColumnIcon } from '../../../assets/svg/ic-column-new.svg';
17+
import { ReactComponent as ColumnIcon } from '../../../assets/svg/ic-column.svg';
1818
import { Column } from '../../../generated/entity/data/table';
1919
import { getEntityName } from '../../../utils/EntityUtils';
2020
import { getNestedSectionTitle } from '../../../utils/TableUtils';

openmetadata-ui/src/main/resources/ui/src/components/Explore/ExploreTree/ExploreTree.tsx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -178,9 +178,10 @@ const ExploreTree = ({ onFieldValueSelect }: ExploreTreeProps) => {
178178
let type = null;
179179
let logo = undefined;
180180
if (isEntityType) {
181+
const isColumn = bucket.key === EntityType.TABLE_COLUMN;
181182
logo = searchClassBase.getEntityIcon(
182183
bucket.key,
183-
'service-icon w-4 h-4'
184+
classNames('service-icon w-4 h-4', { 'text-grey-500': isColumn })
184185
) ?? <></>;
185186
} else if (isServiceType) {
186187
const serviceIcon = serviceUtilClassBase.getServiceLogo(bucket.key);

openmetadata-ui/src/main/resources/ui/src/components/ExploreV1/ExploreSearchCard/ExploreSearchCard.tsx

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,10 +207,6 @@ const ExploreSearchCard: React.FC<ExploreSearchCardProps> = forwardRef<
207207
return _otherDetails;
208208
}, [source]);
209209

210-
const serviceIcon = useMemo(() => {
211-
return searchClassBase.getServiceIcon(source);
212-
}, [source]);
213-
214210
const breadcrumbs = useMemo(
215211
() =>
216212
searchClassBase.getEntityBreadcrumbs(
@@ -242,14 +238,21 @@ const ExploreSearchCard: React.FC<ExploreSearchCardProps> = forwardRef<
242238

243239
return (
244240
<span className="w-6 h-6 m-r-xs d-inline-flex text-xl align-middle">
245-
{searchClassBase.getEntityIcon(source.entityType ?? '')}
241+
{searchClassBase.getEntityIcon(
242+
source.entityType ?? '',
243+
'text-link-color'
244+
)}
246245
</span>
247246
);
248247
}
249248

250249
return null;
251250
}, [source, showEntityIcon]);
252251

252+
const serviceIcon = useMemo(() => {
253+
return searchClassBase.getServiceIcon(source);
254+
}, [source]);
255+
253256
const entityLink = useMemo(
254257
() => searchClassBase.getEntityLink(source),
255258
[source]

openmetadata-ui/src/main/resources/ui/src/components/SearchedData/SearchedData.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,7 @@ const SearchedData: React.FC<SearchedDataProps> = ({
6464
return (
6565
<div className="m-b-md" key={`tabledatacard${index}`}>
6666
<ExploreSearchCard
67+
showEntityIcon
6768
className={classNames(
6869
table.id === selectedEntityId && isSummaryPanelVisible
6970
? 'highlight-card'

0 commit comments

Comments
 (0)