richardfogaca opened a new pull request, #36045:
URL: https://github.com/apache/superset/pull/36045
### SUMMARY
Fixes validation error icon appearing in Dashboard Properties modal when
opened from dashboard list.
**Problem**: When opening the Dashboard Properties modal by clicking
"Edit" from the dashboard list, a validation error icon would appear next to
"General information" even though the required "Name" field was populated. The
error would persist until the user modified and restored the name field.
**Root Cause**: The modal has two entry points with different
initialization patterns:
1. **Dashboard List**: Passes only `dashboardId`, modal fetches data
asynchronously
2. **Dashboard Edit Mode**: Passes pre-loaded `dashboardInfo` and
`dashboardTitle`
The validation `useEffect` hooks were running immediately when the modal
opened, before the data fetch completed in the first scenario. This caused
validation to run against empty form fields, triggering false validation errors.
**Solution**: Added `isLoading` checks to validation `useEffect` hooks to
prevent validation from running until dashboard data has been fully loaded.
This ensures validation only runs against populated form fields, eliminating
false positives.
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
**Before**: Opening modal from dashboard list shows validation error icon
next to "General information" despite name field being filled.
<img width="606" height="791" alt="92750"
src="https://github.com/user-attachments/assets/2350af04-b8b2-4016-b906-ff2cb8e4bd6c"
/>
**After**: No validation error appears when opening from dashboard list
with properly filled fields.
<img width="573" height="241" alt="Screenshot 2025-11-07 at 19 54 06"
src="https://github.com/user-attachments/assets/f9053b64-b833-46d4-8fa9-bdbe92a260c6"
/>
### TESTING INSTRUCTIONS
1. Navigate to the Dashboard List page
2. Click the "Edit" icon on any dashboard row
3. Verify the Dashboard Properties modal opens without a validation error
icon next to "General information"
4. Verify the dashboard name is populated in the form
5. Also test opening the modal from dashboard edit mode (click "Edit
dashboard" → "Edit properties" from menu)
6. Verify both entry points work correctly without false validation errors
### ADDITIONAL INFORMATION
- [ ] Has associated issue:
- [ ] Required feature flags:
- [x] 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
--
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]