From ed1309e6bd9e8c0365794cf12bf4a272e540bbbd Mon Sep 17 00:00:00 2001 From: Geido <60598000+geido@users.noreply.github.com> Date: Thu, 28 Apr 2022 11:37:49 +0200 Subject: [PATCH] fix: Dates alignment in Table viz (#19668) * Fix dates alignment * Add package lock changes * Update package-lock * Clean up --- superset-frontend/package-lock.json | 29 ++++++++----------- superset-frontend/package.json | 2 +- .../plugins/plugin-chart-table/src/Styles.tsx | 4 +++ .../src/assets/stylesheets/less/fonts.less | 8 ++--- 4 files changed, 21 insertions(+), 22 deletions(-) diff --git a/superset-frontend/package-lock.json b/superset-frontend/package-lock.json index 8a37a510eb10f..2787378070627 100644 --- a/superset-frontend/package-lock.json +++ b/superset-frontend/package-lock.json @@ -20,6 +20,7 @@ "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", + "@fontsource/inter": "^4.5.7", "@superset-ui/chart-controls": "file:./packages/superset-ui-chart-controls", "@superset-ui/core": "file:./packages/superset-ui-core", "@superset-ui/legacy-plugin-chart-calendar": "file:./plugins/legacy-plugin-chart-calendar", @@ -69,7 +70,6 @@ "emotion-rgba": "0.0.9", "fast-glob": "^3.2.7", "fontsource-fira-code": "^4.0.0", - "fontsource-inter": "^4.0.0", "fs-extra": "^10.0.0", "fuse.js": "^6.4.6", "geolib": "^2.0.24", @@ -4431,6 +4431,11 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@fontsource/inter": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-4.5.7.tgz", + "integrity": "sha512-25k3thupaOEBexuU+jAkGqieKPbuhSuA+sinDwp1iBNhqQPiJ9QHDvsXgoCgCbZ4sGlE8aCwZmSlDJrPdJHNkw==" + }, "node_modules/@gar/promisify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", @@ -35638,12 +35643,6 @@ "integrity": "sha512-qKVeWWNvkPP22FUkea2qVgZHiPBIRk9HFGIFmEUbqEV7Wcu/Dxrva4t7d1XPa2+0cnJgD0kHAiDZ514KjHYQKA==", "deprecated": "Package relocated. Please install and migrate to @fontsource/fira-code." }, - "node_modules/fontsource-inter": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fontsource-inter/-/fontsource-inter-4.0.0.tgz", - "integrity": "sha512-TicQe9zq5GS12vE/ZOE+iXkJ0GN+Tem4TrIbPyOsGn3OaTrs/bmc/a4BjDzJsxS8+Qr3t121Bw5acyeqb4fiAQ==", - "deprecated": "Package relocated. Please install and migrate to @fontsource/inter." - }, "node_modules/for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", @@ -60662,11 +60661,7 @@ "tools/eslint-plugin-theme-colors": { "version": "1.0.0", "dev": true, - "license": "Apache-2.0", - "engines": { - "node": "^16.9.1", - "npm": "^7.5.4" - } + "license": "Apache-2.0" }, "tools/eslint-plugin-translation-vars": { "version": "1.0.0", @@ -63789,6 +63784,11 @@ } } }, + "@fontsource/inter": { + "version": "4.5.7", + "resolved": "https://registry.npmjs.org/@fontsource/inter/-/inter-4.5.7.tgz", + "integrity": "sha512-25k3thupaOEBexuU+jAkGqieKPbuhSuA+sinDwp1iBNhqQPiJ9QHDvsXgoCgCbZ4sGlE8aCwZmSlDJrPdJHNkw==" + }, "@gar/promisify": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/@gar/promisify/-/promisify-1.1.2.tgz", @@ -88788,11 +88788,6 @@ "resolved": "https://registry.npmjs.org/fontsource-fira-code/-/fontsource-fira-code-4.0.0.tgz", "integrity": "sha512-qKVeWWNvkPP22FUkea2qVgZHiPBIRk9HFGIFmEUbqEV7Wcu/Dxrva4t7d1XPa2+0cnJgD0kHAiDZ514KjHYQKA==" }, - "fontsource-inter": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/fontsource-inter/-/fontsource-inter-4.0.0.tgz", - "integrity": "sha512-TicQe9zq5GS12vE/ZOE+iXkJ0GN+Tem4TrIbPyOsGn3OaTrs/bmc/a4BjDzJsxS8+Qr3t121Bw5acyeqb4fiAQ==" - }, "for-in": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz", diff --git a/superset-frontend/package.json b/superset-frontend/package.json index 118377ee102fe..4d991a7be7565 100644 --- a/superset-frontend/package.json +++ b/superset-frontend/package.json @@ -80,6 +80,7 @@ "@emotion/cache": "^11.4.0", "@emotion/react": "^11.4.1", "@emotion/styled": "^11.3.0", + "@fontsource/inter": "^4.5.7", "@superset-ui/chart-controls": "file:./packages/superset-ui-chart-controls", "@superset-ui/core": "file:./packages/superset-ui-core", "@superset-ui/legacy-plugin-chart-calendar": "file:./plugins/legacy-plugin-chart-calendar", @@ -129,7 +130,6 @@ "emotion-rgba": "0.0.9", "fast-glob": "^3.2.7", "fontsource-fira-code": "^4.0.0", - "fontsource-inter": "^4.0.0", "fs-extra": "^10.0.0", "fuse.js": "^6.4.6", "geolib": "^2.0.24", diff --git a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx index ab56dc8c612a9..59a40b20bbf8c 100644 --- a/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx +++ b/superset-frontend/plugins/plugin-chart-table/src/Styles.tsx @@ -51,6 +51,10 @@ export default styled.div` border-top: 0; } + .table > tbody tr td { + font-feature-settings: 'tnum' 1; + } + .dt-controls { padding-bottom: 0.65em; } diff --git a/superset-frontend/src/assets/stylesheets/less/fonts.less b/superset-frontend/src/assets/stylesheets/less/fonts.less index 7e15ab439589e..1e317128c6e77 100644 --- a/superset-frontend/src/assets/stylesheets/less/fonts.less +++ b/superset-frontend/src/assets/stylesheets/less/fonts.less @@ -22,10 +22,10 @@ /*************************************************************************/ /******************************* Inter UI ********************************/ -@import '~fontsource-inter/200.css'; -@import '~fontsource-inter/400.css'; -@import '~fontsource-inter/500.css'; -@import '~fontsource-inter/600.css'; +@import '~@fontsource/inter/200.css'; +@import '~@fontsource/inter/400.css'; +@import '~@fontsource/inter/500.css'; +@import '~@fontsource/inter/600.css'; /******************************* Fira Code ********************************/ @import '~fontsource-fira-code/400.css';