EnxDev opened a new pull request, #36880:
URL: https://github.com/apache/superset/pull/36880

   
   <!---
   Please write the PR title following the conventions at 
https://www.conventionalcommits.org/en/v1.0.0/
   Example:
   fix(dashboard): load charts correctly
   -->
   
   ### SUMMARY
   <!--- Describe the change below, including rationale and design decisions -->
   **Problem**
   When users fill out the database connection form, they experience two UX 
issues:
   
   1. No visual feedback during validation - When a user leaves a form field 
(onBlur), the system validates the input in the background, but there's no 
loading indicator to show that validation is in progress. This leaves users 
uncertain whether the system is processing their input or if something is wrong.
   2. Duplicate database name errors appear too late - Users only discover that 
a database name is already taken after clicking the "Connect" button and the 
form submission fails. This forces them to go back, change the name, and try 
again, creating a frustrating experience.
   
   **Solution**
   This PR addresses both issues:
   
   1. Added validation loading spinner to form fields - The `isValidating` prop 
is now passed to `TableCatalog`, `ValidatedInputField`, and `CommonParameters` 
components. 
   Additionally, fixed the `LabeledErrorBoundInput` component where hasFeedback 
was only set when there was an error. Changed it, so the Ant Design FormItem 
displays the loading spinner during validation, not just the error icon when 
validation fails.
   2. Added duplicate name validation to validate_parameters API - Extended the 
`ValidateDatabaseParametersCommand.validate()` method to check for duplicate 
database names using `DatabaseDAO.validate_uniqueness()` (for new databases) or 
`DatabaseDAO.validate_update_uniqueness()` (for existing databases). 
   This provides real-time feedback as users type, preventing wasted time on 
form submissions that will fail.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   <!--- Skip this if not applicable -->
   
   ### TESTING INSTRUCTIONS
   - Before
   
   
https://github.com/user-attachments/assets/24570355-c305-4153-bf6f-7f8c45728b8d
   
   
   - After
   
   
https://github.com/user-attachments/assets/b76802ac-994f-40b3-84c3-6172185af17e
   
   
   <!--- Required! What steps can be taken to manually verify the changes? -->
   - All tests should pass
   - See the videos above for testing instructions
   
   ### ADDITIONAL INFORMATION
   <!--- Check any relevant boxes with "x" -->
   <!--- HINT: Include "Fixes #nnn" if you are fixing an existing issue -->
   - [ ] Has associated issue:
   - [ ] Required feature flags:
   - [ ] Changes UI
   - [ ] Includes DB Migration (follow approval process in 
[SIP-59](https://github.com/apache/superset/issues/13351))
     - [ ] Migration is atomic, supports rollback & is backwards-compatible
     - [ ] Confirm DB migration upgrade and downgrade tested
     - [ ] Runtime estimates and downtime expectations provided
   - [ ] Introduces new feature or API
   - [ ] Removes existing feature or API
   es new feature or API
   - [ ] Removes existing feature or API
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to