Skip to content
This repository has been archived by the owner on Dec 10, 2021. It is now read-only.

Have a way of registering a "supported" list of viz types #103

Closed
xtinec opened this issue Feb 16, 2019 · 1 comment
Closed

Have a way of registering a "supported" list of viz types #103

xtinec opened this issue Feb 16, 2019 · 1 comment
Labels
#enhancement New feature or request

Comments

@xtinec
Copy link
Contributor

xtinec commented Feb 16, 2019

Is your feature request related to a problem? Please describe.
There is a need to include experimental viz types like apache/superset@43ed9a6
Currently, we hardcord the viz types we want to register in various preset files in superset.

Describe the solution you'd like
It seems we need a config value in superset called SUPPORTED_VIZ_TYPES, which contains an array of keys of supported viz types (e.g. 'table', 'word_cloud', ...) and different instances of superset can choose to include or exclude experimental viz types like kelper. Available values for SUPPORTED_VIZ_TYPES will be populated by superset-ui using keys of plugins that are found undersuperset-ui and superset-ui-legacy

Describe alternatives you've considered
We could define one-off feature flags for kepler in superset but it doesn't seem right as the viz plugin themselves would be located in superset-ui or superset-ui-legacy.

Additional context
None.

@kristw @williaster @mistercrunch

@xtinec xtinec added the #enhancement New feature or request label Feb 16, 2019
@kristw
Copy link
Contributor

kristw commented Feb 16, 2019

I propose another solution.

  • First of all, make kepler a plugin. This can be a standalone repo for single plugin npm package.
  • Every organization defines their own preset as separate npm packages: e.g. superset-preset-chart-airbnb, superset-preset-chart-lyft. These presets can live in organization-specific repositories or even personal ones such as superset-preset-chart-kristw. Then in lyft preset you can include kepler plugin.
  • Then in Superset, this is the part I haven't fully figured out yet, be able to point which preset to use. We can make script to add preset and make it npm install and update some config file that webpack reads from and substitute the default list of presets with the specified ones. The complex part is to ensure only uncustomized files are checked into the main repo and developer experience is not interrupted too much.

If this thing were to scale. The core Superset code should not know anything about vis types.

@kristw kristw closed this as completed Aug 25, 2019
kristw added a commit that referenced this issue Apr 17, 2020
* fix: line chart tooltip when there is only one lien

* fix: type

* fix: combine export default
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
#enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants