mikebridge opened a new pull request, #45830: URL: https://github.com/apache/superset/pull/45830
### SUMMARY **TL;DR:** Show Preview in every historical save header that has a saved version. **Background:** Version history lets users preview earlier chart and dashboard states, either from a header button or by expanding a save and selecting a change. **Problem:** The header button was restricted to starting-version groups without change records. Normal saves and first-tracked saves with records therefore looked as though they could not be previewed. **What this changes:** Reuse the existing Preview button and handler for every non-current group with a version. Current and versionless groups remain unchanged, as do expanded change-row clicks and restore actions. The shared component provides the same behavior in dashboard and Explore chart history. ### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF Before: normal and first-tracked saves with records have no header Preview button. After: those historical saves expose the same button as the starting version. No browser screenshots captured in this local pass. ### TESTING INSTRUCTIONS 1. Enable `VERSION_HISTORY` and open history for a dashboard with several saves. 2. Confirm normal, first-tracked and created historical rows with saved versions show Preview without expanding. 3. Click Preview and confirm the selected version opens without toggling the change list. Confirm expanded change-row clicks still work. 4. Confirm the current version and rows without snapshots have no Preview button. Repeat for Explore chart history. Automated regression: `npm exec -- jest src/features/versionHistory --runInBand --silent` from `superset-frontend`. ### ADDITIONAL INFORMATION - [ ] Has associated issue: - [x] Required feature flags: `VERSION_HISTORY` - [x] Changes UI - [ ] Includes DB Migration - [ ] 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]
