superset icon indicating copy to clipboard operation
superset copied to clipboard

chore: Remove actions prop and refactor code in SQL Lab

Open EugeneTorap opened this issue 3 years ago • 1 comments

SUMMARY

Refactor all actions in sqlLab in order to use useDispatch() hook instead of actions prop in every child components. Also fix type for Query

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • [ ] Has associated issue:
  • [ ] Required feature flags:
  • [ ] Changes UI
  • [ ] Includes DB Migration (follow approval process in SIP-59)
    • [ ] 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

EugeneTorap avatar Nov 26 '22 16:11 EugeneTorap

Codecov Report

Merging #22231 (5d5d39d) into master (a8bc53d) will decrease coverage by 0.00%. The diff coverage is 61.53%.

@@            Coverage Diff             @@
##           master   #22231      +/-   ##
==========================================
- Coverage   66.86%   66.85%   -0.01%     
==========================================
  Files        1840     1840              
  Lines       70161    70193      +32     
  Branches     7657     7662       +5     
==========================================
+ Hits        46910    46925      +15     
- Misses      21281    21294      +13     
- Partials     1970     1974       +4     
Flag Coverage Δ
javascript 53.68% <61.53%> (-0.01%) :arrow_down:

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

Impacted Files Coverage Δ
...packages/superset-ui-core/src/query/types/Query.ts 100.00% <ø> (ø)
...ntend/src/SqlLab/components/QueryHistory/index.tsx 66.66% <ø> (ø)
...frontend/src/SqlLab/components/SqlEditor/index.jsx 55.91% <ø> (ø)
...d/src/SqlLab/components/TabbedSqlEditors/index.jsx 49.03% <ø> (ø)
superset-frontend/src/SqlLab/types.ts 57.14% <ø> (ø)
...rontend/src/SqlLab/components/QueryTable/index.tsx 70.17% <16.66%> (ø)
...ontend/src/SqlLab/components/QuerySearch/index.tsx 73.75% <40.00%> (+0.67%) :arrow_up:
...frontend/src/SqlLab/components/SouthPane/index.tsx 79.54% <85.71%> (+6.81%) :arrow_up:
...qlLab/components/SaveDatasetActionButton/index.tsx 83.33% <100.00%> (+3.33%) :arrow_up:
...t-frontend/src/dashboard/util/getOverwriteItems.ts 90.90% <0.00%> (ø)
... and 9 more

:mega: We’re building smart automated test selection to slash your CI/CD build times. Learn more

codecov[bot] avatar Nov 27 '22 20:11 codecov[bot]

Pinged a couple committers for review, and might also ask for eyes from @codyml or @eric-briscoe if they have time.

rusackas avatar Nov 30 '22 18:11 rusackas

/testenv up

rusackas avatar Nov 30 '22 22:11 rusackas

@rusackas Ephemeral environment spinning up at http://54.213.134.150:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

github-actions[bot] avatar Nov 30 '22 22:11 github-actions[bot]

@michael-s-molina Can we merge it?

EugeneTorap avatar Dec 02 '22 16:12 EugeneTorap

Ephemeral environment shutdown and build artifacts deleted.

github-actions[bot] avatar Dec 05 '22 11:12 github-actions[bot]