From 1fe30f1f0e511289575d1bbe543c8a93be7cfc8f Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Wed, 18 May 2022 16:26:29 +0200 Subject: [PATCH] Add tnum property to tables (#20093) --- .../legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx | 4 ++++ .../plugin-chart-pivot-table/src/react-pivottable/Styles.js | 4 ++++ superset-frontend/src/components/Chart/Chart.jsx | 4 ++++ superset-frontend/src/components/TableCollection/index.tsx | 1 + 4 files changed, 13 insertions(+) diff --git a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx index 33870b03ead36..670d97e7c8421 100644 --- a/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx +++ b/superset-frontend/plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx @@ -59,6 +59,10 @@ const StyledDiv = styled.div` margin-left: ${theme.gridUnit}px; } + .reactable-data tr { + font-feature-settings: 'tnum' 1; + } + .reactable-data tr, .reactable-header-sortable { -webkit-transition: ease-in-out 0.1s; diff --git a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.js b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.js index 7ff2c0e5267b3..1360e0dc921ad 100644 --- a/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.js +++ b/superset-frontend/plugins/plugin-chart-pivot-table/src/react-pivottable/Styles.js @@ -36,6 +36,10 @@ export const Styles = styled.div` top: 0; } + table tbody tr { + font-feature-settings: 'tnum' 1; + } + table.pvtTable thead tr th, table.pvtTable tbody tr th { background-color: ${theme.colors.grayscale.light5}; diff --git a/superset-frontend/src/components/Chart/Chart.jsx b/superset-frontend/src/components/Chart/Chart.jsx index 7df33d0c5d7cb..624354f1b65eb 100644 --- a/superset-frontend/src/components/Chart/Chart.jsx +++ b/superset-frontend/src/components/Chart/Chart.jsx @@ -105,6 +105,10 @@ const Styles = styled.div` .slice_container { height: ${p => p.height}px; + + .pivot_table tbody tr { + font-feature-settings: 'tnum' 1; + } } `; diff --git a/superset-frontend/src/components/TableCollection/index.tsx b/superset-frontend/src/components/TableCollection/index.tsx index bb68b773e73cb..ad83f3b9027f2 100644 --- a/superset-frontend/src/components/TableCollection/index.tsx +++ b/superset-frontend/src/components/TableCollection/index.tsx @@ -172,6 +172,7 @@ export const Table = styled.table` } .table-cell { + font-feature-settings: 'tnum' 1; text-overflow: ellipsis; overflow: hidden; max-width: 320px;