Skip to content

fix(ui): add pagination in sub domains table - #22844

Merged
karanh37 merged 6 commits into
mainfrom
fix-22792
Aug 11, 2025
Merged

karanh37 merged 6 commits into
mainfrom
fix-22792

Conversation

@karanh37

@karanh37 karanh37 commented Aug 8, 2025 •

Copy link
Copy Markdown
Contributor

Describe your changes:

Fixes #22792

This pull request refactors how subdomains are loaded and displayed in the Domain Details page, moving from eager loading of all subdomain data to an efficient paginated approach. Instead of fetching all subdomains and passing them around, the code now only fetches the subdomain count for summary purposes and loads subdomain data page-by-page in the table. This improves performance and scalability, especially for domains with many subdomains.

Subdomain Data Loading and Pagination

  • Refactored subdomain loading in DomainDetailsPage.component.tsx to fetch only the count of subdomains for summary display, removing the previous eager loading of all subdomain data. (openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailsPage/DomainDetailsPage.component.tsx) [1] [2] [3] [4] [5] [6] [7]
  • Updated the subdomains tab to use the new paginated SubDomainsTable component, passing only the domain FQN and count, not the full subdomain list. (openmetadata-ui/src/utils/DomainUtils.tsx) [1] [2] [3]

SubDomainsTable Component Refactor

  • Modified SubDomainsTable to fetch subdomain data page-by-page using the domain FQN, implement internal pagination logic, and handle loading/error states. (openmetadata-ui/src/main/resources/ui/src/components/Domain/SubDomainsTable/SubDomainsTable.component.tsx) [1] [2]
  • Updated the SubDomainsTableProps interface to require domainFqn instead of a list of subdomains and removed the isLoading prop. (openmetadata-ui/src/main/resources/ui/src/components/Domain/SubDomainsTable/SubDomainsTable.interface.ts)

Supporting Type and API Changes

  • Updated types and function signatures throughout the codebase to use subDomainsCount (number) instead of an array of subdomains, and removed the isSubDomainsLoading flag. (openmetadata-ui/src/utils/Domain/DomainClassBase.ts, openmetadata-ui/src/main/resources/ui/src/components/Domain/DomainDetailsPage/DomainDetailsPage.component.tsx) [1] [2] [3]

Test Improvements

  • Added a new Playwright E2E test for subdomain pagination, verifying subdomain count, pagination navigation, and count updates when adding a subdomain. (openmetadata-ui/src/main/resources/ui/playwright/e2e/Pages/SubDomainPagination.spec.ts)
  • Fixed subdomain FQN construction in the test support class to use fullyQualifiedName for parent domains. (openmetadata-ui/src/main/resources/ui/playwright/support/domain/SubDomain.ts)

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

Checklist:

  • I have read the CONTRIBUTING document.
  • My PR title is Fixes <issue-number>: <short explanation>
  • 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.

@karanh37
karanh37 requested a review from a team as a code owner August 8, 2025 10:38
@github-actions github-actions Bot added safe to test Add this label to run secure Github workflows on PRs UI UI specific issues labels Aug 8, 2025
@github-actions

github-actions Bot commented Aug 8, 2025 •

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.19% (49200/77863) 38.97% (20381/52294) 42.93% (5873/13681)

@sonarqubecloud

Copy link
Copy Markdown

@karanh37
karanh37 merged commit a239cfb into main Aug 11, 2025
@karanh37
karanh37 deleted the fix-22792 branch August 11, 2025 11:03
@github-actions

Copy link
Copy Markdown
Contributor

Changes have been cherry-picked to the 1.9.0 branch.

github-actions Bot pushed a commit that referenced this pull request Aug 11, 2025
* add pagination on subdomains table

* add tests

* fix domain tests

* fix flaky test

* moved config outsude

(cherry picked from commit a239cfb)
Copilot AI pushed a commit that referenced this pull request Aug 15, 2025
* add pagination on subdomains table

* add tests

* fix domain tests

* fix flaky test

* moved config outsude

This branch had an error being deployed

1 failed deployment
test — d07be32a Deployed Aug 11, 2025 by karanh37
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 To release Will cherry-pick this PR into the release branch UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

New subdomains are not listed under Domain, when subdomain count >50

3 participants