Skip to content

Add empty state for classification and metric page#30103

Merged
anuj-kumary merged 3 commits into
mainfrom
empty-classification
Jul 16, 2026
Merged

Add empty state for classification and metric page#30103
anuj-kumary merged 3 commits into
mainfrom
empty-classification

Conversation

@anuj-kumary

@anuj-kumary anuj-kumary commented Jul 15, 2026

Copy link
Copy Markdown
Member

Describe your changes:

Fixes #

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 states for metrics, classifications, and tags. The main changes are:

  • Adds permission-aware creation actions to each empty state.
  • Adds feature descriptions, icons, and translated text.
  • Updates metric and classification tests for the new components.

Confidence Score: 5/5

This looks safe to merge.

  • No new blocking issue was found in the updated empty-state code.
  • The remaining metric pagination behavior is already covered by the existing review finding.

Important Files Changed

Filename Overview
openmetadata-ui/src/main/resources/ui/src/pages/MetricsPage/MetricListPage/MetricListPage.tsx Adds a feature-based empty state while preserving the existing filtered-results table placeholder.
openmetadata-ui/src/main/resources/ui/src/pages/TagsPage/TagsPage.tsx Adds a classification empty state with a permission-aware creation action.
openmetadata-ui/src/main/resources/ui/src/components/Classifications/ClassificationDetails/ClassificationDetails.tsx Replaces the empty tag table placeholder with a dedicated tag creation state.
openmetadata-ui/src/main/resources/ui/src/pages/MetricsPage/MetricListPage/MetricListPage.test.tsx Updates mocks and fixtures for toolbar-dependent metric scenarios.
openmetadata-ui/src/main/resources/ui/src/components/Classifications/ClassificationDetails/ClassificationDetails.test.tsx Adds mocks for the new shared empty-state components.

Reviews (3): Last reviewed commit: "Merge branch 'main' into empty-classific..." | Re-trigger Greptile

Context used (3)

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

@anuj-kumary anuj-kumary self-assigned this Jul 15, 2026
@anuj-kumary anuj-kumary added the safe to test Add this label to run secure Github workflows on PRs label Jul 15, 2026
@anuj-kumary
anuj-kumary requested a review from a team as a code owner July 15, 2026 19:10
@anuj-kumary anuj-kumary added the skip-pr-checks Bypass PR metadata validation check label Jul 15, 2026
Comment on lines +782 to +783
const isMetricListEmpty =
!loadingMore && metrics.length === 0 && !searchText && !statusFilter;

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Empty Page Hides Pagination

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.

Suggested change
const isMetricListEmpty =
!loadingMore && metrics.length === 0 && !searchText && !statusFilter;
const isMetricListEmpty =
!loadingMore &&
metrics.length === 0 &&
paging.total === 0 &&
!searchText &&
!statusFilter;

@github-actions

github-actions Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (40 flaky)

✅ 4528 passed · ❌ 0 failed · 🟡 40 flaky · ⏭️ 95 skipped

Shard Passed Failed Flaky Skipped
🟡 Shard 1 435 0 5 16
✅ Shard 2 11 0 0 0
🟡 Shard 3 819 0 13 8
🟡 Shard 4 816 0 5 18
🟡 Shard 5 836 0 4 5
🟡 Shard 6 785 0 3 46
🟡 Shard 7 826 0 10 2
🟡 40 flaky test(s) (passed on retry)
  • Features/Glossary/GlossaryPagination.spec.ts › should check for nested glossary term search (shard 1, 1 retry)
  • Pages/Lineage/LineageRightPanel.spec.ts › Verify custom properties tab IS visible for supported type: metric (shard 1, 1 retry)
  • Pages/SearchSettings.spec.ts › Latest preview config wins when a superseded request resolves late (shard 1, 1 retry)
  • Flow/SearchRBAC.spec.ts › User without permission (shard 1, 1 retry)
  • Flow/SearchRBAC.spec.ts › a fully denied user sees neither asset type when browsing (shard 1, 1 retry)
  • Features/BulkImportWithDotInName.spec.ts › Bulk edit existing entity with dot in service name (shard 3, 1 retry)
  • Features/BulkImportWithDotInName.spec.ts › Import at database level with dot in service name (shard 3, 1 retry)
  • Features/ContextCenterArchive.spec.ts › archive page lazy-loads more rows on scroll within its own scroll container (shard 3, 1 retry)
  • Features/ContextCenterArticles.spec.ts › Article listing search filters, clears, and shows empty state (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › clearing search restores the unfiltered list (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › adding a linked asset in edit mode shows entity badge on the row (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › Private memory shows "visible only to you" description (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › typing the linked table name in the asset search returns it as a result (shard 3, 1 retry)
  • Features/ContextCenterMemories.spec.ts › ArrowDown + Enter keyboard navigation selects the linked table result (shard 3, 1 retry)
  • Features/ContextCenterPermission.spec.ts › user with view-only permission cannot see restore or delete actions on an archived document (shard 3, 1 retry)
  • Features/ContextCenterPermission.spec.ts › created-by-me filter on the archive page shows only the current user's archived documents (shard 3, 1 retry)
  • Features/DataQuality/TestCaseImportExportBasic.spec.ts › should show validation errors for invalid CSV (shard 3, 1 retry)
  • Features/Glossary/GlossaryHierarchy.spec.ts › should move term with children to different glossary (shard 3, 1 retry)
  • Features/Glossary/GlossaryTermRelationsGraphNested.spec.ts › viewing a child term: parentOf edge is rendered between parent and child (shard 4, 1 retry)
  • Features/IncidentManager.spec.ts › Resolving incident & re-run pipeline (shard 4, 1 retry)
  • Features/RestoreEntityInheritedFields.spec.ts › Validate restore with Inherited domain and data products assigned (shard 4, 1 retry)
  • Features/Table.spec.ts › should persist page size (shard 4, 1 retry)
  • Features/Table.spec.ts › Tags term should be consistent for search (shard 4, 1 retry)
  • Features/UserProfileOnlineStatus.spec.ts › Should not show online status for inactive users (shard 5, 1 retry)
  • Flow/ObservabilityAlerts.spec.ts › Test Suite alert (shard 5, 1 retry)
  • Pages/CustomProperties.spec.ts › String (shard 5, 1 retry)
  • Pages/CustomProperties.spec.ts › Sql Query (shard 5, 1 retry)
  • Pages/EntityDataSteward.spec.ts › DisplayName Add, Update and Remove for child entities (shard 6, 1 retry)
  • Pages/ExploreBrowse.spec.ts › service type drill-down disables unrelated roots and query-panel Clear resets it (shard 6, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 6, 1 retry)
  • ... and 10 more

📦 Download artifacts

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>
@github-actions

github-actions Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 64%
65% (75497/116141) 48.8% (44959/92127) 49.57% (13611/27453)

@sonarqubecloud

Copy link
Copy Markdown

@anuj-kumary
anuj-kumary merged commit 84c7ba6 into main Jul 16, 2026
56 checks passed
@anuj-kumary
anuj-kumary deleted the empty-classification branch July 16, 2026 06:08
@gitar-bot

gitar-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Code Review ✅ Approved

Implements permission-aware empty states for classification, tag, and metric pages to improve user onboarding. No issues found.

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

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 skip-pr-checks Bypass PR metadata validation check

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants