fix(dashboard): preserve certification fields when Certification panel is closed - #42957
fix(dashboard): preserve certification fields when Certification panel is closed#42957chkang83 wants to merge 2 commits into
Conversation
…l is closed Accordion Collapse leaves certification FormItems unregistered until opened; getFieldsValue(true) reads store values so save no longer clears certified_by.
Code Review Agent Run #dfd89bActionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #42957 +/- ##
=======================================
Coverage 66.41% 66.41%
=======================================
Files 2858 2858
Lines 161446 161446
Branches 37190 37190
=======================================
Hits 107222 107222
Misses 52187 52187
Partials 2037 2037
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… test Assert the request body is a string before JSON.parse so TypeScript type-checking passes in CI.
Code Review Agent Run #471f62Actionable Suggestions - 0Review Details
Bito Usage GuideCommands Type the following command in the pull request comment and save the comment.
Refer to the documentation for additional commands. Configuration This repository uses Documentation & Help |
There was a problem hiding this comment.
Pull request overview
This PR fixes a regression in the dashboard Properties modal where saving without expanding the Certification accordion panel would unintentionally clear certified_by / certification_details, due to Ant Design Form only returning currently-registered (mounted) fields.
Changes:
- Update the Properties modal submit handler to use
form.getFieldsValue(true)so unmounted accordion fields retain their previously loaded values. - Add a regression test that saves without opening the Certification section and asserts certification fields are preserved in both
onSubmitprops and the PUT payload.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| superset-frontend/src/dashboard/components/PropertiesModal/index.tsx | Reads form values using getFieldsValue(true) during save so unmounted Certification fields aren’t dropped from the payload. |
| superset-frontend/src/dashboard/components/PropertiesModal/PropertiesModal.test.tsx | Adds a regression test covering the “save without opening Certification” scenario and verifies certification fields are preserved. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
SUMMARY
Saving Dashboard Properties while the Certification accordion panel was never opened cleared
certified_by/certification_details.The Properties modal uses an accordion
Collapse, so CertificationFormItems are unregistered until that panel mounts.form.getFieldsValue()only returns registered fields, so those values becameundefinedand the PUT payload wrotenull.onFinishnow callsform.getFieldsValue(true)to read store values for unregistered fields (already set viasetFieldsValueon load). Added a regression test that saves without opening Certification and asserts the certification fields are preserved.BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
2026-08-10.14.20.56.mp4
2026-08-10.14.24.11.mp4
TESTING INSTRUCTIONS
Automated:
ADDITIONAL INFORMATION