You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by di...@apache.org on 2026/06/15 17:10:20 UTC
(superset) branch sc-94612-autoagor created (now f886f4fe6ae)
This is an automated email from the ASF dual-hosted git repository.
geido pushed a change to branch sc-94612-autoagor
in repository https://gitbox.apache.org/repos/asf/superset.git
at f886f4fe6ae feat(explore): yellow warning icons on Time Grain, Time Column, and Multi-Layer charts when overridden by dashboard [sc-94612]
This branch includes the following new commits:
new f886f4fe6ae feat(explore): yellow warning icons on Time Grain, Time Column, and Multi-Layer charts when overridden by dashboard [sc-94612]
The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails. The revisions
listed as "add" were already present in the repository and have only
been added to this reference.
(superset) 01/01: feat(explore): yellow warning icons on Time Grain, Time Column, and Multi-Layer charts when overridden by dashboard [sc-94612]
Posted by di...@apache.org.
This is an automated email from the ASF dual-hosted git repository.
geido pushed a commit to branch sc-94612-autoagor
in repository https://gitbox.apache.org/repos/asf/superset.git
commit f886f4fe6aea7afb6ed9a53c8547ab6e332b5cd6
Author: geido <di...@gmail.com>
AuthorDate: Mon Jun 15 17:09:47 2026 +0000
feat(explore): yellow warning icons on Time Grain, Time Column, and Multi-Layer charts when overridden by dashboard [sc-94612]
When navigating from a dashboard to Explore, show a yellow warning icon
next to the label of:
- Time Grain (time_grain_sqla): when extra_form_data.time_grain_sqla is set
- Time Column (granularity_sqla): when extra_form_data.granularity_sqla is set
- deck.gl Layers (deck_slices): when extra_form_data.visible_deckgl_layers is set
Each control's mapStateToProps checks for dashboardId + the corresponding
extra_form_data key and returns a `warning` string, which ControlHeader
renders as a Tooltip-wrapped WarningOutlined icon in colorWarning yellow.
Co-Authored-By: Claude Sonnet 4.6 <no...@anthropic.com>
---
.../preset-chart-deckgl/src/Multi/controlPanel.ts | 15 ++++++++++++
superset-frontend/src/explore/controls.tsx | 28 ++++++++++++++++++----
2 files changed, 39 insertions(+), 4 deletions(-)
diff --git a/superset-frontend/plugins/preset-chart-deckgl/src/Multi/controlPanel.ts b/superset-frontend/plugins/preset-chart-deckgl/src/Multi/controlPanel.ts
index 8379345ad16..5db253cfe49 100644
--- a/superset-frontend/plugins/preset-chart-deckgl/src/Multi/controlPanel.ts
+++ b/superset-frontend/plugins/preset-chart-deckgl/src/Multi/controlPanel.ts
@@ -53,6 +53,21 @@ export default {
'api/v1/chart/?q=(filters:!((col:viz_type,opr:sw,value:deck)))',
placeholder: t('Select charts'),
onAsyncErrorMessage: t('Error while fetching charts'),
+ mapStateToProps: (state: Record<string, any>) => {
+ const extraFormData = state?.form_data?.extra_form_data;
+ const dashboardId = state?.form_data?.dashboardId;
+ if (
+ dashboardId &&
+ extraFormData?.visible_deckgl_layers !== undefined
+ ) {
+ return {
+ warning: t(
+ 'Layer visibility has been modified by the dashboard',
+ ),
+ };
+ }
+ return {};
+ },
mutator: (
data: {
result?: { id: number; slice_name: string }[];
diff --git a/superset-frontend/src/explore/controls.tsx b/superset-frontend/src/explore/controls.tsx
index 74caebe52f1..7ed05bfc4d2 100644
--- a/superset-frontend/src/explore/controls.tsx
+++ b/superset-frontend/src/explore/controls.tsx
@@ -324,7 +324,12 @@ export const controls = {
optionRenderer: (c: Column) => <StyledColumnOption column={c} showType />,
valueKey: 'column_name',
mapStateToProps: (state: ControlState) => {
- const props: { choices?: Column[]; default?: string | null } = {};
+ const stateAny = state as Record<string, any>;
+ const props: {
+ choices?: Column[];
+ default?: string | null;
+ warning?: string;
+ } = {};
if (state.datasource) {
props.choices = state.datasource.granularity_sqla;
props.default = null;
@@ -334,6 +339,14 @@ export const controls = {
props.default = props.choices[0].column_name;
}
}
+ if (
+ stateAny.form_data?.dashboardId &&
+ stateAny.form_data?.extra_form_data?.granularity_sqla
+ ) {
+ props.warning = t(
+ 'Time column is being overridden by the dashboard',
+ );
+ }
return props;
},
},
@@ -349,9 +362,16 @@ export const controls = {
'The options here are defined on a per database ' +
'engine basis in the Superset source code.',
),
- mapStateToProps: (state: ControlState) => ({
- choices: state.datasource ? state.datasource.time_grain_sqla : null,
- }),
+ mapStateToProps: (state: ControlState) => {
+ const stateAny = state as Record<string, any>;
+ return {
+ choices: state.datasource ? state.datasource.time_grain_sqla : null,
+ ...(stateAny.form_data?.dashboardId &&
+ stateAny.form_data?.extra_form_data?.time_grain_sqla
+ ? { warning: t('Time grain is being overridden by the dashboard') }
+ : undefined),
+ };
+ },
},
time_range: {