Repository navigation
Added empty placeholder in context center pages - #30053
Conversation
❌ 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 |
|
Code Review ✅ Approved 1 resolved / 1 findingsIntroduces new empty state placeholders for Context Center pages, including dashboard, documents, and article views. The previously identified crash related to ✅ 1 resolved✅ Bug: Documents empty-state passes () => {} as iconLeading, crashes render
OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
The main-merge locale conflict resolution kept our (older) value for message.upload-document-hint, reverting main's #30053 update. Restore main's value across all locales ('Supports all file types...') so the ContextCenter upload-modal e2e assertion passes again. Only this key was affected. Co-Authored-By: Claude Opus 4.8 <[email protected]>
…laceholder (#30050) * feat(dq): new EmptyPlaceholder for Test Cases empty state Replaces the FilterTablePlaceHolder/Transi18next empty state in the shared DataQualityTab component (used by OSS, Collate classic, and AI mode) with the core EmptyPlaceholder component, adding distinct copy for the no-data-yet vs filtered-to-nothing cases via a new hasActiveFilters prop. * feat(dq): new EmptyPlaceholder for Test Suites empty state Replaces the ErrorPlaceHolder/FilterTablePlaceHolder empty states in the shared TestSuitesTable component (used by OSS, Collate, and AI mode) with the core EmptyPlaceholder, adding distinct copy for table suites, bundle suites, and the filtered-to-nothing case. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(alerts): features EmptyPlaceholder for Observability alerts empty state Replaces the ErrorPlaceHolder-based empty state in ObservabilityAlertsTable (OSS classic Alerts list) with the core EmptyPlaceholder features variant, matching the shared 3-column onboarding pattern (pick a trigger / choose a destination / stay ahead) with a create-permission-gated "+ New Alert" CTA. Threads alertResourcePermission from ObservabilityAlertsPage down to the table (the existing alertPermissions prop is a per-row array without a Create field, so it can't gate the empty-state CTA) and reuses the same Create || All check already used by ObservabilityAlertsHeader. Adds the shared label.new-entity key (first consumer of the CTA action pattern) plus the alert-specific empty-state copy, synced across all locales via yarn i18n. Co-Authored-By: Claude Opus 4.8 <[email protected]> * chore(dq): wire QualityTab hasActiveFilters; prune dead empty-state locale key Wires the second DataQualityTab caller (QualityTab.component.tsx) to pass hasActiveFilters computed from its search value, status filter, and type filter, so a zero-result search/filter shows "No matching test cases" instead of "No test cases yet". message.no-data-quality-test-case and message.explore-our-guide-here are unused in openmetadata-ui but are still live dependencies of Collate's DataQualityDimension component via the shared translation bundle, so they were left in en-us.json rather than deleted. * fix(dq): use File02 brand icon for Test Cases empty state (per Figma) * fix(dq): brand clipboard icon for Test Suites empty state (per Figma) * feat(dq): New Test Case / New Bundle Suite CTAs in DQ empty states Adds primary-action CTAs ("+ New Test Case", "+ New Bundle Suite") to the true-empty (non-filtered) DQ empty states in DataQualityTab and TestSuitesTable, per Figma. Wires the page-level create handlers (which own the create drawers in DataQualityPage) down to the shared components deep inside DataQualityProvider via a register pattern: DataQualityContext gains a createActions/setCreateActions pair, and a small RegisterDataQualityCreateActions component — rendered as a child of DataQualityProvider since DataQualityPage itself renders the provider rather than being rendered inside it — registers the handlers and Create permissions on mount. TestCases.component.tsx and TestSuites.component.tsx build EmptyPlaceholderAction objects from createActions and pass them through as emptyStateAction, shown only in the true-empty state (never alongside hasActiveFilters). Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(dq): cover bundle-suite CTA wiring; fix TestSuites mock; memoize DQ create handlers TestSuites.test.tsx was missing an EmptyPlaceholder stub in its ui-core-components mock, crashing 2 pre-existing tests whenever the real TestSuitesTable hit its empty-state branch; added the stub plus a wiring test pair for the New Bundle Suite CTA, and fixed a stale filter-table-placeholder assertion left over from the EmptyPlaceholder migration. Also wrap DataQualityPage's modal-open handlers in useCallback to stop unnecessary re-registration of the create-actions effect on every render. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(dq): show New Bundle Suite CTA only on Bundle Suites sub-tab * fix(alerts): replace table with empty placeholder when no alerts (per Figma) * feat(incidents): EmptyPlaceholder for Incident Manager empty state * fix(incidents): clearer empty-state description (incident on test-case failure) * feat(dq): EmptyPlaceholder for Test Suite / Data Contract pipelines empty state * feat(test-library): filter-aware EmptyPlaceholder (no-results + no-data) for Test Definitions * feat(dq): EmptyPlaceholder for test case results empty (time-range) state * feat(alerts): EmptyPlaceholder for alert Recent Events empty (no-data + filtered) state * fix(observability): address review findings on empty placeholders - DataQuality e2e: TestCase filters waited on the old 'search-error-placeholder' testid; the filtered-empty test-case list now renders EmptyPlaceholder ('empty-placeholder'). Update the 3 assertions. - ObservabilityAlertsTable: hold the empty onboarding until the resource-permission fetch settles (loadingCount === 0) so an empty alerts response can't render without the 'New Alert' CTA while the permission is still resolving. Add a covering test. - DataQualityPage: add setCreateActions to the RegisterDataQualityCreateActions effect deps to satisfy react-hooks/exhaustive-deps. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(incident-manager): mock Box + EmptyPlaceholder in IncidentManager.test IncidentManagerTable now renders the shared EmptyPlaceholder (wrapped in Box) via Table.Body's renderEmptyState. The test's @openmetadata/ui-core-components mock didn't export Box/EmptyPlaceholder, so they resolved to undefined and the empty-state <td> threw 'Element type is invalid', failing 9 tests. Add both to the mock factory. Co-Authored-By: Claude Opus 4.8 <[email protected]> * chore(i18n): translate new observability empty-state keys (OSS) yarn i18n seeded the 27 newly-added label.*/message.* empty-state keys into every locale with the English value. Replace those with native translations across all 19 non-English locales (ar, de, es, fr, gl, he, ja, ko, mr, nl, pr/fa, pt-br, pt-pt, ru, sv, th, tr, zh-cn, zh-tw). Values only — keys and alphabetical order unchanged; {{entity}} placeholder preserved. Co-Authored-By: Claude Opus 4.8 <[email protected]> * refactor(dq): DataQualityProvider takes createActions as a prop Replace the 'render a null child inside the provider to call setCreateActions' pattern with a plain prop. DataQualityProvider now accepts createActions and feeds it straight into context; the page memoizes the handlers/permissions and passes them down when it renders the provider. - Deletes RegisterDataQualityCreateActions and drops setCreateActions from the context interface (nothing else consumed it). - Handlers are present on first render (no useEffect delay where the empty-state CTA briefly renders without its action). - Consumers (TestCases/TestSuites) are unchanged — they still read createActions. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(e2e): update TestSuite pipeline empty-state selectors for EmptyPlaceholder The TestSuite Pipelines tab now renders the shared EmptyPlaceholder (data-testid="empty-placeholder") instead of the old ErrorPlaceHolder (assign-error-placeholder-Pipeline / add-placeholder-button). - TestSuiteMultiPipeline.spec: assert on the empty-placeholder container + its 'Add Pipeline' CTA (scoped role locator). Copy is unchanged (message.no-table-pipeline). - dataQuality.addTestSuitePipeline util: locate the empty-state CTA via the empty-placeholder role button, still OR-ed with the header add-pipeline-button for the non-empty state. Co-Authored-By: Claude Opus 4.8 <[email protected]> * test(e2e): update Table.spec DQ test-case empty-state selector to empty-placeholder The 'Table search/filter with sorting' tests drive the Data Quality test-case list (test-case-table) and asserted the old FilterErrorPlaceHolder testid (search-error-placeholder). DataQualityTab now renders the shared EmptyPlaceholder (empty-placeholder), so point both no-result assertions at it. Co-Authored-By: Claude Opus 4.8 <[email protected]> * feat(dq): use EmptyPlaceholder for AddTestCaseList empty state The test-case picker (Add Bundle Suite, scheduler, pipeline, test suite detail) showed the legacy ErrorPlaceHolder FILTER placeholder (magnifying-glass 'No result found'). Swap it for the shared EmptyPlaceholder (blank variant, filter-off icon), reusing the same copy (label.no-result-found / message.try-adjusting-filter). Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(alerts): make classic alerts empty state fill the page via min-height Match the AI alerts surface: the features onboarding placeholder was capped at min-h-[28rem]. Use min-h-[calc(100vh-16rem)] so it fills roughly the viewport height below the header. Downward-only min-height (not flex-1/h-full), so it can't overflow the header. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(dq): add isRowHeader to TestDefinition/IncidentManager table columns react-aria's Table requires at least one Column with isRowHeader=true. Both tables render the EmptyPlaceholder inside the still-mounted react-aria Table (via renderEmptyState), so on an empty/filtered result react-aria re-commits the collection and throws 'A table must have at least one Column with the isRowHeader prop set to true' — surfacing as an 'unexpected error' toast. Mark the name column as the row header (isRowHeader={col.id === 'name'}), matching DataQualityTab and TestSuitesTable. Co-Authored-By: Claude Opus 4.8 <[email protected]> * chore(ui): fix import order in AddTestCaseList (UI checkstyle) organize-imports:cli places the ic-filter-off.svg asset import in its sorted position; the earlier commit ran only eslint+prettier, tripping the UI Checkstyle (organise-imports) job. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(alerts): surface resource-permission fetch failure instead of swallowing If getResourcePermission(EVENT_SUBSCRIPTION) throws, the catch was silent, so the empty Alerts onboarding could render without the New Alert CTA and no signal to the user. Show an error toast so the failure is visible and the user can refresh to retry, rather than silently degrading to a create-less state. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(alerts): show New Alert CTA when resource permission is unknown greptile: a failed getResourcePermission left alertResourcePermission undefined, which hasCreatePermission read as false, hiding the New Alert CTA from an authorized user with no in-page retry. Distinguish an explicit denial ({Create:false, All:false}) from an unknown/failed permission: only hide the CTA on explicit denial; when unknown, show it and let the backend enforce on submit. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(alerts): fail closed on unknown create permission (no fail-open CTA) greptile (security): showing New Alert when alertResourcePermission is undefined fails open — advertising a privileged action to a user whose create permission isn't confirmed. Revert to fail-closed: show the CTA only when create is explicitly allowed. The permission-fetch failure is still surfaced via the error toast in useObservabilityAlerts, so an authorized user sees the error and can refresh to retry. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(alerts): show error + retry state when resource-permission fetch fails greptile (P1): showErrorToast suppresses 401 and GET-403, so a failed getResourcePermission(EVENT_SUBSCRIPTION) left no error cue and no retry — an authorized user could sit on a create-less empty Alerts page until refresh. Track the failure explicitly (hasResourcePermissionError) and expose a retry (refetchResourcePermission) from useObservabilityAlerts. When the empty state would render and the permission fetch failed, show an explicit error placeholder ('Something went wrong' + Try Again) that re-runs the permission fetch, instead of the create-less onboarding. Still fail-closed on a real denial. Co-Authored-By: Claude Opus 4.8 <[email protected]> * fix(i18n): restore main's upload-document-hint after merge revert The main-merge locale conflict resolution kept our (older) value for message.upload-document-hint, reverting main's #30053 update. Restore main's value across all locales ('Supports all file types...') so the ContextCenter upload-modal e2e assertion passes again. Only this key was affected. Co-Authored-By: Claude Opus 4.8 <[email protected]> --------- Co-authored-by: Claude Opus 4.8 <[email protected]>



Describe your changes:
Fixes 4984
I worked on ... because ...
Type of change:
High-level design:
N/A — small change.
Tests:
Use cases covered
Unit tests
Backend integration tests
Ingestion integration tests
Playwright (UI) tests
Manual testing performed
UI screen recording / screenshots:
Not applicable.
Checklist:
Fixes <issue-number>: <short explanation>Fixes #<issue-number>above.Greptile Summary
This PR adds empty placeholders across the Context Center pages. The main changes are:
Confidence Score: 4/5
This is close, but these issues should be fixed before merging.
ContextCenterArticlesPage.tsx and DocumentFolderView.component.tsx
Security Review
A permission-denied articles view can still be shown as an onboarding empty state instead of an access-denied state.
Important Files Changed
Reviews (12): Last reviewed commit: "lint fix" | Re-trigger Greptile
Context used (3)