Skip to content

[ui-importer] add table name validation #4194

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: feat/form-input
Choose a base branch
from

Conversation

ramprasadagarwal
Copy link
Collaborator

What changes were proposed in this pull request?

  • Adds validation for table name when user enters table which already exists in the database

How was this patch tested?

  • Added unit test
image image

Please review Hue Contributing Guide before opening a pull request.

Copy link

github-actions bot commented Jul 19, 2025

✅ Test files were modified. Ensure that the tests cover all relevant changes. ✅

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds table name validation to the UI importer component to prevent users from creating tables with names that already exist in the database. The validation displays an error alert when users enter a table name that conflicts with existing tables.

  • Refactors the data catalog hook to use structured loading states and properly typed table metadata
  • Creates a reusable FormInput component for consistent form field rendering across the application
  • Implements real-time table name validation with visual error feedback in the destination settings

Reviewed Changes

Copilot reviewed 7 out of 7 changed files in this pull request and generated 14 comments.

Show a summary per file
File Description
useDataCatalog.tsx Updates hook to return structured table metadata and granular loading states
useDataCatalog.test.tsx Updates tests to work with new structured loading states
FormInput.tsx New reusable form input component supporting multiple field types
FormInput.test.tsx Comprehensive tests for the new FormInput component
DestinationSettings.tsx Integrates table validation and uses new FormInput component
DestinationSettings.test.tsx Updates tests for new validation behavior and component structure
DestinationSettings.scss Updates styles for new form layout structure

Copy link

UI Code Coverage Report

Lines Statements Branches Functions
Coverage: 33%
39.47% (30840/78133) 31.21% (14367/46033) 24.82% (2227/8972)

Copy link

github-actions bot commented Jul 19, 2025

Coverage

Backend Code Coverage Report •
FileStmtsMissCoverMissing
TOTAL546922741449% 
report-only-changed-files is enabled. No files were changed during this commit :)

@ramprasadagarwal ramprasadagarwal changed the base branch from master to feat/form-input July 22, 2025 10:56
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant