Skip to content

Commit 911f647

Browse files
authored
Feat/only show columns with lineage tooltip (#24890)
* Add tooltip for only show columns with lineage filter * Add unit test
1 parent 6e582da commit 911f647

20 files changed

Lines changed: 59 additions & 11 deletions

File tree

openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/CustomNodeV1.test.tsx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -212,6 +212,9 @@ jest.mock('react-i18next', () => ({
212212
if (key === 'label.slash-symbol') {
213213
return '/';
214214
}
215+
if (key === 'message.only-show-columns-with-lineage') {
216+
return 'Only show columns with Lineage';
217+
}
215218

216219
return key;
217220
},
@@ -564,6 +567,27 @@ describe('CustomNodeV1', () => {
564567
fireEvent.click(filterButton);
565568
};
566569

570+
it('should render tooltip on hovering filter button in lineage node', async () => {
571+
isColumnLayerActive = true;
572+
columnsHavingLineage = ['col0', 'col2', 'col5'];
573+
574+
render(
575+
<ReactFlowProvider>
576+
<CustomNodeV1Component {...mockNodeDataProps} />
577+
</ReactFlowProvider>
578+
);
579+
580+
const filterButton = screen.getByTestId('lineage-filter-button');
581+
582+
expect(filterButton).toBeInTheDocument();
583+
584+
fireEvent.mouseOver(filterButton);
585+
586+
expect(
587+
await screen.findByText('Only show columns with Lineage')
588+
).toBeInTheDocument();
589+
});
590+
567591
describe('Column Filter', () => {
568592
it('should only render columns with lineage when filter is on', () => {
569593
isColumnLayerActive = false;

openmetadata-ui/src/main/resources/ui/src/components/Entity/EntityLineage/LineageNodeLabelV1.tsx

Lines changed: 17 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,12 @@
1111
* limitations under the License.
1212
*/
1313

14-
import { Button, IconButton } from '@mui/material';
14+
import { Button, IconButton, Tooltip } from '@mui/material';
1515
import { Col, Space, Typography } from 'antd';
1616
import classNames from 'classnames';
1717
import { capitalize, isUndefined } from 'lodash';
1818
import { useCallback, useEffect, useMemo, useState } from 'react';
19+
import { useTranslation } from 'react-i18next';
1920
import { ReactComponent as IconDBTModel } from '../../../assets/svg/dbt-model.svg';
2021
import { ReactComponent as DeleteIcon } from '../../../assets/svg/ic-delete.svg';
2122
import { ReactComponent as FilterIcon } from '../../../assets/svg/ic-filter.svg';
@@ -177,6 +178,7 @@ const EntityFooter = ({
177178
toggleOnlyShowColumnsWithLineageFilterActive,
178179
isOnlyShowColumnsWithLineageFilterActive,
179180
}: LineageNodeLabelPropsExtended) => {
181+
const { t } = useTranslation();
180182
const { children, childrenHeading } = useMemo(
181183
() => getEntityChildrenAndLabel(node),
182184
[node.id]
@@ -223,16 +225,20 @@ const EntityFooter = ({
223225
{childrenInfoDropdownLabel}
224226
</Button>
225227
<TestSuiteSummaryContainer node={node} />
226-
<IconButton
227-
className={classNames(
228-
'only-show-columns-with-lineage-filter-button',
229-
isOnlyShowColumnsWithLineageFilterActive && 'active'
230-
)}
231-
data-testid="lineage-filter-button"
232-
disabled={isEditMode}
233-
onClick={handleOnlyShowColumnsWithLineage}>
234-
<FilterIcon height={20} width={20} />
235-
</IconButton>
228+
<Tooltip
229+
placement="right"
230+
title={t('message.only-show-columns-with-lineage')}>
231+
<IconButton
232+
className={classNames(
233+
'only-show-columns-with-lineage-filter-button',
234+
isOnlyShowColumnsWithLineageFilterActive && 'active'
235+
)}
236+
data-testid="lineage-filter-button"
237+
disabled={isEditMode}
238+
onClick={handleOnlyShowColumnsWithLineage}>
239+
<FilterIcon height={20} width={20} />
240+
</IconButton>
241+
</Tooltip>
236242
</div>
237243
);
238244
};

openmetadata-ui/src/main/resources/ui/src/locale/languages/de-de.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "Folge den Datensätzen, die du häufig verwendest, um über sie informiert zu bleiben.",
24632463
"only-image-files-supported": "Nur Bilddateien werden unterstützt",
24642464
"only-reviewers-can-approve-or-reject": "Nur Prüfer können genehmigen oder ablehnen.",
2465+
"only-show-columns-with-lineage": "Nur Spalten mit Lineage anzeigen",
24652466
"optional-configuration-update-description-dbt": "Optionale Konfiguration, um die Beschreibung von dbt zu aktualisieren oder nicht.",
24662467
"owners-coverage-widget-description": "Eigentümerabdeckung für alle Datenvermögenswerte im Dienst. <0>Mehr erfahren.</0>",
24672468
"page-is-not-available": "Die von dir gesuchte Seite ist nicht verfügbar",

openmetadata-ui/src/main/resources/ui/src/locale/languages/en-us.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "Follow the datasets that you frequently use to stay informed about it.",
24632463
"only-image-files-supported": "Only image files are supported",
24642464
"only-reviewers-can-approve-or-reject": "Only Reviewers can Approve or Reject",
2465+
"only-show-columns-with-lineage": "Only show columns with Lineage",
24652466
"optional-configuration-update-description-dbt": "Optional configuration to update the description from dbt or not",
24662467
"owners-coverage-widget-description": "Owners coverage for all data assets in the service. <0>learn more.</0>",
24672468
"page-is-not-available": "The page you are looking for is not available",

openmetadata-ui/src/main/resources/ui/src/locale/languages/es-es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "Sigue los conjuntos de datos que usas con frecuencia para mantenerte informado acerca de ellos.",
24632463
"only-image-files-supported": "Solo se admiten archivos de imagen",
24642464
"only-reviewers-can-approve-or-reject": "Solo los Revisores pueden Aprobar o Rechazar",
2465+
"only-show-columns-with-lineage": "Mostrar solo columnas con Lineage",
24652466
"optional-configuration-update-description-dbt": "Configuración opcional para actualizar la descripción de dbt",
24662467
"owners-coverage-widget-description": "Cobertura de propietarios para todos los activos de datos en el servicio. <0>saber más.</0>",
24672468
"page-is-not-available": "La página que estás buscando no está disponible",

openmetadata-ui/src/main/resources/ui/src/locale/languages/fr-fr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "Suivez les actifs de données que vous utilisez fréquemment pour rester informé à leur sujet.",
24632463
"only-image-files-supported": "Seuls les fichiers image sont pris en charge",
24642464
"only-reviewers-can-approve-or-reject": "Seuls les réviseurs peuvent Valider ou Rejeter",
2465+
"only-show-columns-with-lineage": "Afficher uniquement les colonnes avec Lineage",
24652466
"optional-configuration-update-description-dbt": "Configuration optionnelle pour mettre à jour la description à partir de dbt ou non",
24662467
"owners-coverage-widget-description": "Couverture des propriétaires pour tous les actifs de données dans le service. <0>en savoir plus.</0>",
24672468
"page-is-not-available": "La page que vous recherchez n'est pas disponible",

openmetadata-ui/src/main/resources/ui/src/locale/languages/gl-es.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "Segue os conxuntos de datos que utilizas con frecuencia para manterte informado sobre eles.",
24632463
"only-image-files-supported": "Só se admiten ficheiros de imaxe",
24642464
"only-reviewers-can-approve-or-reject": "Só os revisores poden aprobar ou rexeitar",
2465+
"only-show-columns-with-lineage": "Mostrar só columnas con Lineage",
24652466
"optional-configuration-update-description-dbt": "Configuración opcional para actualizar ou non a descrición desde dbt",
24662467
"owners-coverage-widget-description": "Cobertura de propietarios para todos os activos de datos no servizo. <0>saber máis.</0>",
24672468
"page-is-not-available": "A páxina que estás buscando non está dispoñible",

openmetadata-ui/src/main/resources/ui/src/locale/languages/he-he.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "עקוב אחרי הסטים שאתה משתמש בהם תדיר כדי להישאר מעודכן עליהם.",
24632463
"only-image-files-supported": "רק קובצי תמונה נתמכים",
24642464
"only-reviewers-can-approve-or-reject": "רק בודקים יכולים לאשר או לדחות",
2465+
"only-show-columns-with-lineage": "הצג רק עמודות עם Lineage",
24652466
"optional-configuration-update-description-dbt": "הגדרת אופציונלית לעדכון התיאור מ-dbT או לא",
24662467
"owners-coverage-widget-description": "כיסוי בעלים עבור כל נכסי הנתונים בשירות. <0>למד עוד</0>.",
24672468
"page-is-not-available": "הדף שאתה מחפש לא זמין",

openmetadata-ui/src/main/resources/ui/src/locale/languages/ja-jp.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "よく使うデータセットをフォローして、通知を受け取りましょう。",
24632463
"only-image-files-supported": "画像ファイルのみサポートされています",
24642464
"only-reviewers-can-approve-or-reject": "承認または却下できるのはレビュアーのみです",
2465+
"only-show-columns-with-lineage": "リネージを持つカラムのみを表示",
24652466
"optional-configuration-update-description-dbt": "dbt から説明文を更新するかどうかのオプション設定です",
24662467
"owners-coverage-widget-description": "サービス内の全データアセットの所有者カバレッジ。<0>詳細を見る。</0>",
24672468
"page-is-not-available": "お探しのページはご利用いただけません",

openmetadata-ui/src/main/resources/ui/src/locale/languages/ko-kr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2462,6 +2462,7 @@
24622462
"onboarding-stay-up-to-date-description": "자주 사용하는 데이터셋을 팔로우하여 최신 정보를 유지하세요.",
24632463
"only-image-files-supported": "이미지 파일만 지원됩니다",
24642464
"only-reviewers-can-approve-or-reject": "검토자만 승인 또는 거부할 수 있습니다",
2465+
"only-show-columns-with-lineage": "리니지가 있는 컬럼만 표시",
24652466
"optional-configuration-update-description-dbt": "dbt에서 설명을 업데이트할지 여부에 대한 선택적 구성",
24662467
"owners-coverage-widget-description": "서비스 내 모든 데이터 자산의 소유자 커버리지입니다. <0>더 알아보기.</0>",
24672468
"page-is-not-available": "찾고 있는 페이지를 사용할 수 없습니다",

0 commit comments

Comments
 (0)