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

chore: convert chartReducer to TypeScript #13374

Merged
merged 2 commits into from
Mar 2, 2021
Merged

Conversation

ktmud
Copy link
Member

@ktmud ktmud commented Feb 28, 2021

SUMMARY

Follow up of #13221 , converting chartReducer to TypeScript.

Other related components waiting to be converted:

  • chartAction
  • ChartRenderer
  • exploreReducer

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

N/A

TEST PLAN

CI should pass, all Explore page functionalities should work as before

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

@@ -134,7 +143,7 @@ export default function chartReducer(charts = {}, action) {
}
const annotationQuery = {
...state.annotationQuery,
[action.annotation.name]: action.queryRequest,
[action.annotation.name]: action.queryController,
Copy link
Member Author

Choose a reason for hiding this comment

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

Bycatch by TypeScript: it seems the ANNOTATION_QUERY_STARTED is supposed to cancel previous annotation queries, but it used the wrong action prop. The source of the action is here:

return { type: ANNOTATION_QUERY_STARTED, annotation, queryController, key };

@ktmud ktmud requested a review from etr2460 February 28, 2021 18:50
@codecov
Copy link

codecov bot commented Feb 28, 2021

Codecov Report

Merging #13374 (fd92652) into master (08183df) will increase coverage by 4.89%.
The diff coverage is 68.96%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13374      +/-   ##
==========================================
+ Coverage   72.13%   77.02%   +4.89%     
==========================================
  Files         898      898              
  Lines       45681    45725      +44     
  Branches     5495     5423      -72     
==========================================
+ Hits        32952    35221    +2269     
+ Misses      12517    10375    -2142     
+ Partials      212      129      -83     
Flag Coverage Δ
cypress 57.09% <100.00%> (?)
hive 79.97% <ø> (?)
javascript 62.75% <48.27%> (+0.17%) ⬆️
mysql 80.30% <ø> (ø)
postgres 80.34% <ø> (ø)
presto 80.00% <ø> (?)
python 80.84% <ø> (+0.41%) ⬆️
sqlite 79.96% <ø> (ø)

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

Impacted Files Coverage Δ
...rset-frontend/src/components/ButtonGroup/index.tsx 100.00% <ø> (ø)
...et-frontend/src/components/ErrorBoundary/index.jsx 95.45% <ø> (ø)
...-frontend/src/components/Select/Select.stories.tsx 0.00% <0.00%> (ø)
superset-frontend/src/components/Select/Select.tsx 90.81% <ø> (ø)
superset-frontend/src/components/Select/styles.tsx 86.30% <ø> (+24.65%) ⬆️
...et-frontend/src/components/Timer/Timer.stories.tsx 0.00% <0.00%> (ø)
superset-frontend/src/components/Timer/index.tsx 95.83% <ø> (ø)
superset-frontend/src/chart/Chart.jsx 64.81% <100.00%> (+17.64%) ⬆️
superset-frontend/src/chart/chartReducer.ts 64.38% <100.00%> (ø)
superset-frontend/src/components/Select/index.ts 100.00% <100.00%> (ø)
... and 221 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 391d909...fd92652. Read the comment docs.

@ktmud ktmud requested a review from zhaoyongjie March 1, 2021 06:56
@ktmud ktmud closed this Mar 1, 2021
@ktmud ktmud reopened this Mar 1, 2021
@ktmud ktmud force-pushed the ts-chart-reducer branch from 167af5c to 2dc906b Compare March 1, 2021 19:41
@ktmud ktmud closed this Mar 1, 2021
@ktmud ktmud reopened this Mar 1, 2021
@ktmud ktmud force-pushed the ts-chart-reducer branch from 2dc906b to fd92652 Compare March 1, 2021 23:48
@junlincc junlincc added the explore:refactor Related to refactoring Explore label Mar 2, 2021
Copy link
Member

@etr2460 etr2460 left a comment

Choose a reason for hiding this comment

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

lgtm

@ktmud ktmud merged commit f261629 into apache:master Mar 2, 2021
@ktmud ktmud deleted the ts-chart-reducer branch March 2, 2021 23:58
allanco91 pushed a commit to allanco91/superset that referenced this pull request May 21, 2021
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.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 explore:refactor Related to refactoring Explore size/L 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants