Skip to content

feat(ui): extract database/schema/table tab utils and config utils#28792

Merged
shah-harshit merged 5 commits into
mainfrom
feat/extract-database-tab-utils
Jun 8, 2026
Merged

feat(ui): extract database/schema/table tab utils and config utils#28792
shah-harshit merged 5 commits into
mainfrom
feat/extract-database-tab-utils

Conversation

@shah-harshit

Copy link
Copy Markdown
Contributor

Summary

Extract tab definitions, dropdown option builders, and configuration utilities from large source files into focused dedicated modules. All original files re-export every moved symbol for backward compatibility.

New files

New File Extracted From What it contains
Database/DatabaseDropdownOptions.tsx Database/Database.util.tsx Database dropdown option builders
Database/DatabaseTabsUtils.tsx Database/Database.util.tsx Database page tab definitions
DatabaseSchemaDropdownOptions.tsx DatabaseSchemaDetailsUtils.tsx Schema dropdown option builders
DatabaseSchemaTabsUtils.tsx DatabaseSchemaDetailsUtils.tsx Schema page tab definitions
TableDropdownOptions.tsx TableUtils.tsx Table dropdown option builders
TableTabsUtils.tsx TableUtils.tsx Table page tab definitions
IngestionConfigUtils.ts IngestionUtils.tsx Pure ingestion configuration utils
CronExpressionUtils.ts SchedularUtils.tsx Cron schedule/expression pure utils
DomainFilterUtils.ts DomainUtils.tsx Domain filter query builders

Guidelines followed

  • Pure utils (.ts): no React imports, no JSX, no API calls
  • Tab/dropdown utils (.tsx): JSX allowed, but structured as focused modules
  • All original files re-export moved symbols for backward compat
  • import type used for all type-only imports

Test plan

  • npx tsc --noEmit passes (no new errors in changed files)
  • UI checkstyle passes
  • Existing tests continue to pass

🤖 Generated with Claude Code

…s (PR #13)

Extract tab components and config utils from large source files into dedicated modules.
Original files re-export all moved symbols for backward compatibility.

New files:
- Database/DatabaseDropdownOptions.tsx (database dropdown option builders)
- Database/DatabaseTabsUtils.tsx (database page tab definitions)
- DatabaseSchemaDropdownOptions.tsx (schema dropdown option builders)
- DatabaseSchemaTabsUtils.tsx (schema page tab definitions)
- TableDropdownOptions.tsx (table dropdown option builders)
- TableTabsUtils.tsx (table page tab definitions)
- IngestionConfigUtils.ts (ingestion configuration pure utils)
- CronExpressionUtils.ts (cron schedule/expression utils)
- DomainFilterUtils.ts (domain filter query builders)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shah-harshit shah-harshit requested a review from a team as a code owner June 8, 2026 06:29
@github-actions

github-actions Bot commented Jun 8, 2026

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. Add a closing reference such as Fixes #12345 to the PR description (accepted keywords: Fixes, Closes, Resolves).

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 Jun 8, 2026

Copy link
Copy Markdown
Contributor

Hi there 👋 Thanks for your contribution!

The OpenMetadata team will review the PR shortly! Once it has been labeled as safe to test, the CI workflows
will start executing and we'll be able to make sure everything is working as expected.

Let us know if you need any help!

Comment thread openmetadata-ui/src/main/resources/ui/src/utils/IngestionConfigUtils.ts Outdated
@shah-harshit shah-harshit self-assigned this Jun 8, 2026
@shah-harshit shah-harshit added UI UI specific issues safe to test Add this label to run secure Github workflows on PRs skip-pr-checks Bypass PR metadata validation check labels Jun 8, 2026
shah-harshit and others added 2 commits June 8, 2026 12:04
…tils

Removes transitive React/antd dependency from pure util IngestionConfigUtils.ts.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@shah-harshit shah-harshit changed the title feat(ui): extract database/schema/table tab utils and config utils (PR #13) feat(ui): extract database/schema/table tab utils and config utils Jun 8, 2026
@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

Jest test Coverage

UI tests summary

Lines Statements Branches Functions
Coverage: 63%
63.4% (67360/106233) 44.29% (36985/83489) 46.68% (11157/23901)

@shah-harshit shah-harshit enabled auto-merge (squash) June 8, 2026 08:02
- TableTabsUtils: convert ActivityFeedTab from eager import to React.lazy()
- Apply import type for type-only symbols across all new utils files

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Changed from import type back to value import — ActivityFeedLayoutType is
an enum used at runtime (ActivityFeedLayoutType.THREE_PANEL).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@sonarqubecloud

sonarqubecloud Bot commented Jun 8, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Jun 8, 2026

Copy link
Copy Markdown
Contributor

🟡 Playwright Results — all passed (14 flaky)

✅ 4266 passed · ❌ 0 failed · 🟡 14 flaky · ⏭️ 88 skipped

Shard Passed Failed Flaky Skipped
✅ Shard 1 301 0 0 4
✅ Shard 2 804 0 0 9
🟡 Shard 3 802 0 3 8
🟡 Shard 4 851 0 4 12
🟡 Shard 5 718 0 3 47
🟡 Shard 6 790 0 4 8
🟡 14 flaky test(s) (passed on retry)
  • Features/QueryEntity.spec.ts › Query Entity (shard 3, 1 retry)
  • Features/SettingsNavigationPage.spec.ts › should show navigation blocker when leaving with unsaved changes (shard 3, 1 retry)
  • Flow/ExploreAggregationCountsMatching.spec.ts › should verify left panel counts and tab search results for normal search (shard 3, 1 retry)
  • Pages/AppStopRunModal.spec.ts › should close stop modal when cancel is clicked (shard 4, 1 retry)
  • Pages/DataContracts.spec.ts › Contract Status badge should be visible on condition if Contract Tab is present/hidden by Persona (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Set (shard 4, 1 retry)
  • Pages/DataContractsSemanticRules.spec.ts › Validate Description Rule Is_Not_Set (shard 4, 1 retry)
  • Pages/Entity.spec.ts › Tier Add, Update and Remove (shard 5, 1 retry)
  • Pages/Entity.spec.ts › Announcement create, edit & delete (shard 5, 1 retry)
  • Pages/ExplorePageRightPanel_KnowledgeCenter.spec.ts › Should remove user owner for knowledgeCenter (shard 5, 1 retry)
  • Pages/Glossary.spec.ts › Column dropdown drag-and-drop functionality for Glossary Terms table (shard 6, 1 retry)
  • Pages/Lineage/DataAssetLineage.spec.ts › Column lineage for apiEndpoint -> table (shard 6, 1 retry)
  • Pages/Lineage/LineageFilters.spec.ts › Verify Impact Analysis service filter selection (shard 6, 1 retry)
  • Pages/ODCSImportExport.spec.ts › Multi-object ODCS contract - object selector shows all schema objects (shard 6, 1 retry)

📦 Download artifacts

How to debug locally
# Download playwright-test-results-<shard> artifact and unzip
npx playwright show-trace path/to/trace.zip    # view trace

@shah-harshit shah-harshit merged commit ea2362f into main Jun 8, 2026
51 checks passed
@shah-harshit shah-harshit deleted the feat/extract-database-tab-utils branch June 8, 2026 11:56
@gitar-bot

gitar-bot Bot commented Jun 8, 2026

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

Refactors large database and schema modules by extracting tab definitions and configuration utilities into focused files. All imports were updated to ensure backward compatibility and clean up cross-module dependencies.

✅ 1 resolved
Quality: Pure util IngestionConfigUtils imports from React-heavy SchedularUtils

📄 openmetadata-ui/src/main/resources/ui/src/utils/IngestionConfigUtils.ts:46 📄 openmetadata-ui/src/main/resources/ui/src/utils/SchedularUtils.tsx:14 📄 openmetadata-ui/src/main/resources/ui/src/utils/CronExpressionUtils.ts:86
IngestionConfigUtils.ts is a pure .ts util module (per the PR's own guideline: "Pure utils (.ts): no React imports, no JSX, no API calls"). However, line 46 imports getDayCron from ./SchedularUtils, which is a .tsx file that imports { Select } from 'antd' and other React/JSX dependencies (SchedularUtils.tsx:14). This pulls the antd/React dependency graph into what should be a pure utility module, defeating the separation this refactor aims to establish.

getDayCron is actually defined in the new pure module CronExpressionUtils.ts:86. Importing it directly from there avoids the unnecessary transitive dependency on SchedularUtils.tsx.

Options

Display: compact → Showing less information.

Comment with these commands to change:

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 UI UI specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants