question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

[SIP-76] Proposal for custom dashboard component support

See original GitHub issue

[SIP-76] Proposal for Dynamic dashboard components

Motivation

Today there is a very narrow list of components that can live within dashboards: charts, Row, column , tabs, header, markdown and divider as part of our dashboard requirements at Nielsen we want to add another non-chart component that shows a summary of the active filters within the dashboard for display purposes as described in here but shortly we understood that it would be hard to get those accepted and aligned with the superset community and adding such components would require maintenance and burden over time.

Proposed Change

So we decided on a less invasive approach that allows adding custom dashboard components into the dashboard similar to the plugins system that exists for charts and native filters today each custom component will have access to the dashboard state and would be able to leverage its state. the advantage here, comparing the filter summary bar is that dashboard components can be written externally to superset and will not be part of the superset-frontend system which will keep it stable

similar to custom plugins, it will be up to the developer to integrate those components into superset and load them into superset they way they see fit this will open a new type of ideas that can leverage the dashboard state and show dashboard in ways that we’re never seen before

New or Changed Public Interfaces

setupDashboardComponents.ts file would be a file in which you would register your custom components in the following approach

import dashboardComponentsRegistry from '../visualizations/presets/dashboardComponents';

export default function setupDashboardComponents() {
  dashboardComponentsRegistry.set('test', test);
}

the interface for any component will as the following

type DashboardData = {
  nativeFilters: NativeFiltersState;
  dataMask: DataMaskStateWithId;
};

we will decide about interface expansions as we evolve there would be a conversion function from the dashboard state to the interface mentioned above

Migration Plan and Compatibility

Rejected Alternatives

creating dashboard components directly into the superset source code like the following PR: https://github.com/apache/superset/pull/17153

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:39
  • Comments:12 (11 by maintainers)

github_iconTop GitHub Comments

3reactions
rusackascommented, Jan 4, 2022

Closing the issue due to a successful vote! 🎉 Thank you for taking this on!

I think there will be more and more and more reasons to add plugin capabilities to Superset. The part that interests me greatly about all of this would be a chance to revisit the architecture for a Dynamic Plugin ecosystem, where references to external modules could be stored/managed in a table. We started doing this for Dyanamic Viz Plugins, but this is due for a revisit now that superset uses Webpack 5 and is capable of Module Federation and promise-based dynamic remotes.

I don’t want to put any undue burden on your efforts to achieve your business goals, but I think Superset and its community would benefit greatly from such an architecture revamp. In effect, anyone could publish a plugin on GitHub, and any Superset User could use leverage all of this work/capability. If you’d like to explore further, let’s talk on Slack!

1reaction
villebrocommented, Nov 5, 2021

Another idea that came to mind for a nice dashboard component: a legend component showing the colors for labels on the currently active tab/hovered chart. Since Superset charts on a dashboard always share the same color (this is coordinated by the color registry), it would be nice to have just one legend component as opposed to having a dedicated legend on each and every chart.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Dynamic header component in dashboards #15006 - GitHub
The Header component is a great way to add titles to dashboards however ... [SIP-76] Proposal for custom dashboard component support #17210.
Read more >
Custom Dashboard Component Options (Tenable.sc 5.23.x)
Use the following options to configure custom dashboard components. For more information about dashboard component types, see Dashboard and Component Templates.
Read more >
Edit and Customize Lightning Experience Dashboard ...
Component Theme – Choose a Light or a Dark theme. Customize chart colors from the dashboard properties menu. Individual components support unique themes,...
Read more >
The 5 Steps to Creating Effective Salesforce Dashboards
Dashboard components include different types of charts, tables, metrics, and gauges. You can customize the grouping, summary, and display of data for each ......
Read more >
How to Configure Your Siteimprove Dashboard and Reports
Pre-configured system dashboards · Configuring Siteimprove Dashboards. Creating custom dashboards; Adding widgets via the components in the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found