From 07af7b509eb6ce9f39afdd961e19c5efcca54f72 Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Wed, 27 Feb 2019 20:42:02 +0100 Subject: [PATCH 1/5] Make table format work again - working color picker - working font size - working cell text alignment - this is all by preventing the infinite loop in angular --- src/definition/index.js | 4 ++-- src/definition/{formatted.js => table-format.js} | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) rename src/definition/{formatted.js => table-format.js} (98%) diff --git a/src/definition/index.js b/src/definition/index.js index 45437c3..9003467 100644 --- a/src/definition/index.js +++ b/src/definition/index.js @@ -1,6 +1,6 @@ import pagination from './pagination'; import header from './header'; -import formatted from './formatted'; +import tableFormat from './table-format'; import conceptSemaphores from './concept-semaphores'; import metricSemaphores from './metric-semaphores'; @@ -21,7 +21,7 @@ const definition = { settings: { items: { ConceptSemaphores: conceptSemaphores, - Formatted: formatted, + Formatted: tableFormat, Header: header, MetricSemaphores: metricSemaphores, Pagination: pagination diff --git a/src/definition/formatted.js b/src/definition/table-format.js similarity index 98% rename from src/definition/formatted.js rename to src/definition/table-format.js index ce210c5..8ec9ae0 100644 --- a/src/definition/formatted.js +++ b/src/definition/table-format.js @@ -1,4 +1,4 @@ -const formatted = { +const tableFormat = { type: 'items', label: 'Table Format', items: { @@ -35,7 +35,6 @@ const formatted = { color: '#fff', index: 1 }, - dualOutput: true, label: 'Even row background color', ref: 'rowEvenBGColor', type: 'object' @@ -46,7 +45,6 @@ const formatted = { color: '#b6d7ea', index: 4 }, - dualOutput: true, label: 'Odd row background color', ref: 'rowOddBGColor', type: 'object' @@ -230,4 +228,4 @@ const formatted = { } }; -export default formatted; +export default tableFormat; From 4ba12b8b2dfb9590dc893fe62dd295d782f20cab Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Wed, 27 Feb 2019 20:51:18 +0100 Subject: [PATCH 2/5] show user-selected font-family for the cells --- src/main.less | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main.less b/src/main.less index c950edb..2a9bfe2 100644 --- a/src/main.less +++ b/src/main.less @@ -56,6 +56,7 @@ white-space: nowrap; overflow: hidden; text-overflow: ellipsis; + font-family: inherit; } } From 7fda7aa2d93ac42c0cc03979ab51eb2d3b36fc9a Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Wed, 27 Feb 2019 20:54:50 +0100 Subject: [PATCH 3/5] better defaults when missing font family --- src/definition/table-format.js | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/definition/table-format.js b/src/definition/table-format.js index 8ec9ae0..b4844ff 100644 --- a/src/definition/table-format.js +++ b/src/definition/table-format.js @@ -108,35 +108,35 @@ const tableFormat = { label: 'FontFamily', options: [ { - value: 'QlikView Sans', + value: 'QlikView Sans, -apple-system, sans-serif', label: 'QlikView Sans' }, { - value: 'Arial', + value: 'Arial, -apple-system, sans-serif', label: 'Arial' }, { - value: 'Calibri', + value: 'Calibri, -apple-system, sans-serif', label: 'Calibri' }, { - value: 'Comic Sans MS', + value: 'Comic Sans MS, -apple-system, sans-serif', label: 'Comic Sans MS' }, { - value: 'MS Sans Serif', + value: 'MS Sans Serif, serif', label: 'MS Sans Serif' }, { - value: 'Tahoma', + value: 'Tahoma, -apple-system, sans-serif', label: 'Tahoma' }, { - value: 'Verdana', + value: 'Verdana, -apple-system, sans-serif', label: 'Verdana' } ], - defaultValue: 'QlikView Sans' + defaultValue: 'QlikView Sans, -apple-system, sans-serif' }, DataFontSize: { ref: 'lettersize', From 85228412ccdc5cb013993023607b58ca9f195e5d Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Wed, 27 Feb 2019 21:43:09 +0100 Subject: [PATCH 4/5] show correct color in the color picker --- src/definition/table-format.js | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/definition/table-format.js b/src/definition/table-format.js index b4844ff..00ff555 100644 --- a/src/definition/table-format.js +++ b/src/definition/table-format.js @@ -37,7 +37,8 @@ const tableFormat = { }, label: 'Even row background color', ref: 'rowEvenBGColor', - type: 'object' + type: 'object', + dualOutput: true }, rowOddBGColor: { component: 'color-picker', @@ -47,7 +48,8 @@ const tableFormat = { }, label: 'Odd row background color', ref: 'rowOddBGColor', - type: 'object' + type: 'object', + dualOutput: true }, BodyTextColor: { ref: 'BodyTextColorSchema', From ac8b70bc84148c8728214a201336a20221d0dc91 Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Thu, 28 Feb 2019 10:49:24 +0100 Subject: [PATCH 5/5] Use correct fallback for all fonts --- src/definition/table-format.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/definition/table-format.js b/src/definition/table-format.js index 00ff555..7fbb71f 100644 --- a/src/definition/table-format.js +++ b/src/definition/table-format.js @@ -126,7 +126,7 @@ const tableFormat = { label: 'Comic Sans MS' }, { - value: 'MS Sans Serif, serif', + value: 'MS Sans Serif, -apple-system, sans-serif', label: 'MS Sans Serif' }, {