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

[SIP-36] Migrate setupApp.js to setupApp.ts #9180

Merged
merged 1 commit into from
Feb 24, 2020

Conversation

etr2460
Copy link
Member

@etr2460 etr2460 commented Feb 20, 2020

CATEGORY

Choose one

  • Bug Fix
  • Enhancement (new features, refinement)
  • Refactor
  • Add tests
  • Build / Development Environment
  • Documentation

SUMMARY

This is an example PR for migrating a JS file to TS. I performed the following steps:

  1. Rename the file from setupApp.js => setupApp.ts
  2. Install typedefs for imported libraries (ex npm install @types/jquery or add // @ts-ignore if no valid typedefs exist
  3. Type function arguments to their expected values
  4. Address all eslint warnings and errors

TEST PLAN

CI, confirm that previous behavior is still correct. In this case, check changing locales still works and that checkboxes work in CRUD Views

ADDITIONAL INFORMATION

REVIEWERS

to: @nytai @graceguo-supercat @kristw @rusackas

@codecov-io
Copy link

Codecov Report

Merging #9180 into master will decrease coverage by 0.02%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #9180      +/-   ##
=========================================
- Coverage   59.13%   59.1%   -0.03%     
=========================================
  Files         372     372              
  Lines       11938   11943       +5     
  Branches     2925    2925              
=========================================
  Hits         7059    7059              
- Misses       4699    4706       +7     
+ Partials      180     178       -2
Impacted Files Coverage Δ
superset-frontend/src/setup/setupApp.ts 0% <0%> (ø)

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 74423e5...07d6b7e. Read the comment docs.

@graceguo-supercat
Copy link

Since you are making migration to ts, could you add unit test for every new component? The overall test coverage seems keep going down.

@etr2460
Copy link
Member Author

etr2460 commented Feb 20, 2020

That's a good point, any thoughts about how to test this file? The dependence on jquery makes me a bit uncertain about how to test....

@etr2460 etr2460 force-pushed the erik-ritter--setupapp-js-to-ts branch from 07d6b7e to 1dfacb7 Compare February 20, 2020 20:25
@graceguo-supercat
Copy link

i want to remove jQuery usage from superset-frontend... is it possible? https://www.sitepoint.com/jquery-document-ready-plain-javascript/

@nytai
Copy link
Member

nytai commented Feb 20, 2020

I reimplemented the menu in react, so it's possible to fully deprecate jquery. The react menu hasn't been propagated to all the pages, yet. I was hoping to progressively roll it out by replacing all the server rendered pages, however if someone wants to speed up jquery deprecation that's available.

Copy link
Member

@nytai nytai left a comment

Choose a reason for hiding this comment

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

lgtm, +1 on jquery deprecation

@etr2460
Copy link
Member Author

etr2460 commented Feb 21, 2020

++ on jquery removal as well. I don't think that's in scope for this PR though...

@kristw kristw merged commit eeec63c into apache:master Feb 24, 2020
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 0.36.0 labels Feb 28, 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/S 🚢 0.36.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants