From fac67f016e5e67c682796689c9123c03de94c1e4 Mon Sep 17 00:00:00 2001 From: Harshit Shah Date: Wed, 7 Oct 2026 19:45:29 +0530 Subject: [PATCH 01/14] fix(ui): correct Governance form and graph theming --- .../TestCaseStatusModal.component.tsx | 1 - .../IncidentManager.component.tsx | 2 - .../OntologyExplorer/FilterToolbar.tsx | 2 +- .../OntologyAuthoringInspector.tsx | 2 +- .../OntologyExplorer/OntologyDataGraph.tsx | 2 +- .../OntologyExplorer.constants.ts | 266 ++++++++++-------- .../OntologyExplorer/OntologyExplorer.tsx | 8 +- .../OntologyImportExportModal.tsx | 10 +- .../OntologyExplorer/OntologyLibrary.tsx | 2 +- .../OntologyNodeRelationsContent.tsx | 2 +- .../OntologyStudioQueryConsole.css | 12 +- .../PortOverlay.component.tsx | 2 +- .../OntologyExplorer/hooks/useGraphData.ts | 13 +- .../hooks/useOntologyGraph.ts | 7 +- .../utils/graphStyles.test.ts | 39 ++- .../OntologyExplorer/utils/graphStyles.ts | 48 ++-- .../utils/relationshipTypeUtils.ts | 20 +- .../GlossaryLeftPanel.component.tsx | 8 +- .../RequestDescriptionPage.tsx | 211 +++++++------- .../RequestTagPage/RequestTagPage.tsx | 214 +++++++------- .../UpdateDescriptionPage.tsx | 206 ++++++++------ .../TasksPage/UpdateTagPage/UpdateTagPage.tsx | 206 ++++++++------ .../pages/TasksPage/shared/Assignees.test.tsx | 20 +- .../src/pages/TasksPage/shared/Assignees.tsx | 162 ++++------- .../TasksPage/shared/DescriptionTabs.tsx | 16 +- .../shared/TaskPayloadSchemaFields.test.tsx | 52 +++- .../shared/TaskPayloadSchemaFields.tsx | 206 +++++++------- 27 files changed, 932 insertions(+), 807 deletions(-) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCaseStatusModal/TestCaseStatusModal.component.tsx b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCaseStatusModal/TestCaseStatusModal.component.tsx index 0691340a8a5a..28dd4166b5d8 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCaseStatusModal/TestCaseStatusModal.component.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/DataQuality/TestCaseStatusModal/TestCaseStatusModal.component.tsx @@ -371,7 +371,6 @@ export const TestCaseStatusModal = ({ }, ]}> = ({ {showLoadedCount && ( {t('label.loaded-x-of-y-entity', { loaded: loadedTermCount, diff --git a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyAuthoringInspector.tsx b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyAuthoringInspector.tsx index ca3328dfc8df..a5e9afc0708b 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyAuthoringInspector.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyAuthoringInspector.tsx @@ -270,7 +270,7 @@ const OntologyAuthoringInspector = ({ ); const colorMeta = effectiveColor ? COLOR_META_BY_HEX[effectiveColor.toLowerCase()] ?? { - background: 'var(--color-bg-secondary)', + background: 'var(--tw-color-bg-secondary)', color: effectiveColor, } : undefined; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyDataGraph.tsx b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyDataGraph.tsx index ae40a9a4e54c..7d753f5b5b72 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyDataGraph.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyDataGraph.tsx @@ -405,7 +405,7 @@ const OntologyDataGraph = ({ getEffectiveRelationColor( layout.edge.relationType, relationshipType - ) ?? 'var(--color-border-brand)'; + ) ?? 'var(--tw-color-border-brand)'; const color = effectiveColor.startsWith('var(') && relationshipType ? getRelationshipHexColor(relationshipType) diff --git a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.constants.ts b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.constants.ts index fb2a96e860c8..4ac6283c4814 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.constants.ts +++ b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.constants.ts @@ -46,203 +46,235 @@ export const DEFAULT_GLOSSARY_TERM_RELATION_TYPES_FALLBACK = [ DEFAULT_RELATIONSHIP_TYPE, ]; +const RELATION_PALETTES = { + brand: { + color: 'var(--tw-color-utility-brand-700)', + background: 'var(--tw-color-utility-brand-50)', + }, + error: { + color: 'var(--tw-color-utility-error-700)', + background: 'var(--tw-color-utility-error-50)', + }, + warning: { + color: 'var(--tw-color-utility-warning-700)', + background: 'var(--tw-color-utility-warning-50)', + }, + success: { + color: 'var(--tw-color-utility-success-700)', + background: 'var(--tw-color-utility-success-50)', + }, + 'blue-light': { + color: 'var(--tw-color-utility-blue-light-700)', + background: 'var(--tw-color-utility-blue-light-50)', + }, + blue: { + color: 'var(--tw-color-utility-blue-700)', + background: 'var(--tw-color-utility-blue-50)', + }, + purple: { + color: 'var(--tw-color-utility-purple-700)', + background: 'var(--tw-color-utility-purple-50)', + }, + fuchsia: { + color: 'var(--tw-color-utility-fuchsia-700)', + background: 'var(--tw-color-utility-fuchsia-50)', + }, + orange: { + color: 'var(--tw-color-utility-orange-700)', + background: 'var(--tw-color-utility-orange-50)', + }, + pink: { + color: 'var(--tw-color-utility-pink-700)', + background: 'var(--tw-color-utility-pink-50)', + }, + 'gray-blue': { + color: 'var(--tw-color-utility-gray-blue-700)', + background: 'var(--tw-color-utility-gray-blue-50)', + }, + teal: { + color: 'var(--tw-color-utility-teal-700)', + background: 'var(--tw-color-utility-teal-50)', + }, + gray: { + color: 'var(--tw-color-utility-gray-700)', + background: 'var(--tw-color-utility-gray-50)', + }, + violet: { + color: 'var(--tw-color-utility-violet-700)', + background: 'var(--tw-color-utility-violet-50)', + }, + moss: { + color: 'var(--tw-color-utility-moss-700)', + background: 'var(--tw-color-utility-moss-50)', + }, + cyan: { + color: 'var(--tw-color-utility-cyan-700)', + background: 'var(--tw-color-utility-cyan-50)', + }, + rose: { + color: 'var(--tw-color-utility-rose-700)', + background: 'var(--tw-color-utility-rose-50)', + }, +}; + export const RELATION_META: Record< string, { color: string; background: string; labelKey: string } > = { relatedTo: { - color: '#1570ef', - background: '#eff8ff', + ...RELATION_PALETTES['brand'], labelKey: 'label.related-to', }, related: { - color: '#1570ef', - background: '#eff8ff', + ...RELATION_PALETTES['brand'], labelKey: 'label.related', }, synonym: { - color: '#b42318', - background: '#fef3f2', + ...RELATION_PALETTES['error'], labelKey: 'label.synonym', }, antonym: { - color: '#b54708', - background: '#fffaeb', + ...RELATION_PALETTES['warning'], labelKey: 'label.antonym', }, typeOf: { - color: '#067647', - background: '#ecfdf3', + ...RELATION_PALETTES['success'], labelKey: 'label.type-of', }, hasTypes: { - color: '#067647', - background: '#ecfdf3', + ...RELATION_PALETTES['success'], labelKey: 'label.has-types', }, hasA: { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.has-a', }, partOf: { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.part-of', }, hasPart: { - color: '#155eef', - background: '#eff4ff', + ...RELATION_PALETTES['blue'], labelKey: 'label.has-part', }, componentOf: { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.component-of', }, composedOf: { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.composed-of', }, calculatedFrom: { - color: '#6938ef', - background: '#f4f3ff', + ...RELATION_PALETTES['purple'], labelKey: 'label.calculated-from', }, usedToCalculate: { - color: '#ba24d5', - background: '#fdf4ff', + ...RELATION_PALETTES['fuchsia'], labelKey: 'label.used-to-calculate', }, derivedFrom: { - color: '#bc1b06', - background: '#fff4ed', + ...RELATION_PALETTES['orange'], labelKey: 'label.derived-from', }, seeAlso: { - color: '#c11574', - background: '#fdf2fa', + ...RELATION_PALETTES['pink'], labelKey: 'label.see-also', }, parentOf: { - color: '#1570ef', - background: '#eff8ff', + ...RELATION_PALETTES['brand'], labelKey: 'label.parent-of', }, childOf: { - color: '#1570ef', - background: '#eff8ff', + ...RELATION_PALETTES['brand'], labelKey: 'label.child-of', }, broader: { - color: '#067647', - background: '#ecfdf3', + ...RELATION_PALETTES['success'], labelKey: 'label.broader', }, narrower: { - color: '#4e5ba6', - background: '#f8f9fc', + ...RELATION_PALETTES['gray-blue'], labelKey: 'label.narrower', }, isA: { - color: '#067647', - background: '#ecfdf3', + ...RELATION_PALETTES['success'], labelKey: 'label.is-a', }, instanceOf: { - color: '#067647', - background: '#ecfdf3', + ...RELATION_PALETTES['success'], labelKey: 'label.instance-of', }, owns: { - color: '#6938ef', - background: '#f4f3ff', + ...RELATION_PALETTES['purple'], labelKey: 'label.owns', }, ownedBy: { - color: '#6938ef', - background: '#f4f3ff', + ...RELATION_PALETTES['purple'], labelKey: 'label.owned-by', }, manages: { - color: '#1570ef', - background: '#eff8ff', + ...RELATION_PALETTES['brand'], labelKey: 'label.manages', }, managedBy: { - color: '#1570ef', - background: '#eff8ff', + ...RELATION_PALETTES['brand'], labelKey: 'label.managed-by', }, contains: { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.contains', }, containedIn: { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.contained-in', }, dependsOn: { - color: '#b42318', - background: '#fef3f2', + ...RELATION_PALETTES['error'], labelKey: 'label.depends-on', }, usedBy: { - color: '#b54708', - background: '#fffaeb', + ...RELATION_PALETTES['warning'], labelKey: 'label.used-by', }, metricFor: { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.metric-for', }, hasGlossaryTerm: { - color: '#107569', - background: '#f0fdf9', + ...RELATION_PALETTES['teal'], labelKey: 'label.tagged-with', }, custom1: { - color: '#bc1b06', - background: '#fff4ed', + ...RELATION_PALETTES['orange'], labelKey: 'label.color-orange', }, custom2: { - color: '#535862', - background: '#fafafa', + ...RELATION_PALETTES['gray'], labelKey: 'label.color-gray', }, custom6: { - color: '#107569', - background: '#f0fdf9', + ...RELATION_PALETTES['teal'], labelKey: 'label.color-rose', }, custom4: { - color: '#7839ee', - background: '#f5f3ff', + ...RELATION_PALETTES['violet'], labelKey: 'label.color-teal', }, custom5: { - color: '#4f7a21', - background: '#f5fbee', + ...RELATION_PALETTES['moss'], labelKey: 'label.color-moss', }, custom7: { - color: '#0e7090', - background: '#ecfdff', + ...RELATION_PALETTES['cyan'], labelKey: 'label.color-cyan', }, custom3: { - color: '#e31b54', - background: '#fff1f3', + ...RELATION_PALETTES['rose'], labelKey: 'label.color-violet', }, default: { - color: '#535862', - background: '#fafafa', + ...RELATION_PALETTES['gray'], labelKey: 'label.relation-type', }, }; @@ -256,95 +288,78 @@ export const COLOR_META_BY_HEX: Record< { color: string; background: string; labelKey: string } > = { '#1570ef': { - color: '#1570ef', - background: '#eff8ff', + ...RELATION_PALETTES['brand'], labelKey: 'label.color-blue', }, '#b42318': { - color: '#b42318', - background: '#fef3f2', + ...RELATION_PALETTES['error'], labelKey: 'label.color-red', }, '#b54708': { - color: '#b54708', - background: '#fffaeb', + ...RELATION_PALETTES['warning'], labelKey: 'label.color-yellow', }, '#067647': { - color: '#067647', - background: '#ecfdf3', + ...RELATION_PALETTES['success'], labelKey: 'label.color-green', }, '#4e5ba6': { - color: '#4e5ba6', - background: '#f8f9fc', + ...RELATION_PALETTES['gray-blue'], labelKey: 'label.color-blue-gray', }, '#026aa2': { - color: '#026aa2', - background: '#f0f9ff', + ...RELATION_PALETTES['blue-light'], labelKey: 'label.color-blue-light', }, '#155eef': { - color: '#155eef', - background: '#eff4ff', + ...RELATION_PALETTES['blue'], labelKey: 'label.color-dark-blue', }, '#6938ef': { - color: '#6938ef', - background: '#f4f3ff', + ...RELATION_PALETTES['purple'], labelKey: 'label.color-purple', }, '#ba24d5': { - color: '#ba24d5', - background: '#fdf4ff', + ...RELATION_PALETTES['fuchsia'], labelKey: 'label.color-fuchsia', }, '#c11574': { - color: '#c11574', - background: '#fdf2fa', + ...RELATION_PALETTES['pink'], labelKey: 'label.color-pink', }, '#bc1b06': { - color: '#bc1b06', - background: '#fff4ed', + ...RELATION_PALETTES['orange'], labelKey: 'label.color-orange', }, '#107569': { - color: '#107569', - background: '#f0fdf9', + ...RELATION_PALETTES['teal'], labelKey: 'label.color-rose', }, '#535862': { - color: '#535862', - background: '#fafafa', + ...RELATION_PALETTES['gray'], labelKey: 'label.color-gray', }, '#e31b54': { - color: '#e31b54', - background: '#fff1f3', + ...RELATION_PALETTES['rose'], labelKey: 'label.color-violet', }, '#7839ee': { - color: '#7839ee', - background: '#f5f3ff', + ...RELATION_PALETTES['violet'], labelKey: 'label.color-teal', }, '#4f7a21': { - color: '#4f7a21', - background: '#f5fbee', + ...RELATION_PALETTES['moss'], labelKey: 'label.color-moss', }, '#0e7090': { - color: '#0e7090', - background: '#ecfdff', + ...RELATION_PALETTES['cyan'], labelKey: 'label.color-cyan', }, }; -const BORDER_PRIMARY_TOKEN = 'var(--color-border-primary)'; +const BORDER_PRIMARY_TOKEN = 'var(--tw-color-border-primary)'; const BORDER_PRIMARY_FALLBACK = '#D5D7DA'; -const BORDER_SECONDARY_TOKEN = 'var(--color-border-secondary)'; +const BORDER_SECONDARY_TOKEN = 'var(--tw-color-border-secondary)'; export const EDGE_STROKE_COLOR = BORDER_PRIMARY_TOKEN; // SVG presentation attributes do not resolve CSS variables, so DOM-drawn @@ -355,12 +370,12 @@ export const DIMMED_NODE_OPACITY = 0.32; export const DIMMED_EDGE_OPACITY = 0.12; export const DIMMED_EDGE_LABEL_OPACITY = 0.16; -export const NODE_FILL_DEFAULT = 'var(--color-bg-primary)'; +export const NODE_FILL_DEFAULT = 'var(--tw-color-bg-primary)'; export const NODE_BORDER_COLOR = BORDER_SECONDARY_TOKEN; -export const NODE_SELECTED_STROKE = 'var(--color-border-brand)'; +export const NODE_SELECTED_STROKE = 'var(--tw-color-border-brand)'; export const NODE_SELECTED_LINE_WIDTH = 2.5; export const NODE_SELECTED_HALO_LINE_WIDTH = 4; -export const NODE_SELECTED_HALO_FILL = 'var(--color-bg-brand-primary)'; +export const NODE_SELECTED_HALO_FILL = 'var(--tw-color-bg-brand-primary)'; export const NODE_BORDER_RADIUS = 9; export const NODE_PADDING_V = 9; export const NODE_PADDING_H = 12; @@ -374,25 +389,26 @@ export const NODE_LABEL_PADDING: [number, number, number, number] = [ export const COMBO_FILL_DEFAULT = NODE_FILL_DEFAULT; export const COMBO_BODY_FILL_OPACITY = '22'; export const COMBO_LABEL_BG_OPACITY = '40'; -export const NODE_LABEL_FILL = 'var(--color-text-primary)'; -export const NODE_LABEL_FILL_INVERSE = 'var(--color-text-white)'; +export const NODE_LABEL_FILL = 'var(--tw-color-text-primary)'; +export const NODE_LABEL_FILL_INVERSE = 'var(--tw-color-text-white)'; export const BRAND_BLUE_FALLBACK = '#3b82f6'; export const COMBO_COLOR_FALLBACK = '#94a3b8'; -export const DATA_MODE_ASSET_COUNT_BADGE_BG = 'var(--color-bg-primary-solid)'; -export const DATA_MODE_LOAD_MORE_BADGE_BG = 'var(--color-bg-brand-solid)'; +export const DATA_MODE_ASSET_COUNT_BADGE_BG = + 'var(--tw-color-bg-primary-solid)'; +export const DATA_MODE_LOAD_MORE_BADGE_BG = 'var(--tw-color-bg-brand-solid)'; export const NODE_LABEL_FONT_SIZE = 11; export const NODE_LABEL_FONT_WEIGHT = 600; export const NODE_SHADOW_COLOR = BORDER_SECONDARY_TOKEN; export const NODE_SHADOW_BLUR = 2; export const NODE_SHADOW_OFFSET_Y = 1; -export const EDGE_LABEL_FILL = 'var(--color-text-tertiary)'; +export const EDGE_LABEL_FILL = 'var(--tw-color-text-tertiary)'; export const EDGE_LABEL_FONT_SIZE = 10; export const EDGE_LABEL_FONT_WEIGHT = 600; export const EDGE_LABEL_FONT_FAMILY = 'Inter'; export const EDGE_LABEL_LINE_HEIGHT = 16; export const EDGE_LABEL_LETTER_SPACING = 0; -export const EDGE_LABEL_BG_FILL = 'var(--color-bg-secondary)'; +export const EDGE_LABEL_BG_FILL = 'var(--tw-color-bg-secondary)'; export const EDGE_LABEL_BG_STROKE = NODE_FILL_DEFAULT; export const EDGE_LABEL_BG_RADIUS = 3; export const EDGE_LABEL_BG_SHADOW_COLOR = BORDER_SECONDARY_TOKEN; @@ -544,11 +560,11 @@ export const NODE_LABEL_FILL_FALLBACK = '#1e293b'; // A metric node is a governed Metric entity drawn next to the concept it // measures, not a concept: muted and dashed so it never reads as authorable. export const STUDIO_METRIC_NODE_KIND = 'metric'; -export const METRIC_NODE_FILL = 'var(--color-bg-secondary)'; +export const METRIC_NODE_FILL = 'var(--tw-color-bg-secondary)'; export const METRIC_NODE_FILL_FALLBACK = '#FAFAFA'; export const METRIC_NODE_STROKE = BORDER_PRIMARY_TOKEN; export const METRIC_NODE_STROKE_FALLBACK = BORDER_PRIMARY_FALLBACK; -export const METRIC_NODE_MUTED_COLOR = 'var(--color-text-tertiary)'; +export const METRIC_NODE_MUTED_COLOR = 'var(--tw-color-text-tertiary)'; export const METRIC_NODE_MUTED_COLOR_FALLBACK = '#535862'; export const METRIC_NODE_LINE_DASH = [4, 3]; export const NODE_SHADOW_COLOR_FALLBACK = 'rgba(0,0,0,0.12)'; diff --git a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.tsx b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.tsx index 8a0ed015a9d5..6a3728a14a2d 100644 --- a/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.tsx +++ b/openmetadata-ui/src/main/resources/ui/src/components/OntologyExplorer/OntologyExplorer.tsx @@ -93,9 +93,9 @@ const SearchInputIcon = ({ className }: { className?: string }) => (