feat(ui): lazy load home page widgets#28079
Conversation
…ance Replace static widget imports with React.lazy() in CustomizeMyDataPageClassBase and wrap widget renders in Suspense with a skeleton fallback in CustomizableLandingPageUtils. Each widget now loads as a separate JS chunk, reducing the initial bundle size of the home page. Closes open-metadata/openmetadata-collate#4075 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔴 Playwright Results — 1 failure(s), 12 flaky✅ 4057 passed · ❌ 1 failed · 🟡 12 flaky · ⏭️ 103 skipped
Genuine Failures (failed on all attempts)❌
|
Code Review ✅ Approved 1 resolved / 1 findingsImplements lazy loading for home page widgets to improve initial load performance, but requires an error boundary to handle potential chunk load failures. ✅ 1 resolved✅ Edge Case: Missing per-widget error boundary for chunk load failures
OptionsDisplay: compact → Showing less information. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Summary
React.lazy()dynamic imports inCustomizeMyDataPageClassBase.ts<Suspense>with aWidgetWrapperskeleton fallback inCustomizableLandingPageUtils.tsxMyFeedWidget,MyDataWidget) handled via.then(m => ({ default: m.X }))patterngetWidgetsFromKeyreturn type updated fromFCtoComponentTypeto accommodate lazy componentsEffect: Each home page widget now loads as a separate JS chunk. Browser fetches widget bundles on demand rather than including all of them in the initial page bundle. Suspense fallback shows the existing skeleton UI during chunk load — no visual regression.
Closes https://github.com/open-metadata/openmetadata-collate/issues/4075
Test plan
MyDataPage.test.tsxandCustomizableLandingPageUtils.test.tsx— 32/32 tests pass🤖 Generated with Claude Code