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

feat: Implement context menu for drill by #23454

Merged
merged 11 commits into from
Mar 29, 2023

Conversation

kgabryje
Copy link
Member

@kgabryje kgabryje commented Mar 22, 2023

SUMMARY

Charts that support drill by: all Echarts, World Map, Table, Pivot Table.

This PR implements right-click context menu with drill by option for charts that support the feature. When user right-click on series, the chart plugin constructs a filter object (similar to drill to detail filter), which in the result chart will be appended to original chart's adhoc filters. Then, user can select a column from drill by submenu that later will be used as a dimension of the result chart.
The columns are fetched when user opens the context menu. The result is cached, so that the request is not repeated for charts that use the same dataset. Only columns that are marked as dimensions in the dataset and are not used as dimensions of current chart can be selected.
If there are more than 10 available columns, a search input in the submenu is displayed.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

image

TESTING INSTRUCTIONS

ADDITIONAL INFORMATION

  • Has associated issue:
  • Required feature flags:
  • Changes UI
  • Includes DB Migration (follow approval process in SIP-59)
    • Migration is atomic, supports rollback & is backwards-compatible
    • Confirm DB migration upgrade and downgrade tested
    • Runtime estimates and downtime expectations provided
  • Introduces new feature or API
  • Removes existing feature or API

@kgabryje kgabryje requested a review from lilykuang March 22, 2023 11:59
@kgabryje kgabryje marked this pull request as draft March 22, 2023 11:59
@codecov
Copy link

codecov bot commented Mar 22, 2023

Codecov Report

Merging #23454 (a80bbd2) into master (a3ffc67) will decrease coverage by 0.01%.
The diff coverage is 54.76%.

❗ Current head a80bbd2 differs from pull request most recent head 22a585f. Consider uploading reports for the commit 22a585f to get more accurate results

@@            Coverage Diff             @@
##           master   #23454      +/-   ##
==========================================
- Coverage   67.65%   67.64%   -0.01%     
==========================================
  Files        1910     1913       +3     
  Lines       73746    73838      +92     
  Branches     7987     8021      +34     
==========================================
+ Hits        49891    49951      +60     
- Misses      21814    21845      +31     
- Partials     2041     2042       +1     
Flag Coverage Δ
javascript 53.87% <54.76%> (+0.02%) ⬆️

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

Impacted Files Coverage Δ
.../packages/superset-ui-core/src/chart/types/Base.ts 100.00% <ø> (ø)
...gins/legacy-plugin-chart-world-map/src/WorldMap.js 0.00% <0.00%> (ø)
...plugins/legacy-plugin-chart-world-map/src/index.js 66.66% <ø> (ø)
.../plugins/plugin-chart-echarts/src/BoxPlot/index.ts 50.00% <ø> (ø)
...d/plugins/plugin-chart-echarts/src/Funnel/index.ts 50.00% <ø> (ø)
...nd/plugins/plugin-chart-echarts/src/Gauge/index.ts 50.00% <ø> (ø)
...ns/plugin-chart-echarts/src/Graph/EchartsGraph.tsx 0.00% <0.00%> (ø)
...nd/plugins/plugin-chart-echarts/src/Graph/index.ts 50.00% <ø> (ø)
...rts/src/MixedTimeseries/EchartsMixedTimeseries.tsx 0.00% <0.00%> (ø)
.../plugin-chart-echarts/src/MixedTimeseries/index.ts 25.00% <ø> (ø)
... and 31 more

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

@kgabryje kgabryje changed the title [WIP] feat: Implement context menu for drill by feat: Implement context menu for drill by Mar 28, 2023
@kgabryje kgabryje marked this pull request as ready for review March 28, 2023 07:40
@geido
Copy link
Member

geido commented Mar 28, 2023

/testenv up FEATURE_DRILL_BY=true FEATURE_DRILL_TO_DETAIL=true FEATURE_DASHBOARD_CROSS_FILTERS=true

@github-actions
Copy link
Contributor

@geido Ephemeral environment spinning up at http://54.191.91.221:8080. Credentials are admin/admin. Please allow several minutes for bootstrapping and startup.

Copy link
Member

@villebro villebro left a comment

Choose a reason for hiding this comment

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

LGTM and tested to work as expected, both with and without the FF. Since this is behind a FF I don't see any reason to not merge this as-is (if there are issues they will only affect users that have enabled the feature).

@kgabryje kgabryje merged commit 9fbfd1c into apache:master Mar 29, 2023
@github-actions
Copy link
Contributor

Ephemeral environment shutdown and build artifacts deleted.

@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/XL 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants