flcrom opened a new pull request, #44438:
URL: https://github.com/apache/superset/pull/44438
### SUMMARY
Migrates the version history feature from raw `react-redux` `useDispatch` to
the shared typed `useAppDispatch` hook introduced for the React Redux v8
migration.
This covers all six production consumers under `features/versionHistory`.
The existing hook test now mocks `src/views/store.useAppDispatch`, so its
dispatch assertions still exercise the same calls. There are no behavior,
selector, callback, or action-order changes.
Closes #39927 (version history slice).
### BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
Not applicable - no UI change.
### TESTING INSTRUCTIONS
Run:
```
npx jest src/features/versionHistory --runInBand --silent
npx oxlint --config oxlint.json \
src/features/versionHistory/ChartVersionPreview.tsx \
src/features/versionHistory/DashboardVersionHistory.tsx \
src/features/versionHistory/ExploreVersionHistory.tsx \
src/features/versionHistory/PreviewBanner.tsx \
src/features/versionHistory/useDashboardVersionPreview.ts \
src/features/versionHistory/useVersionActions.test.tsx \
src/features/versionHistory/useVersionActions.tsx
```
Observed locally:
- 18 test suites passed, 204 tests passed.
- Oxlint reported 0 errors and 3 existing `set-state-in-effect` warnings in
unchanged code.
- Full `npm run type` was attempted but did not finish within the runner
window. The focused React Redux v8 compatibility check for `useAppDispatch`
passed during review.
### ADDITIONAL INFORMATION
- [x] Has associated issue: #39927
- [ ] 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
--
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]