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

docs: Adds notes to Superset plugin generator about TypeScript errors #23501

Merged
merged 1 commit into from
Mar 28, 2023

Conversation

alex-bain
Copy link
Contributor

SUMMARY

When creating a new Superset plugin, the generator creates a tsconfig.json file. When trying to build Superset with this new plugin, the build fails due to TypeScript compilation errors.

This PR extends the README documentation of a generated plugin to call out some of the changes a user may want to make to fix these TypeScript errors. These suggested changes already exist in the echarts plugins, and served as inspiration for how to fix the TypeScript errors I encountered in my own plugin.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Screenshots of TypeScript errors after creating the plugin:

screenshot-1
screenshot-2
screenshot-3

TESTING INSTRUCTIONS

  • Use the generator to create a new Superset plugin in the superset-frontend/plugins/ directory alongside other plugins
  • Follow the final manual steps to add this plugin to MainPreset.js and package.json
  • Try to build Superset
  • Notice that there are TypeScript errors such as unresolvable modules (@superset-ui/core)
  • Notice that there are TypeScript errors such as unresolved Superset types
  • Make the new changes suggested in the plugin README file
  • Notice that the errors are resolved and the plugin will build successfully

@alex-bain alex-bain changed the title Adds notes to Superset plugin generator about TypeScript errors [docs] Adds notes to Superset plugin generator about TypeScript errors Mar 27, 2023
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

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

Congrats on making your first PR and thank you for contributing to Superset! 🎉 ❤️

We hope to see you in our Slack community too! Not signed up? Use our Slack App to self-register.

@codecov
Copy link

codecov bot commented Mar 27, 2023

Codecov Report

Merging #23501 (3e0ab67) into master (0fa4212) will not change coverage.
The diff coverage is n/a.

❗ Current head 3e0ab67 differs from pull request most recent head 87cab58. Consider uploading reports for the commit 87cab58 to get more accurate results

@@           Coverage Diff           @@
##           master   #23501   +/-   ##
=======================================
  Coverage   67.65%   67.65%           
=======================================
  Files        1909     1909           
  Lines       73743    73743           
  Branches     7987     7987           
=======================================
  Hits        49888    49888           
  Misses      21814    21814           
  Partials     2041     2041           
Flag Coverage Δ
javascript 53.84% <ø> (ø)

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

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

@alex-bain alex-bain changed the title [docs] Adds notes to Superset plugin generator about TypeScript errors docs: Adds notes to Superset plugin generator about TypeScript errors Mar 27, 2023
@nytai nytai merged commit a3ffc67 into apache:master Mar 28, 2023
@villebro
Copy link
Member

Thanks for these improvements @alex-bain !

@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 3.0.0 labels Mar 13, 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 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants