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

fix(explore): pie chart label bugs #13052

Merged
merged 1 commit into from
Feb 11, 2021

Conversation

villebro
Copy link
Member

@villebro villebro commented Feb 10, 2021

SUMMARY

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

Bump superset-ui packages to version 0.17.8 and fix a the following Pie Chart bugs:

  • Label sometimes disappears on hover. This was fixed by bumping ECharts to the 5.0.2 version.
  • Custom label type changing doesn't work. This was caused by the custom label prop to be called label_type in the plugin but pie_label_type in the control panel. To fix this, the generic name was chosen (will make it easier to reuse the control value later when switching between chart types) and all references to pie_label_type in exising chart metadata was renamed to label_type.

Also updates some unrelated code that depends on changes to superset-ui/core that relate to native filter metadata.

TEST PLAN

Verify that both up and down migration works, and that pie chart works properly.

ADDITIONAL INFORMATION

@villebro villebro force-pushed the villebro/bump-superset-ui-0.17.8 branch from e8c0680 to a838414 Compare February 10, 2021 11:01
@pull-request-size pull-request-size bot added size/L and removed size/M labels Feb 10, 2021
@villebro villebro force-pushed the villebro/bump-superset-ui-0.17.8 branch from a838414 to 673aa73 Compare February 10, 2021 11:07
@villebro villebro added the risk:db-migration PRs that require a DB migration label Feb 10, 2021
@junlincc junlincc self-requested a review February 10, 2021 13:28
.map(type => ({
key: type,
value: registry.get(type),
}))
.concat(
registry
.entries()
.filter(entry => !entry.value.isNativeFilter)
.filter(entry => {
Copy link
Contributor

@simcha90 simcha90 Feb 10, 2021

Choose a reason for hiding this comment

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

may be move it to some utils like

const getVisibleCharts = ({ behaviours } = {}) => behaviors?.includes(Behavior.CROSS_FILTER) || !behaviors?.length;

and use it like:

.filter(type =>getVisibleCharts(registry.get(type)))
and
.filter(entry =>getVisibleCharts(entry.value))

@villebro villebro force-pushed the villebro/bump-superset-ui-0.17.8 branch from 84f51b8 to d7aae26 Compare February 10, 2021 14:45
@codecov-io
Copy link

Codecov Report

Merging #13052 (4fbb2a7) into master (2ce7982) will increase coverage by 8.79%.
The diff coverage is 33.33%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master   #13052      +/-   ##
==========================================
+ Coverage   53.06%   61.85%   +8.79%     
==========================================
  Files         489      546      +57     
  Lines       17314    20157    +2843     
  Branches     4482     5272     +790     
==========================================
+ Hits         9187    12469    +3282     
+ Misses       8127     7475     -652     
- Partials        0      213     +213     
Flag Coverage Δ
cypress ?
javascript 61.85% <33.33%> (?)

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

Impacted Files Coverage Δ
...ontend/src/components/ListViewCard/ImageLoader.tsx 86.36% <0.00%> (+11.36%) ⬆️
...d/src/filters/components/Range/AntdRangeFilter.tsx 0.00% <0.00%> (ø)
...set-frontend/src/filters/components/Range/index.ts 0.00% <0.00%> (-75.00%) ⬇️
...src/filters/components/Select/AntdSelectFilter.tsx 0.00% <ø> (-96.78%) ⬇️
...et-frontend/src/filters/components/Select/index.ts 0.00% <0.00%> (-100.00%) ⬇️
...perset-frontend/src/views/CRUD/chart/ChartList.tsx 71.65% <ø> (-2.66%) ⬇️
...rontend/src/views/CRUD/dashboard/DashboardCard.tsx 75.67% <ø> (-0.33%) ⬇️
...rontend/src/views/CRUD/dashboard/DashboardList.tsx 73.87% <0.00%> (+7.56%) ⬆️
...end/src/views/CRUD/data/database/DatabaseModal.tsx 55.97% <ø> (-13.00%) ⬇️
superset-frontend/src/views/CRUD/utils.tsx 61.36% <ø> (+29.31%) ⬆️
... and 468 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 3e0681b...4fbb2a7. Read the comment docs.

@villebro villebro merged commit 42c4fac into apache:master Feb 11, 2021
@villebro villebro deleted the villebro/bump-superset-ui-0.17.8 branch February 11, 2021 09:23
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Feb 14, 2021
amitmiran137 pushed a commit to nielsen-oss/superset that referenced this pull request Feb 14, 2021
* master: (30 commits)
  refactor(native-filters): decouple params from filter config modal (first phase) (apache#13021)
  fix(native-filters): set currentValue null when empty (apache#13000)
  Custom superset_config.py + secret envs (apache#13096)
  Update http error code from 400 to 403 (apache#13061)
  feat(native-filters): add storybook entry for select filter (apache#13005)
  feat(native-filters): Time native filter (apache#12992)
  Force pod restart on config changes (apache#13056)
  feat(cross-filters): add cross filters (apache#12662)
  fix(explore): Enable selecting an option not included in suggestions (apache#13029)
  Improves RTL configuration (apache#13079)
  Added a note about the ! prefix for breaking changes to CONTRIBUTING.md (apache#13083)
  chore: lock down npm to v6 (apache#13069)
  fix: API tests, make them possible to run independently again (apache#13076)
  fix: add config to disable dataset ownership on the old api (apache#13051)
  add required * indicator to message content/notif method (apache#12931)
  fix: Retroactively add granularity param to charts (apache#12960)
  fix(ci): multiline regex in change detection (apache#13075)
  feat(style): hide dashboard header by url parameter (apache#12918)
  fix(explore): pie chart label bugs (apache#13052)
  fix: Disabled state button transition time (apache#13008)
  ...
@mistercrunch mistercrunch added 🏷️ bot A label used by `supersetbot` to keep track of which PR where auto-tagged with release labels 🚢 1.2.0 labels Mar 12, 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 preset-io risk:db-migration PRs that require a DB migration size/L viz:charts:pie Related to the Pie chart 🚢 1.2.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[chart]Label type selection not working on Pie chart
7 participants