feat(ui): lazy-load tab-level and heavy components with withSuspenseFallback#28830
feat(ui): lazy-load tab-level and heavy components with withSuspenseFallback#28830shah-harshit wants to merge 10 commits into
Conversation
…allback Convert 105 component/util files from eager imports to React.lazy() + withSuspenseFallback() for heavy components: SchemaEditor, ActivityFeedTab, ContractTab, CustomPropertyTable, TaskTabNew, EntitySummaryPanel, ModalWithMarkdownEditor, BlockEditor, CodeEditor, and others. Lazy constants are placed after all traditional imports. Removed eager component imports are replaced with import type for props interfaces where applicable. Zero TypeScript errors introduced. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
❌ PR checklist incompleteThis PR cannot be merged until the following are addressed on its linked issue:
The fields live on the linked issue in the Shipping project (open the issue → right sidebar → Projects). After you set them, re-run this check (or push a commit) — issue/project changes do not re-trigger it automatically. Maintainers can bypass this check by adding the |
Keep lazy-wrapped constants (CustomPropertyTable, ActivityFeedTab, ContractTab, ContainerChildren, SampleDataTableComponent, OwnerLabel) while accepting main's changes: ContainerDetail function bodies moved to ContainerDetailPureUtils, ColumnSearchResult re-exported from DataAssetSummaryPanelPureUtils, getUsagePercentile removed from DataAssetSummaryPanelUtils. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔴 Playwright Results — 5 failure(s), 21 flaky✅ 4240 passed · ❌ 5 failed · 🟡 21 flaky · ⏭️ 105 skipped
Genuine Failures (failed on all attempts)❌
|
|
Code Review ✅ Approved 3 resolved / 3 findingsImplements lazy-loading across 105 UI components using ✅ 3 resolved✅ Bug: Lazy-wrapping FeedEditor breaks ref forwarding in feed editors
✅ Quality: Test mock of withSuspenseFallback does not forward refs
✅ Quality: Comment says enforce:'post' but plugin uses transformIndexHtml order
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |



Summary
React.lazy()+withSuspenseFallback()for heavy/deferred componentsSchemaEditor,ActivityFeedTab,ContractTab,CustomPropertyTable,TaskTabNew,EntitySummaryPanel,ModalWithMarkdownEditor,BlockEditor,CodeEditor,FeedEditor,WorkflowHistory,TagSelectForm,TestCaseFormV1, and ~20 moreimport typefor props interfaces where applicableScope
Tab registry utils (ChartDetails, Dashboard, DashboardDataModel, Topic, Container, MlModel, Pipeline, StoredProcedures, SearchIndex, Directory, File, Spreadsheet, Worksheet, APICollection, APIEndpoints, DataProduct, DomainUtils, GlossaryUtils, MetricUtils, DataAssetSummaryPanel, EntitySummaryPanel, GlossaryTermUtils, GlossaryTermUtil, DataMarketplace, CSV): lazy-wrap heavy tab components
Component files (~80 files): ActivityFeed components, DataContract tabs, DataQuality forms, Database profiler modals, Entity drawers/panels, common editors, explore/knowledge panels, settings pages, form widgets
Test plan
Part of open-metadata/openmetadata-collate#4230
🤖 Generated with Claude Code
Summary by Gitar
injectCriticalPreloadsVite plugin to preload Inter fonts and hero SVGs in production.manualChunksandassetFileNamesinvite.config.tswith explicit type annotations.withSuspenseFallbackto supportforwardRefand explicit generics, ensuring compatibility with complex component trees.MyDataPageto use a skeleton-first rendering pattern, preventing unnecessary API round-trips that previously blocked LCP.withSuspenseFallbackmock tojest.config.jsto ensure consistent component behavior across the unit test suite.This will update automatically on new commits.