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 drill by table #23603

Merged
merged 6 commits into from
Apr 11, 2023
Merged

Conversation

lilykuang
Copy link
Member

@lilykuang lilykuang commented Apr 6, 2023

SUMMARY

User should be able to see the drill by results either as a chart (the same visualization type as the original chart) or as a table.

  • Added radio buttons to the Modal "Chart" and "Table"
  • Default value is "Chart". If "Chart" is selected, display the drill by result as a chart.
  • If "Table" is selected, display the drill by's query result as table. It should be the same table component as in Explore's "Results" section

BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF

DrillByTable

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

@lilykuang lilykuang requested a review from kgabryje April 7, 2023 00:47
@lilykuang lilykuang marked this pull request as ready for review April 7, 2023 00:47
}: DrillByModalProps) {
const theme = useTheme();
const [chartDataResult, setChartDataResult] = useState<QueryData[]>();
const [drillBy, setDrillBy] = useState<DrillByType>(DrillByType.Chart);
Copy link
Member

Choose a reason for hiding this comment

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

Could you change the name to sth more descriptive? Like for example displayMode or drillByDisplayMode?

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.

Looks great! Added just 1 non-blocking nit

</Radio.Button>
</Radio.Group>
</div>
{drillBy === DrillByType.Chart && chartDataResult && (
Copy link
Member

Choose a reason for hiding this comment

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

I think we shouldn't check for chartDataResult here because then we won't be displaying the loading spinner from DrillByChart. So we should either remove that check here or move the loading spinner to this component

Copy link
Member

Choose a reason for hiding this comment

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

We probably should display the spinner for Table mode too

Copy link
Member Author

@lilykuang lilykuang Apr 7, 2023

Choose a reason for hiding this comment

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

i agreed . i will move the spinner to the modal component

@kgabryje
Copy link
Member

kgabryje commented Apr 7, 2023

Just noticed a bug, but it might be a problem with DataTable component - some bottom rows are visible from under the pagination

image

@codecov
Copy link

codecov bot commented Apr 8, 2023

Codecov Report

Merging #23603 (de62ff5) into master (8ef49a5) will increase coverage by 0.00%.
The diff coverage is 83.33%.

❗ Current head de62ff5 differs from pull request most recent head 1e45718. Consider uploading reports for the commit 1e45718 to get more accurate results

@@           Coverage Diff           @@
##           master   #23603   +/-   ##
=======================================
  Coverage   67.70%   67.71%           
=======================================
  Files        1918     1918           
  Lines       74133    74165   +32     
  Branches     8052     8056    +4     
=======================================
+ Hits        50193    50219   +26     
  Misses      21887    21887           
- Partials     2053     2059    +6     
Flag Coverage Δ
javascript 53.89% <82.60%> (-0.01%) ⬇️

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

Impacted Files Coverage Δ
...tend/src/components/Chart/DrillBy/DrillByChart.tsx 100.00% <ø> (ø)
.../src/components/Chart/DrillBy/DrillByMenuItems.tsx 84.37% <0.00%> (-1.34%) ⬇️
...src/dashboard/components/PropertiesModal/index.tsx 64.03% <ø> (ø)
superset/migrations/env.py 0.00% <0.00%> (ø)
superset/views/dashboard/mixin.py 95.00% <ø> (ø)
...tend/src/components/Chart/DrillBy/DrillByModal.tsx 76.74% <76.92%> (-9.93%) ⬇️
superset/views/core.py 75.27% <86.66%> (+0.39%) ⬆️
...t-frontend/src/explore/actions/saveModalActions.js 98.75% <100.00%> (+1.41%) ⬆️
superset/security/manager.py 95.96% <100.00%> (+0.01%) ⬆️
superset/utils/decorators.py 94.36% <100.00%> (ø)
... and 2 more

... and 1 file with indirect coverage changes

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

@lilykuang lilykuang changed the title feat: implement drill by table [WIP] feat: implement drill by table Apr 9, 2023
@lilykuang lilykuang merged commit 0227558 into apache:master Apr 11, 2023
@lilykuang lilykuang deleted the lily/drill-by-table branch April 11, 2023 14:59
sebastianliebscher pushed a commit to sebastianliebscher/superset that referenced this pull request Apr 28, 2023
@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/L 🚢 3.0.0
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants