Fix(UI): Add conditional rendering for ClassificationDetails GenericProvider#26120
Fix(UI): Add conditional rendering for ClassificationDetails GenericProvider#26120
Conversation
…rovider Prevent GenericProvider from receiving an empty object when currentClassification is undefined by conditionally rendering it only when data is available. Show a Loader during fetch. This fixes potential runtime errors in child components (DomainLabelV2, OwnerLabelV2) that destructure properties from the provider context data. 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! |
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! |
Add 5 test cases covering the new Loader/GenericProvider conditional rendering: loading state, gap state, loaded state, GenericProvider data prop, and the classification-switching scenario. Co-Authored-By: Claude Opus 4.6 <[email protected]>
…al rendering Add 4 E2E test cases covering the loader/content transition: - Initial page load: loader disappears then content renders - All detail sections render after loading - Switching between classifications renders correct content - Page reload renders classification without blank state Co-Authored-By: Claude Opus 4.6 <[email protected]>
| import Table from '../../common/Table/Table'; | ||
| import { GenericProvider } from '../../Customization/GenericProvider/GenericProvider'; | ||
| import { DomainLabelV2 } from '../../DataAssets/DomainLabelV2/DomainLabelV2'; | ||
| import Loader from '../../common/Loader/Loader'; |
There was a problem hiding this comment.
💡 Quality: Loader import breaks grouping order of imports
The Loader import on line 68 is placed between the ../../Customization/ and ../../DataAssets/ import groups, breaking the established import ordering convention. All ../../common/ imports should be grouped together (lines 60-65) before the ../../Customization/ imports.
This is purely cosmetic and has no functional impact, but consistent import ordering helps with readability and reduces merge conflicts.
Suggested fix:
import Table from '../../common/Table/Table';
import Loader from '../../common/Loader/Loader';
import { GenericProvider } from '../../Customization/GenericProvider/GenericProvider';
import { DomainLabelV2 } from '../../DataAssets/DomainLabelV2/DomainLabelV2';
import { OwnerLabelV2 } from '../../DataAssets/OwnerLabelV2/OwnerLabelV2';
Was this helpful? React with 👍 / 👎
🔍 CI failure analysis for c721209: Playwright shard 4/6 failed again on retry with 3 different test failures in Entity, Domains, and Pipeline tests - all unrelated to this PR's ClassificationDetails changes.IssuePlaywright CI shard 4/6 failed on retry (job 64997267789) with 3 test failures, all in components unrelated to the PR changes. Root CauseAll failing tests are in Entity/Domain/Pipeline-related test files, completely separate from the ClassificationDetails component modified in this PR: Shard 4/6 Retry (job 64997267789):
DetailsWhy these failures are unrelated to this PR: This PR only modifies:
The failing tests are for:
These are entirely different UI flows, components, and data models. The shard has failed consistently across multiple retries with different flaky tests, indicating infrastructure instability rather than PR-related issues. Previous failures in this shard:
Code Review 👍 Approved with suggestions 0 resolved / 1 findingsClean fix that properly guards GenericProvider with conditional rendering, eliminating unsafe type assertion and empty object fallback. Good test coverage for the new loading states. Only a minor import ordering nit. 💡 Quality: Loader import breaks grouping order of importsThe This is purely cosmetic and has no functional impact, but consistent import ordering helps with readability and reduces merge conflicts. Suggested fixTip Comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change:
Was this helpful? React with 👍 / 👎 | Gitar |
|



Summary
GenericProviderinClassificationDetailsonly whencurrentClassificationis defined, preventing child components (DomainLabelV2,OwnerLabelV2) from receiving an empty{}object and accessing undefined properties<Loader />while classification data is being fetchedas Classificationtype assertion and?? {}fallbackTest plan