-
Notifications
You must be signed in to change notification settings - Fork 272
fix(plugin-chart-word-cloud): make colors schemes work #788
fix(plugin-chart-word-cloud): make colors schemes work #788
Conversation
This pull request is being automatically deployed with Vercel (learn more). 🔍 Inspect: https://vercel.com/superset/superset-ui/dlsj0hyhe |
import configureEncodable from '../configureEncodable'; | ||
|
||
configureEncodable(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ktmud I wasn't sure where/how to call this "the right way", any pointers would be appreciated!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for catching and fixing this!
I feel it's probably better to add these in the plugin definition file (src/plugin/index.ts
). @kristw what do you think?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
umm, the regression is in incubator-superset
, right?
Better call this in the setup stage of incubator-superset
, not in the plugin.
Can add the configureEncodable()
call in setupPlugins.ts
before registering the charts.
I configured it here for the storybook and haven't done that to the incubator-superset
because we were still consolidating core packages at that time.
configureEncodable(); |
See current master preview with color.
https://superset-ui.now.sh/?path=/story/chart-plugins-plugin-chart-word-cloud--legacy-shim
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
or src/plugin/index.ts
as Jesse suggested, but then have to do that for the other ones that use encodable too otherwise they will depend on existence of word cloud.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should only be required temporarily so either solution is fine. I am about to refactor the core package to use same underlying resolvers with encodable so this configuration should eventually be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense 👍 Updated.
Side note: the non-legacy plugin is using |
Codecov Report
@@ Coverage Diff @@
## master #788 +/- ##
==========================================
+ Coverage 25.18% 25.23% +0.05%
==========================================
Files 353 353
Lines 7869 7869
Branches 1028 1028
==========================================
+ Hits 1982 1986 +4
+ Misses 5778 5774 -4
Partials 109 109
Continue to review full report at Codecov.
|
Boxplot seems to have the same problem. |
@ktmud boxplot also fixed, should be good to go. |
🐛 Bug Fix
Currently the selected color scheme isn't being respected. This is probably a regression from #768.
BEFORE
AFTER