Please make sure you are familiar with the SIP process documented here. The SIP will be numbered by a committer upon acceptance.
[SIP] Proposal for Customizable Drill-to-Detail Chart
Motivation
Currently, the Drill-to-Detail chart in Superset displays the full dataset when a drilldown is performed. In my experience users have identified three key pain points while using superset:
-
Selective Data Display: As superset users, we use a single dataset for multiple charts, currently the entire dataset is displayed in the drilldown, we would like the ability to filter and display only the columns that are most relevant to each chart.
-
Custom Labeling: Custom labels can improve readability and contextual understanding, a feature that already exists in both the table chart and the per dataset but is missing here.
-
CSV Export: End users often need to export the exact view presented in the drilldown to CSV for further analysis or reporting.
Enhancing the drill-to-detail functionality to mirror the customization available in the table chart will create a more consistent and user-friendly experience.
Proposed Change
I would be glad for sugestions here.
- Leverage the existing custom labels defined at the dataset level for display in the Drill-to-Detail view.
- Introduce a configuration option within the chart control panel allowing users to specify which dataset columns should appear in the Drill-to-Detail view.
- Incorporate an optional export button within the Drill-to-Detail modal, enabling users to download the currently displayed data as a CSV file.
These configurations could be integrated into a new "Drilldown Options" customize section within the chart control panel.
(Mockup of the desired Drill-to-Detail interface)
New or Changed Public Interfaces
As far as I know, no change is needed.
New dependencies
As these enhancements build upon existing functionality, no new dependencies are required.
Migration Plan and Compatibility
Maintain backward compatibility with existing charts by ensuring that if the customization options are not configured, the drilldown behavior remains unchanged.
Rejected Alternatives
An alternative considered was the ability to embed any chart within the Drill-to-Detail view. However, this approach was deemed overly complex due to the unnecessary complexity related to embeeding charts.
Comment From: rusackas
Sounds interesting! Might be useful to see a mockup of the control panel and/or dataset editor mods that would be relevant.
CC @kasiazjc since I know she's had some thoughts about this as well.
Comment From: mistercrunch
SGTM, I believe there are designs somewhere laying around to improve the "Dataset Editor" modal that somewhat relates to this. Some related ideas:
- allow column reordering in the Columns
tab of the Dataset Editor, impacting the details view
- add a new checkbox [show in drill-to-details] in the in the Columns
tab of the Dataset Editor, (checked by default) allowing people to hide columns from the drill-to-details view
- improve Explore to align the current "Samples" tab in the south-east panel to align / reuse the drill-to-details view. Add similar interaction in explore to "Drill-to-Details", could pop the same modal and/or impact the panel
@kasiazjc ^^^
Comment From: rusackas
Looks like this one is ready for more attention. Holler if you need help opening a [DISCUSS] thread on the mailing list. @kasiazjc we'd still love your opinion(s) here.
Comment From: EMachad0
@rusackas I would appreciate help with opening the thread on the mailing list.
Comment From: kasiazjc
@EMachad0 thanks for the SIP! The changes make sense and are also something that we were thinking about implementing, but never got round to it.
In terms of Selective Data Display, we were thinking about this kind of dropdown. This would be in the drill to detail modal and the dropdown would have dynamic search at the top if there is more than 15 values. I know that we were discussing if it should be on the dataset or chart/user level with @mistercrunch, but it's tricky as the view might be dependent on the chart. Would love your opinions here though.
Bonus: column ordering I think we have in table charts too, and the order of the columns is saved in explore. We could also introduce this in the drill to detail table
In general, I am thinking that instead of adding new controls, maybe we could add a new tab to "results&samples" in chart editing mode, which would show the drill to detail table and allow users to manipulate the table as they wish, so: - showing/hiding columns - renaming (I think the table component may allow that, need to check) - reordering of columns, which would be saved when saving the chart - add export/copy in this tab too (would be also shown in the modal)
@EMachad0 @mistercrunch @rusackas let me know your thoughts (and keep in mind that the mocks are currently just a quick ones to show what I am thinking)
Comment From: mistercrunch
Seems ag-grid-community
that we started using offers a lot of the stuff we need here (DnD reordering, filters, show/hide columns, paging, ...). Also generally would love to bring the two panels (drill-to-details-modal and "Samples"-in-explore) together, along with the drill-to-details action to affect the panel in explore.
Comment From: EMachad0
@kasiazjc This looks fantastic — it checks all the boxes of what I was hoping for and actually improves the implementation quite a bit! I love the direction you're taking, especially with integrating the drill to detail table as a dedicated tab near results and samples. How can I proceed to help move this forward?
Comment From: mistercrunch
Yes!
I know that we were discussing if it should be on the dataset or chart/user level with @mistercrunch, but it's tricky as the view might be dependent on the chart.
I think it should be a dataset-level setting to keep things simple. The dataset owners decide which columns show and in what order. Maybe users can hide/unhide things, and reorder columns, but that doesn't get persisted.
Say if there's a PII column like email
, the dataset owner can decide to hide it so it's not available in the "drill to details" on the dashboard.
I'd make it a requirement to use the same settings to apply both in the current "Samples" tab in Explore and in the drill-to-details in dashboard for consistency. Talking about consistency, we should rename "Samples" to "Details" in Explore, so it's clear that all this is aligned naming-wise
Comment From: rusackas
This needs to be put up for a DISCUSS thread on the dev@ mailing list if you want to carry it forward.
Comment From: EMachad0
@rusackas I created the Discuss thread on the mailing list (archive link)
Comment From: EMachad0
@rusackas can you give me an overview of the process and what are the next steps?