Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: Upgrade Redux #11967

Merged
merged 4 commits into from
Dec 9, 2020
Merged

refactor: Upgrade Redux #11967

merged 4 commits into from
Dec 9, 2020

Conversation

suddjian
Copy link
Member

@suddjian suddjian commented Dec 9, 2020

SUMMARY

At @graceguo-supercat's suggestion, I've extracted the Redux upgrade done by @pkdotson and myself in #11814. This gets us ✨ hooks ✨ for redux state!

Many tests had to be changed because Enzyme can't propagate context correctly through shallow-rendered components. Side note: can't wait to start using react-testing-library.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TEST PLAN

ADDITIONAL INFORMATION

  • Has associated issue:
  • Changes UI
  • Requires DB Migration.
  • Confirm DB Migration upgrade and downgrade tested.
  • Introduces new feature or API
  • Removes existing feature or API

@codecov-io
Copy link

codecov-io commented Dec 9, 2020

Codecov Report

Merging #11967 (9f4b119) into master (7e6f04f) will increase coverage by 0.05%.
The diff coverage is 66.66%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #11967      +/-   ##
==========================================
+ Coverage   63.75%   63.81%   +0.05%     
==========================================
  Files         941      941              
  Lines       45654    45860     +206     
  Branches     4389     4459      +70     
==========================================
+ Hits        29106    29264     +158     
- Misses      16371    16418      +47     
- Partials      177      178       +1     
Flag Coverage Δ
javascript 63.05% <66.66%> (+0.14%) ⬆️
python 64.27% <ø> (+0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
...et-frontend/src/dashboard/components/Dashboard.jsx 78.82% <ø> (ø)
...set-frontend/src/explore/actions/exploreActions.ts 35.93% <0.00%> (ø)
...frontend/src/dashboard/containers/FiltersBadge.tsx 100.00% <100.00%> (ø)
superset-frontend/src/logger/actions/index.ts 100.00% <100.00%> (ø)
...nd/src/dashboard/components/FiltersBadge/index.tsx 90.47% <0.00%> (-4.77%) ⬇️
...erset-frontend/src/SqlLab/components/ResultSet.tsx 71.76% <0.00%> (-4.53%) ⬇️
...src/dashboard/components/FiltersBadge/selectors.ts 84.00% <0.00%> (-2.00%) ⬇️
superset/datasets/schemas.py 96.66% <0.00%> (+0.27%) ⬆️
...rontend/src/SqlLab/components/SaveDatasetModal.tsx 74.28% <0.00%> (+2.28%) ⬆️
...end/src/SqlLab/components/ExploreResultsButton.jsx 93.75% <0.00%> (+10.65%) ⬆️
... and 1 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 7e6f04f...9f4b119. Read the comment docs.

@@ -86,7 +86,7 @@ export function fetchFaveStar(sliceId: string) {

export const SAVE_FAVE_STAR = 'SAVE_FAVE_STAR';
export function saveFaveStar(sliceId: string, isStarred: boolean) {
return function (dispatch: Dispatch<ReturnType<typeof addDangerToast>>) {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The latest version of Redux has a better-typed dispatch function, so the extra typing here doesn't compile anymore, for good reason.

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

@ktmud ktmud left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good move!

Copy link

@graceguo-supercat graceguo-supercat left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thanks for making this!

@suddjian suddjian merged commit 6270fa2 into master Dec 9, 2020
@suddjian suddjian deleted the redux-upgrade branch December 9, 2020 19:59
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.0.0 labels Mar 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels size/L 🚢 1.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants