You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@superset.apache.org by mi...@apache.org on 2024/11/19 20:24:54 UTC
(superset) 05/07: fix(explore): column data type tooltip format (#30588)
This is an automated email from the ASF dual-hosted git repository.
michaelsmolina pushed a commit to branch airbnb
in repository https://gitbox.apache.org/repos/asf/superset.git
commit 096fdea542780279809c18d2eae53809728c66d5
Author: Maxime Beauchemin <ma...@gmail.com>
AuthorDate: Tue Oct 29 18:47:20 2024 -0700
fix(explore): column data type tooltip format (#30588)
(cherry picked from commit 73768f63134aacda43cba01ea55e6b2347b78733)
---
.../superset-ui-chart-controls/src/components/labelUtils.tsx | 10 ++--------
.../test/components/labelUtils.test.tsx | 2 +-
2 files changed, 3 insertions(+), 9 deletions(-)
diff --git a/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx b/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx
index 66b25416f8..03af5c13e8 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx
+++ b/superset-frontend/packages/superset-ui-chart-controls/src/components/labelUtils.tsx
@@ -55,8 +55,7 @@ const TooltipSection = ({
text: ReactNode;
}) => (
<TooltipSectionWrapper>
- <TooltipSectionLabel>{label}</TooltipSectionLabel>
- <span>{text}</span>
+ <TooltipSectionLabel>{label}</TooltipSectionLabel>: <span>{text}</span>
</TooltipSectionWrapper>
);
@@ -71,12 +70,7 @@ export const getColumnTypeTooltipNode = (column: ColumnMeta): ReactNode => {
return null;
}
- return (
- <TooltipSection
- label={t('Column datatype')}
- text={column.type.toLowerCase()}
- />
- );
+ return <TooltipSection label={t('Column type')} text={column.type} />;
};
export const getColumnTooltipNode = (
diff --git a/superset-frontend/packages/superset-ui-chart-controls/test/components/labelUtils.test.tsx b/superset-frontend/packages/superset-ui-chart-controls/test/components/labelUtils.test.tsx
index d32081b898..9b5b760f79 100644
--- a/superset-frontend/packages/superset-ui-chart-controls/test/components/labelUtils.test.tsx
+++ b/superset-frontend/packages/superset-ui-chart-controls/test/components/labelUtils.test.tsx
@@ -90,7 +90,7 @@ test('should get column datatype rendered as tooltip when column has a type', ()
</>,
);
- expect(screen.getByText('Column datatype')).toBeVisible();
+ expect(screen.getByText('Column type')).toBeVisible();
expect(screen.getByText('text')).toBeVisible();
});