From 8e100f286b6d42cdd56b00bdb6ba65c3db2634c5 Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Fri, 8 Feb 2019 13:07:33 +0100 Subject: [PATCH 1/6] Fix alternating colours --- src/initialize-transformed.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/initialize-transformed.js b/src/initialize-transformed.js index b58f7ca..1ed7a02 100644 --- a/src/initialize-transformed.js +++ b/src/initialize-transformed.js @@ -251,7 +251,7 @@ async function initializeTransformed ({ $element, layout, component }) { }, options: { backgroundColor: colors[`vColLib${layout.ColorSchema}`], - backgroundColorOdd: colors[`vColLib${layout.ColorSchemaP}`], + backgroundColorOdd: colors[`vColLib${layout.ColorSchema}P`], color: layout.BodyTextColorSchema, fontFamily: layout.FontFamily, fontSizeAdjustment: getFontSizeAdjustment(layout.lettersize) From 68dccf85753b1af30c846aebfcd829ec0128f9bd Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Fri, 8 Feb 2019 13:08:06 +0100 Subject: [PATCH 2/6] Fix pixel misalignment between table header and body --- src/main.less | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main.less b/src/main.less index 9f96728..3af446a 100644 --- a/src/main.less +++ b/src/main.less @@ -2,6 +2,12 @@ @TableBorder: 1px solid #d3d3d3; @KpiTableWidth: 230px; + *, + *:before, + *:after { + box-sizing: border-box; + } + ._cell(@Width: 50px) { min-width: @Width!important; max-width: @Width!important; From e3b7a7640e4dce9675b6c4e6202dc6e3445f7822 Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Fri, 8 Feb 2019 13:08:52 +0100 Subject: [PATCH 3/6] Fixed misalignment when it's only one dimension --- src/data-table/data-cell.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/data-table/data-cell.jsx b/src/data-table/data-cell.jsx index 7178553..0dd2138 100644 --- a/src/data-table/data-cell.jsx +++ b/src/data-table/data-cell.jsx @@ -92,7 +92,8 @@ const DataCell = ({ data, general, measurement, styleBuilder, styling }) => { } let cellClass = 'grid-cells'; - const shouldUseSmallCells = isColumnPercentageBased && data.headers.measurements.length > 1; + const hasTwoDimensions = data.headers.dimension2 && data.headers.dimension2.length > 0; + const shouldUseSmallCells = isColumnPercentageBased && data.headers.measurements.length > 1 && hasTwoDimensions; if (shouldUseSmallCells) { cellClass = 'grid-cells-small'; } From ce1e196b78600f505c0966f234dee5ce62d7aea4 Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Fri, 8 Feb 2019 13:18:15 +0100 Subject: [PATCH 4/6] Follow the same principle as the old application - Restyle table cells only when metric semaphore is enabled --- src/data-table/data-cell.jsx | 4 ++-- src/initialize-transformed.js | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/data-table/data-cell.jsx b/src/data-table/data-cell.jsx index 0dd2138..babee8b 100644 --- a/src/data-table/data-cell.jsx +++ b/src/data-table/data-cell.jsx @@ -76,9 +76,9 @@ const DataCell = ({ data, general, measurement, styleBuilder, styling }) => { textAlign: 'right' }; - const { semaphoreColors } = styling; + const { semaphoreColors, semaphoreColors: { fieldsToApplyTo } } = styling; const isValidSemaphoreValue = !styleBuilder.hasComments() && !isNaN(measurement.value); - const shouldHaveSemaphoreColors = semaphoreColors.fieldsToApplyTo.applyToAll || semaphoreColors.fieldsToApplyTo.specificFields.indexOf(measurement.name) !== -1; + const shouldHaveSemaphoreColors = fieldsToApplyTo.applyToMetric && (fieldsToApplyTo.applyToAll || fieldsToApplyTo.specificFields.indexOf(measurement.name) !== -1); if (isValidSemaphoreValue && shouldHaveSemaphoreColors) { const { backgroundColor, color } = getSemaphoreColors(measurement, semaphoreColors); cellStyle = { diff --git a/src/initialize-transformed.js b/src/initialize-transformed.js index 1ed7a02..b8aaff4 100644 --- a/src/initialize-transformed.js +++ b/src/initialize-transformed.js @@ -259,6 +259,7 @@ async function initializeTransformed ({ $element, layout, component }) { semaphoreColors: { fieldsToApplyTo: { applyToAll: layout.allsemaphores, + applyToMetric: layout.allmetrics, specificFields: [ layout.conceptsemaphore1, layout.conceptsemaphore2, From 8984affe875ab7507b210c07a69f20677bd54cc9 Mon Sep 17 00:00:00 2001 From: Balazs Gobel Date: Fri, 8 Feb 2019 13:18:23 +0100 Subject: [PATCH 5/6] minor cleanup --- src/definition/metric-semaphores.js | 2 +- src/main.less | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/src/definition/metric-semaphores.js b/src/definition/metric-semaphores.js index 73bbc61..fbd1c38 100644 --- a/src/definition/metric-semaphores.js +++ b/src/definition/metric-semaphores.js @@ -25,7 +25,7 @@ const metricSemaphores = { type: 'string', defaultValue: '0', show (data) { - return data.allmetrics == false; + return !data.allmetrics; } }, MetricStatus1: { diff --git a/src/main.less b/src/main.less index 3af446a..b80d001 100644 --- a/src/main.less +++ b/src/main.less @@ -50,10 +50,8 @@ } .empty { - width: 3%; background: #ffffff; - min-width: 4px !important; - max-width: 4px !important; + max-width: 4px; } th.main-kpi { From 979c036b49b90ce4cdbb0675126b4bc20f7c3b0e Mon Sep 17 00:00:00 2001 From: ahmed-Bazzara Date: Fri, 22 Feb 2019 12:44:44 +0100 Subject: [PATCH 6/6] settings file reverted --- settings.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/settings.js b/settings.js index 0b1583d..842ebc1 100644 --- a/settings.js +++ b/settings.js @@ -4,10 +4,10 @@ const packageJSON = require('./package.json'); const defaultBuildDestination = path.resolve("./build"); module.exports = { - buildDestination: "C:\\Users\\Ahmed\\Documents\\Qlik\\Sense\\Extensions\\qlik-smart-pivot", + buildDestination: process.env.BUILD_PATH || defaultBuildDestination, mode: process.env.NODE_ENV || 'development', name: packageJSON.name, version: process.env.VERSION || 'local-dev', url: process.env.BUILD_URL || defaultBuildDestination, - port: process.env.PORT || 8090 + port: process.env.PORT || 8085 };