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

   Restoring a dashboard version warns how many charts will be removed from 
that dashboard, without deleting the charts themselves.
   
   ### SUMMARY
   
   The confirmation dialog reads a removal count through the existing version 
snapshot endpoint. It compares current chart associations with membership at 
the selected version, including archived and unplaced charts, without returning 
chart names or IDs. The existing object-editorship checks still apply, and the 
restore operation is unchanged.
   
   Confirmation waits for the count. If the check fails or takes longer than 
ten seconds, the dialog shows an explicit warning that removal could not be 
checked and allows the existing restore action. The count is advisory if 
membership changes before confirmation.
   
   ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
   
   Before: the confirmation dialog gave no indication that charts would be 
removed.
   After: it shows the number of charts that will be removed, or an explicit 
warning if that number cannot be checked. No removal warning appears when the 
count is zero. Screenshots have not been captured.
   
   ### TESTING INSTRUCTIONS
   
   1. Save a dashboard version, then add two charts and save again.
   2. Restore the earlier version. Confirm that the dialog warns that two 
charts will be removed from the dashboard and that the charts themselves will 
not be deleted.
   3. Cancel, change membership, and reopen the same restore dialog. Confirm 
that it checks the count again.
   4. Restore a version whose membership includes all current charts. Confirm 
that no removal warning appears.
   5. Fail the snapshot request and confirm that the unknown-count warning 
appears and restoration remains available.
   
   Automated checks: 263 version-history Jest tests; 75 focused backend tests; 
changed-file pre-commit including frontend type checking, MyPy, Ruff and 
Pylint; translation drift check; repeatable OpenAPI generation. New warning 
tests failed before implementation. No service-backed or browser suite was run.
   
   ### ADDITIONAL INFORMATION
   
   - [ ] Has associated issue:
   - [x] Required feature flags: existing `VERSION_HISTORY` and 
`ENABLE_VERSIONING_CAPTURE`
   - [x] Changes UI
   - [ ] Includes DB Migration
   - [x] Introduces new feature or API: optional restore-impact field on the 
existing dashboard snapshot endpoint
   - [ ] 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