Repository navigation
feat(ui): extract TablePureUtils and TagsPureUtils - #28673
Conversation
Move 43 pure functions from TableUtils.tsx to TablePureUtils.ts and 5 functions from TagsUtils.tsx to TagsPureUtils.ts. Both original files re-export all moved symbols for backward compatibility. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Hi there 👋 Thanks for your contribution! The OpenMetadata team will review the PR shortly! Once it has been labeled as Let us know if you need any help! |
🟡 Playwright Results — all passed (13 flaky)✅ 4260 passed · ❌ 0 failed · 🟡 13 flaky · ⏭️ 88 skipped
🟡 13 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
Convert interface, entity type, and other type-only symbols to import type in TablePureUtils.ts, TableUtils.tsx, TagsPureUtils.ts, TagsUtils.tsx. Runtime enum members (DataType, LabelType, State, TagSource, SettledStatus, SearchIndex) remain value imports. Co-Authored-By: Claude Opus 4.6 <[email protected]>
|
Code Review ✅ ApprovedRefactors 48 pure functions from OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
* feat(ui): extract TablePureUtils and TagsPureUtils Move 43 pure functions from TableUtils.tsx to TablePureUtils.ts and 5 functions from TagsUtils.tsx to TagsPureUtils.ts. Both original files re-export all moved symbols for backward compatibility. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix checkstyle --------- Co-authored-by: Claude Opus 4.6 <[email protected]>
* feat(ui): extract FeedUtilsPure from FeedUtils (#28672) * feat(ui): extract FeedUtilsPure from FeedUtils Move 31 non-JSX functions from FeedUtils.tsx to FeedUtilsPure.ts. FeedUtils.tsx re-exports all moved symbols for backward compatibility. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix checkstyle --------- Co-authored-by: Claude Opus 4.6 <[email protected]> * feat(ui): extract TablePureUtils and TagsPureUtils (#28673) * feat(ui): extract TablePureUtils and TagsPureUtils Move 43 pure functions from TableUtils.tsx to TablePureUtils.ts and 5 functions from TagsUtils.tsx to TagsPureUtils.ts. Both original files re-export all moved symbols for backward compatibility. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix checkstyle --------- Co-authored-by: Claude Opus 4.6 <[email protected]> * feat(ui): extract DataProductPureUtils, DataInsightPureUtils, DataQualityPureUtils (#28701) * feat(ui): extract DataProductPureUtils, DataInsightPureUtils, DataQualityPureUtils Move pure (no-JSX, no-API, no-singleton) functions from DataProductUtils.tsx, DataInsightUtils.tsx, and DataQualityUtils.tsx into dedicated *PureUtils.ts files. Originals re-export all moved symbols for backward compat. - DataProductPureUtils.ts: convertDataProductsToEntityReferences, convertEntityReferencesToDataProducts, getQueryFilterForDataProductPorts - DataInsightPureUtils.ts: getEntryFormattedValue, getGraphDataByEntityType, getFormattedActiveUsersData, getDisabledDates, getDataInsightPathWithFqn, getOptionalDataInsightTabFlag, sortEntityByValue, getRandomHexColor, isPercentageSystemGraph, getQueryFilterForDataInsightChart (+ 3 private helpers) - DataQualityPureUtils.ts: 27 symbols including buildTestCaseParams, createUpdatedTestCasePatch, buildDataQualityDashboardFilters, getDimensionIcon, calculateTestCaseStatusCounts, transformToTestCaseStatusByDimension, etc. All type-only imports use import type. 78 existing tests still pass. Co-Authored-By: Claude Opus 4.6 <[email protected]> * chore(ui): apply prettier formatting to PR7 pure utils files Co-Authored-By: Claude Opus 4.6 <[email protected]> --------- Co-authored-by: Claude Opus 4.6 <[email protected]> * feat(ui): extract pure service utils and widget components (#28692) * feat(ui): extract pure service utils and widget components Extract 26 pure functions from ServiceUtils.tsx, ServiceInsightsTabUtils.tsx, and DatabaseServiceUtils.tsx into dedicated pure util modules. Promote getServiceInsightsWidgetPlaceholder to standalone component file. All original files re-export moved symbols for backward compatibility. Co-Authored-By: Claude Opus 4.6 <[email protected]> * Fix checkstyle --------- Co-authored-by: Claude Opus 4.6 <[email protected]> * feat(ui): extract EntityVersion/Diff pure utils and lazy-load version components (#28687) * feat(ui): extract EntityVersion/Diff pure utils and lazy-load version components Split monolithic EntityVersionUtils.tsx (~1420 lines) into focused modules: - EntityDiffPureUtils.ts: pure diff accessor functions (no React deps) - EntityDiffUtils.tsx: JSX diff rendering functions - EntityVersionUtilsPure.ts: pure version processing logic - EntityVersionClassBase.ts: lazy-load registry for version components EntityVersionUtils.tsx re-exports all symbols for backward compatibility. EntityVersionPage now uses lazy-loaded components via EntityVersionClassBase. Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix(ui): replace ComponentType<any> with typed VersionComponentType in EntityVersionClassBase Co-Authored-By: Claude Opus 4.6 <[email protected]> * fix checkstyle * fix(pr5): convert type-only imports to import type across all changed files Co-Authored-By: Claude Sonnet 4.6 <[email protected]> * fix checkstyle --------- Co-authored-by: Claude Opus 4.6 <[email protected]> * fix(ui): adapt feed utils backport to 1.13 APIs * fix(ui): preserve 1.13 utility contracts * fix(ui): align feed utils test mock with split helper * fix(ui): scope feed count helpers for 1.13 --------- Co-authored-by: Claude Opus 4.6 <[email protected]>



Summary
TableUtils.tsxinto newTablePureUtils.ts(tier/certification tag helpers, column utils, schema analysis, data type utils, table joins, field update helpers)TagsUtils.tsxinto newTagsPureUtils.ts(tag query filters, permission-based index exclusion, tag redirect links)TableUtils.tsxreduced from 1891 to ~1047 lines;TagsUtils.tsxreduced from 677 to ~380 linesRef: https://github.com/open-metadata/openmetadata-collate/issues/4230
Test plan
npx tsc --noEmitpasses (verified locally, 0 new errors)🤖 Generated with Claude Code