apache / superset

Apache Superset is a Data Visualization and Data Exploration Platform
https://superset.apache.org/
Apache License 2.0
62.64k stars 13.83k forks source link

[TRACKER] Migrate JavaScript files to TypeScript #10004

Closed etr2460 closed 2 years ago

etr2460 commented 4 years ago

This issue tracks Superset's migration from JavaScript to TypeScript (as started in SIP-36). If you'd like to help with the migration, feel free to take an unchecked directory and convert the files within the immediate directory from JavaScript/JSX to TypeScript/TSX. #9162 and #9180 provide some tips for performing the migration. Once completed and PR'ed out, feel free to tag myself (@etr2460) or anyone else in the file's git-blame for review.

We really appreciate any work done here, and are happy to help resolve any issues you may come across!

To update the tracker, go to the superset-frontend directory, run node ../scripts/generate_frontend_ts_tasklist.js, and copy and paste the output below

Tracker

issue-label-bot[bot] commented 4 years ago

Issue-Label Bot is automatically applying the label #enhancement to this issue, with a confidence of 0.87. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

tanmaylaud commented 4 years ago

@etr2460 I noticed issues in src/components/ListView/Filters.tsx (introduced by tsx migration) in PaginatedSelectComponent. Can you please confirm if it requires a fix?

tanmaylaud commented 4 years ago

@etr2460 I propose adding one more requirement here: Changing the class components to functional components and using react hooks.

etr2460 commented 4 years ago

I noticed issues in src/components/ListView/Filters.tsx (introduced by tsx migration) in PaginatedSelectComponent.

@nytai is this related to the issues you were seeing? If so, were you still planning on addressing it?

I propose adding one more requirement here: Changing the class components to functional components and using react hooks.

In general, I agree. However we have some class components that are extremely complex and difficult to migrate to functional components. Additionally, some of our class components might simply be better off remaining as classes because of their complexity. I'd like to scope this to only requiring TypeScript migration, but with the option of also moving towards functional components with hooks. At the very least, migrating to TypeScript will make it safer and easier to go from class based to functional react components in the future, and we can do that in future work

tanmaylaud commented 4 years ago

I noticed issues in src/components/ListView/Filters.tsx (introduced by tsx migration) in PaginatedSelectComponent.

@nytai is this related to the issues you were seeing? If so, were you still planning on addressing it?

I propose adding one more requirement here: Changing the class components to functional components and using react hooks.

In general, I agree. However we have some class components that are extremely complex and difficult to migrate to functional components. Additionally, some of our class components might simply be better off remaining as classes because of their complexity. I'd like to scope this to only requiring TypeScript migration, but with the option of also moving towards functional components with hooks. At the very least, migrating to TypeScript will make it safer and easier to go from class based to functional react components in the future, and we can do that in future work

@etr2460 Agreed! Let's encourage people to go for functional components with hooks. Beginners will also get to learn something new in the process 👍

bera5186 commented 3 years ago

@etr2460 I would also like to work on this issue !! Can you guide me on where to start !!!

etr2460 commented 3 years ago

Hi @bera5186! Sorry I didn't see this earlier. If you're still interested in helping out, all you need to do is find a file in the superset-frontend repo that's still in javascript and convert it to typescript. Some of the PRs linked in the issue description might help you get started

john-bodley commented 2 years ago
lyndsiWilliams commented 2 years ago

Hello! These files are currently in progress of conversion, with links to the PRs. I will update when they are complete: