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: multiple results pane on explore and dashboard #20277

Merged
merged 7 commits into from
Jun 9, 2022

Conversation

zhaoyongjie
Copy link
Member

@zhaoyongjie zhaoyongjie commented Jun 6, 2022

SUMMARY

Currently, the Superset QueryContext contains multiple queries but the south pane in the Explore only supported single results pane. this PR intends to support multiple results pane in the Explore page and Dashboard.

This PR also add fully unit test for SamplePane and ResultsPane.

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

multiple.results.pane.mov

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

@codecov
Copy link

codecov bot commented Jun 7, 2022

Codecov Report

Merging #20277 (fe5be22) into master (d3670f1) will increase coverage by 0.05%.
The diff coverage is 90.38%.

@@            Coverage Diff             @@
##           master   #20277      +/-   ##
==========================================
+ Coverage   66.61%   66.67%   +0.05%     
==========================================
  Files        1733     1737       +4     
  Lines       64953    64973      +20     
  Branches     6858     6869      +11     
==========================================
+ Hits        43268    43319      +51     
+ Misses      19929    19905      -24     
+ Partials     1756     1749       -7     
Flag Coverage Δ
javascript 51.63% <90.38%> (+0.12%) ⬆️

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

Impacted Files Coverage Δ
...dashboard/components/SliceHeaderControls/index.tsx 64.28% <ø> (ø)
...mponents/DataTablesPane/components/SamplesPane.tsx 97.67% <ø> (+27.90%) ⬆️
...plore/components/DataTablesPane/DataTablesPane.tsx 78.04% <33.33%> (-7.67%) ⬇️
...ataTablesPane/components/SingleQueryResultPane.tsx 85.71% <85.71%> (ø)
.../src/explore/components/DataTableControl/index.tsx 64.77% <100.00%> (+0.72%) ⬆️
...taTablesPane/components/ResultsPaneOnDashboard.tsx 100.00% <100.00%> (ø)
...nents/DataTablesPane/components/useResultsPane.tsx 97.43% <100.00%> (ø)
...explore/components/DataTablesPane/test/fixture.tsx 100.00% <100.00%> (ø)
...end/src/explore/components/DataTablesPane/utils.ts 100.00% <100.00%> (ø)
...gin-chart-echarts/src/Timeseries/transformProps.ts 56.84% <0.00%> (-1.50%) ⬇️
... and 5 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 8e46ae5...fe5be22. Read the comment docs.

@zhaoyongjie
Copy link
Member Author

/testenv up

@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

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

Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Great feature! I only have 1 comment about the labels - I don't think that the results of second query should be labeled as "Results 1". I think that for multiple queries we should have either: Results / Results 2 or Results 1 / Results 2 or Results A / Results B (since the queries are labeled as A and B in control panel). In the charts that have only 1 query we should keep the label Results.

@zhaoyongjie
Copy link
Member Author

Great feature! I only have 1 comment about the labels - I don't think that the results of second query should be labeled as "Results 1". I think that for multiple queries we should have either: Results / Results 2 or Results 1 / Results 2 or Results A / Results B (since the queries are labeled as A and B in control panel). In the charts that have only 1 query we should keep the label Results.

Names are always a difficult thing. "Results 2" make sense. if have any good ideas, I will change them.

@kgabryje
Copy link
Member

kgabryje commented Jun 8, 2022

@kasiazjc WDYT?

@zhaoyongjie zhaoyongjie requested a review from kgabryje June 8, 2022 10:23
Copy link
Member

@kgabryje kgabryje left a comment

Choose a reason for hiding this comment

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

Tested, works great except 1 minor thing. In Explore, when I change time column formatting from formatted to original, the change is applied in all tabs (results, results 2, samples). When I do the same thing on Dashboard, the change is applied only in 1 tab for that column.
Approving since it's a minor, non-blocking problem, but we may want to fix it before merging if it's quick and easy to fix

@zhaoyongjie zhaoyongjie closed this Jun 8, 2022
@zhaoyongjie zhaoyongjie reopened this Jun 8, 2022
@github-actions
Copy link
Contributor

github-actions bot commented Jun 8, 2022

Ephemeral environment shutdown and build artifacts deleted.

@zhaoyongjie
Copy link
Member Author

zhaoyongjie commented Jun 8, 2022

@kgabryje I intend to use Context to refactor the time columns switcher since it's hard to control different results pane in Dashboard. Could I implement it in the separate PR?

@zhaoyongjie zhaoyongjie merged commit fd12987 into apache:master Jun 9, 2022
@zhaoyongjie
Copy link
Member Author

I merged first, then fix it in the separate PR.

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

Successfully merging this pull request may close these issues.

3 participants