Add empty state for classification and metric page#30103
Conversation
| const isMetricListEmpty = | ||
| !loadingMore && metrics.length === 0 && !searchText && !statusFilter; |
There was a problem hiding this comment.
When an unfiltered request returns no rows for the current page while paging.total is still positive, this condition treats the whole catalog as empty and removes the toolbar and pagination. The user then cannot return to a populated page without reloading or changing the URL.
| const isMetricListEmpty = | |
| !loadingMore && metrics.length === 0 && !searchText && !statusFilter; | |
| const isMetricListEmpty = | |
| !loadingMore && | |
| metrics.length === 0 && | |
| paging.total === 0 && | |
| !searchText && | |
| !statusFilter; |
🟡 Playwright Results — all passed (40 flaky)✅ 4528 passed · ❌ 0 failed · 🟡 40 flaky · ⏭️ 95 skipped
🟡 40 flaky test(s) (passed on retry)
How to debug locally# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip # view trace |
…ility in unit tests - Add Box and EmptyPlaceholder mocks to @openmetadata/ui-core-components in ClassificationDetails.test.tsx and MetricListPage.test.tsx; the component now uses these for empty states and the missing mocks caused hard render crashes that failed every test in both suites. - Fix three MetricListPage tests that require the toolbar (search input, status filter, bulk-edit button): the toolbar is hidden when isMetricListEmpty=true (no metrics + no search + no filter), so seed the initial searchQuery mock with one metric to keep the toolbar visible. - Update the "docs link" test to trigger the ErrorPlaceHolder locale.emptyText path (toolbar visible → apply Draft filter → fetch returns empty → table shows locale.emptyText with the docs link) instead of the full-page EmptyPlaceholder path that has no docs link. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Code Review ✅ ApprovedImplements permission-aware empty states for classification, tag, and metric pages to improve user onboarding. No issues found. OptionsDisplay: compact → Showing less information. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |



Describe your changes:
Fixes #
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 states for metrics, classifications, and tags. The main changes are:
Confidence Score: 5/5
This looks safe to merge.
Important Files Changed
Reviews (3): Last reviewed commit: "Merge branch 'main' into empty-classific..." | Re-trigger Greptile
Context used (3)