Skip to content

Added empty placeholder in context center pages - #30053

Merged
Rohit0301 merged 12 commits into
mainfrom
context-center-empty-state
Jul 15, 2026
Merged

Rohit0301 merged 12 commits into
mainfrom
context-center-empty-state

Conversation

@Rohit0301

@Rohit0301 Rohit0301 commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor
Screenshot 2026-07-14 at 5 05 59 PM Screenshot 2026-07-14 at 5 29 26 PM Screenshot 2026-07-14 at 5 42 18 PM Screenshot 2026-07-14 at 5 53 45 PM Screenshot 2026-07-14 at 6 04 24 PM Screenshot 2026-07-14 at 6 11 24 PM Screenshot 2026-07-14 at 6 52 15 PM Screenshot 2026-07-14 at 7 29 57 PM Screenshot 2026-07-14 at 9 49 03 PM Screenshot 2026-07-14 at 9 49 12 PM Screenshot 2026-07-14 at 9 49 26 PM Screenshot 2026-07-14 at 9 49 38 PM

Describe your changes:

Fixes 4984

I worked on ... because ...

Type of change:

  • Bug fix
  • Improvement
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation

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:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • My PR is linked to a GitHub issue via Fixes #<issue-number> above.
  • I have commented on my code, particularly in hard-to-understand areas.
  • For JSON Schema changes: I updated the migration scripts or explained why it is not needed.
  • For UI changes: I attached a screen recording and/or screenshots above.
  • I have added tests (unit / integration / Playwright as applicable) and listed them above.

Greptile Summary

This PR adds empty placeholders across the Context Center pages. The main changes are:

  • New blank, search, and filter empty states for articles, documents, memories, archive, and dashboard cards.
  • Empty-state create and upload actions for folders and documents.
  • Updated locale strings, SVG assets, unit tests, and Playwright expectations.

Confidence Score: 4/5

This is close, but these issues should be fixed before merging.

  • Article view denial can still be displayed as an empty knowledge base.
  • A failed folder file request can still be displayed as a real empty folder.
  • The latest create and upload callback gates look correctly applied.

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

Filename Overview
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterArticlesPage/ContextCenterArticlesPage.tsx Adds the articles onboarding empty state, but explicit no-view permission responses can still reach that state.
openmetadata-ui/src/main/resources/ui/src/components/ContextCenter/DocumentsView/DocumentFolderView.component.tsx Adds folder loading and empty rows, but a failed first file load can still render as a confirmed empty folder.
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterDashboardPage/ContextCenterDashboardPage.tsx Wires dashboard empty actions and folder creation with Create permission gating.
openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterDocumentsPage/ContextCenterDocumentsPage.tsx Wires document empty-state upload callbacks with Create permission gating.

Reviews (12): Last reviewed commit: "lint fix" | Re-trigger Greptile

Greptile also left 2 inline comments on this PR.

Context used (3)

  • Context used - CLAUDE.md (source)
  • Context used - openmetadata-ui-core-components/CLAUDE.md (source)
  • Context used - AGENTS.md (source)

@Rohit0301 Rohit0301 self-assigned this Jul 14, 2026
@Rohit0301 Rohit0301 added the safe to test Add this label to run secure Github workflows on PRs label Jul 14, 2026
@Rohit0301
Rohit0301 requested review from a team and karanh37 as code owners July 14, 2026 16:34
@github-actions

Copy link
Copy Markdown
Contributor

❌ PR checklist incomplete

This PR cannot be merged until the following are addressed on its linked issue:

  • No GitHub issue is linked. Link an issue in the Development section of the PR (or add Fixes #12345 to the description). For a same-org cross-repo issue, add Fixes open-metadata/<repo>#123 to the description.

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 skip-pr-checks label.

@github-actions

github-actions Bot commented Jul 14, 2026 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 64%
64.48% (75495/117070) 48.42% (45088/93102) 49.11% (13606/27702)

@sonarqubecloud

Copy link
Copy Markdown

@Rohit0301
Rohit0301 enabled auto-merge (squash) July 15, 2026 13:39
@Rohit0301
Rohit0301 merged commit 52f9eef into main Jul 15, 2026
55 of 58 checks passed
@Rohit0301
Rohit0301 deleted the context-center-empty-state branch July 15, 2026 13:40
@gitar-bot

gitar-bot Bot commented Jul 15, 2026

Copy link
Copy Markdown
Code Review ✅ Approved 1 resolved / 1 findings

Introduces new empty state placeholders for Context Center pages, including dashboard, documents, and article views. The previously identified crash related to iconLeading in the documents empty-state has been resolved.

✅ 1 resolved
✅ Bug: Documents empty-state passes () => {} as iconLeading, crashes render

📄 openmetadata-ui/src/main/resources/ui/src/pages/ContextCenterPage/ContextCenterDocumentsPage/ContextCenterDocumentsPage.tsx:601
In the Documents empty placeholder, the primary action sets iconLeading: () => {}. EmptyPlaceholderShell forwards this to Button, which treats any function as a component (isReactComponent) and renders <IconLeading data-icon="leading" />. Since the arrow returns undefined, React 18 throws "Nothing was returned from render", crashing the entire documents empty state — the exact path new users (no docs, no folders) hit. Replace it with the intended icon (UploadIcon, already imported), matching the Dashboard's upload-file action.

Options

Display: compact → Showing less information.

Comment with these commands to change the behavior for this request:

Compact
gitar display:verbose         

Was this helpful? React with 👍 / 👎 | Gitar

ShaileshParmar11 added a commit that referenced this pull request Jul 17, 2026
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]>
ShaileshParmar11 added a commit that referenced this pull request Jul 17, 2026
…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]>

This branch was previously deployed

1 inactive deployment
test — 960d65a0 Deployed Jul 15, 2026 by Rohit0301 via playwright-ci-postgresql (1, 7) #56635
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

safe to test Add this label to run secure Github workflows on PRs

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants