From 557cd1aeb6752ddca0733ed127c9b039cc71acb8 Mon Sep 17 00:00:00 2001 From: Kristoffer Lind Date: Fri, 22 Feb 2019 14:46:43 +0100 Subject: [PATCH 1/3] remove some duplicated css --- src/data-table/data-cell.jsx | 2 +- src/main.less | 13 ------------- 2 files changed, 1 insertion(+), 14 deletions(-) diff --git a/src/data-table/data-cell.jsx b/src/data-table/data-cell.jsx index cae3f2f..c4af9b2 100644 --- a/src/data-table/data-cell.jsx +++ b/src/data-table/data-cell.jsx @@ -98,7 +98,7 @@ class DataCell extends React.PureComponent { const { semaphoreColors, semaphoreColors: { fieldsToApplyTo } } = styling; const isValidSemaphoreValue = !styleBuilder.hasComments() && !isNaN(measurement.value); - const shouldHaveSemaphoreColors = fieldsToApplyTo.applyToMetric && (fieldsToApplyTo.applyToAll || fieldsToApplyTo.specificFields.indexOf(measurement.name) !== -1); + const shouldHaveSemaphoreColors = (fieldsToApplyTo.applyToMetric || fieldsToApplyTo.specificFields.indexOf(measurement.parents.dimension1.header) !== -1); let cellStyle; if (isValidSemaphoreValue && shouldHaveSemaphoreColors) { const { backgroundColor, color } = getSemaphoreColors(measurement, semaphoreColors); diff --git a/src/main.less b/src/main.less index 4aff974..8d47fac 100644 --- a/src/main.less +++ b/src/main.less @@ -204,13 +204,6 @@ width: 350px; } - /* popups for headers */ - .header-wrapper { - position: absolute; - top: 0; - z-index: 1; - } - .tooltip { position: fixed !important; color: rgb(70, 70, 70); @@ -219,12 +212,6 @@ border: groove; } - .row-wrapper { - height: calc(~"100% - 97px"); - padding: 0; - margin-top: 0; - } - .kpi-table .fdim-cells, .data-table td { line-height: 1em !important; From f99281ff4783be84c2db93c9c3e8f774f6e6a222 Mon Sep 17 00:00:00 2001 From: Kristoffer Lind Date: Fri, 22 Feb 2019 15:10:07 +0100 Subject: [PATCH 2/3] hide scrollbars in firefox --- src/main.less | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main.less b/src/main.less index 8d47fac..31425c1 100644 --- a/src/main.less +++ b/src/main.less @@ -267,6 +267,8 @@ .kpi-table .row-wrapper, .data-table .header-wrapper, .data-table .row-wrapper { + /* stylelint-disable-next-line property-no-unknown */ + scrollbar-width: none; -ms-overflow-style: none; // IE 10+ -moz-overflow: -moz-scrollbars-none; // Firefox From 730517504992651756bf290aaf09485bffde182a Mon Sep 17 00:00:00 2001 From: Kristoffer Lind Date: Fri, 22 Feb 2019 15:26:59 +0100 Subject: [PATCH 3/3] fix semaphore alignment --- src/data-table/data-cell.jsx | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/src/data-table/data-cell.jsx b/src/data-table/data-cell.jsx index c4af9b2..adf59de 100644 --- a/src/data-table/data-cell.jsx +++ b/src/data-table/data-cell.jsx @@ -96,18 +96,25 @@ class DataCell extends React.PureComponent { textAlignment = textAlignmentProp; } + let cellStyle = { + fontFamily: styling.options.fontFamily, + ...styleBuilder.getStyle(), + paddingLeft: '5px', + textAlign: textAlignment + + }; + const { semaphoreColors, semaphoreColors: { fieldsToApplyTo } } = styling; const isValidSemaphoreValue = !styleBuilder.hasComments() && !isNaN(measurement.value); const shouldHaveSemaphoreColors = (fieldsToApplyTo.applyToMetric || fieldsToApplyTo.specificFields.indexOf(measurement.parents.dimension1.header) !== -1); - let cellStyle; if (isValidSemaphoreValue && shouldHaveSemaphoreColors) { const { backgroundColor, color } = getSemaphoreColors(measurement, semaphoreColors); cellStyle = { + ...styleBuilder.getStyle(), backgroundColor, color, fontFamily: styling.options.fontFamily, - ...styleBuilder.getStyle(), - paddingLeft: '4px', + paddingLeft: '5px', textAlign: textAlignment }; }