Skip to content

[SIP-36] Migrate Link.jsx to Link.tsx - #9162

Merged
etr2460 merged 1 commit into
apache:masterfrom
etr2460:erik-ritter--Link-jsx-to-tsx
Feb 19, 2020
Merged

etr2460 merged 1 commit into
apache:masterfrom
etr2460:erik-ritter--Link-jsx-to-tsx

Conversation

@etr2460

@etr2460 etr2460 commented Feb 18, 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 React component from JSX to TSX. I performed the following steps:

  1. Rename the component file from Link.jsx => Link.tsx
  2. Install typedefs for imported libraries (ex. npm install @types/react-bootstrap) or add // @ts-ignore if no valid typedefs exist
  3. Replace the propTypes const with an interface Props definition
  4. Move default props into the default arguments within the React component
  5. Resolve any type errors that may have been exposed by the migration
  6. Attach before/after screenshots to the PR to ensure the component functionality remains the same

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Before:
Screen Shot 2020-02-18 at 10 20 51 AM

After:
Screen Shot 2020-02-18 at 10 15 36 AM

TEST PLAN

CI and unit tests, confirm the Link component in SQL Lab renders as expected

ADDITIONAL INFORMATION

REVIEWERS

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

@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!

Looks like tslint is causing travis to fail, ++ for deprecating it in favor of eslint

@nytai

nytai commented Feb 18, 2020

Copy link
Copy Markdown
Member

also, I've noticed that tslint doesn't seem to run as part of lint-fix

./node_modules/.bin/tslint -c ./tslint.json --fix ./{src,spec}/**/*.ts{,x}

is how I've been getting around it.

@etr2460

etr2460 commented Feb 18, 2020

Copy link
Copy Markdown
Member Author

@nytai is deprecating tslint in favor of eslint something you can take on? I think we're all pretty much in agreement that it's the right move

@etr2460
etr2460 force-pushed the erik-ritter--Link-jsx-to-tsx branch from f4f6e03 to f3eaa5c Compare February 18, 2020 20:10
@nytai

nytai commented Feb 18, 2020

Copy link
Copy Markdown
Member

@etr2460 sure, I'll give it a try tomorrow

@etr2460
etr2460 force-pushed the erik-ritter--Link-jsx-to-tsx branch from f3eaa5c to 26ec03e Compare February 18, 2020 22:57
@etr2460
etr2460 merged commit e5e6b53 into apache:master Feb 19, 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/L 🚢 0.36.0 First shipped in 0.36.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants