This is an automated email from the ASF dual-hosted git repository. kgabryje pushed a commit to branch what-if in repository https://gitbox.apache.org/repos/asf/superset.git
commit 592969820f55fcf54170f86a13ab069633a6955a Author: Kamil Gabryjelski <[email protected]> AuthorDate: Fri Dec 19 17:24:03 2025 +0100 verbose col name in banner --- .../src/dashboard/components/WhatIfBanner/index.tsx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/superset-frontend/src/dashboard/components/WhatIfBanner/index.tsx b/superset-frontend/src/dashboard/components/WhatIfBanner/index.tsx index 4fd5a6a546..3d8b259bad 100644 --- a/superset-frontend/src/dashboard/components/WhatIfBanner/index.tsx +++ b/superset-frontend/src/dashboard/components/WhatIfBanner/index.tsx @@ -96,7 +96,7 @@ const WhatIfBanner = ({ topOffset }: WhatIfBannerProps) => { state => state.dashboardState.whatIfModifications ?? EMPTY_MODIFICATIONS, ); - const { columnToChartIds } = useNumericColumns(); + const { columnToChartIds, numericColumns } = useNumericColumns(); const handleExitWhatIf = useCallback(() => { const affectedChartIds = new Set<number>(); @@ -121,6 +121,12 @@ const WhatIfBanner = ({ topOffset }: WhatIfBannerProps) => { const modification = whatIfModifications[0]; const percentageChange = formatPercentageChange(modification.multiplier); + // Get verbose name from numericColumns if available + const columnInfo = numericColumns.find( + col => col.columnName === modification.column, + ); + const displayName = columnInfo?.verboseName || modification.column; + return ( <BannerContainer data-test="what-if-banner" topOffset={topOffset}> <BannerContent> @@ -128,11 +134,7 @@ const WhatIfBanner = ({ topOffset }: WhatIfBannerProps) => { <span>{t('What-if mode active')}</span> <Separator>|</Separator> <span> - {t( - 'Showing simulated data with %s %s', - modification.column, - percentageChange, - )} + {t('Showing simulated data with %s %s', displayName, percentageChange)} </span> </BannerContent> <ExitButton
