Skip to content

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

Merged
kristw merged 1 commit into
apache:masterfrom
etr2460:erik-ritter--setupapp-js-to-ts
Feb 24, 2020
Merged

kristw merged 1 commit into
apache:masterfrom
etr2460:erik-ritter--setupapp-js-to-ts

Conversation

@etr2460

@etr2460 etr2460 commented Feb 20, 2020

Copy link
Copy Markdown
Member

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
Copy Markdown

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
Copy Markdown

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

etr2460 commented Feb 20, 2020

Copy link
Copy Markdown
Member Author

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
Copy Markdown

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

@nytai

nytai commented Feb 20, 2020

Copy link
Copy Markdown
Member

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.

@nytai nytai left a comment

Copy link
Copy Markdown
Member

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

etr2460 commented Feb 21, 2020

Copy link
Copy Markdown
Member Author

++ 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 First shipped in 0.36.0 labels Feb 28, 2024
qfcwell pushed a commit to qfcwell/superset that referenced this pull request May 12, 2026
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 First shipped in 0.36.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants