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 2022/05/18 14:26:37 UTC

[superset] branch master updated: Add tnum property to tables (#20093)

This is an automated email from the ASF dual-hosted git repository.

diegopucci pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/superset.git


The following commit(s) were added to refs/heads/master by this push:
     new 1fe30f1f0e Add tnum property to tables (#20093)
1fe30f1f0e is described below

commit 1fe30f1f0e511289575d1bbe543c8a93be7cfc8f
Author: Geido <60...@users.noreply.github.com>
AuthorDate: Wed May 18 16:26:29 2022 +0200

    Add tnum property to tables (#20093)
---
 .../plugins/legacy-plugin-chart-paired-t-test/src/PairedTTest.jsx     | 4 ++++
 .../plugins/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 33870b03ea..670d97e7c8 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 7ff2c0e526..1360e0dc92 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 7df33d0c5d..624354f1b6 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 bb68b773e7..ad83f3b902 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;