From 1284e3a22ca03200dd14d41375e8e61b702ca933 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 23 Aug 2024 15:11:26 -0500 Subject: [PATCH 1/4] CE-1643 change default operator for DATEs to be equals --- src/qqq/components/query/BasicAndAdvancedQueryControls.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qqq/components/query/BasicAndAdvancedQueryControls.tsx b/src/qqq/components/query/BasicAndAdvancedQueryControls.tsx index f5d82c8..06ef0d6 100644 --- a/src/qqq/components/query/BasicAndAdvancedQueryControls.tsx +++ b/src/qqq/components/query/BasicAndAdvancedQueryControls.tsx @@ -183,7 +183,7 @@ const BasicAndAdvancedQueryControls = forwardRef((props: BasicAndAdvancedQueryCo { // todo - sometimes i want contains instead of equals on strings (client.name, for example...) let defaultOperator = field?.possibleValueSourceName ? QCriteriaOperator.IN : QCriteriaOperator.EQUALS; - if (field?.type == QFieldType.DATE_TIME || field?.type == QFieldType.DATE) + if (field?.type == QFieldType.DATE_TIME) { defaultOperator = QCriteriaOperator.GREATER_THAN; } From 128a748b63a72a2c2ecd0e2390174c7044ca137d Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 23 Aug 2024 15:11:52 -0500 Subject: [PATCH 2/4] CE-1643 Add fontVariantNumeric: "tabular-nums" to the thing with numbers that count up, so it's awesome. --- src/qqq/components/query/EvaluatedExpression.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qqq/components/query/EvaluatedExpression.tsx b/src/qqq/components/query/EvaluatedExpression.tsx index 23c3065..17126e3 100644 --- a/src/qqq/components/query/EvaluatedExpression.tsx +++ b/src/qqq/components/query/EvaluatedExpression.tsx @@ -50,7 +50,7 @@ export function EvaluatedExpression({field, expression}: EvaluatedExpressionProp return () => clearInterval(interval); }, []); - return <>{`${evaluateExpression(timeForEvaluations, field, expression)}`}; + return {`${evaluateExpression(timeForEvaluations, field, expression)}`}; } const HOUR_MS = 60 * 60 * 1000; From 2cc7e9ebe140bfd764ff9b84a16f87825aee95c3 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Fri, 23 Aug 2024 15:13:44 -0500 Subject: [PATCH 3/4] CE-1643 Add a timezone conversion to the formatDate function for the case where it took a string rather than a Date as input, in which case, the new Date() call would be appying a timezone, and making us off-by-one (for some side of the prime merdian i think) --- src/qqq/utils/qqq/ValueUtils.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/qqq/utils/qqq/ValueUtils.tsx b/src/qqq/utils/qqq/ValueUtils.tsx index e5a9c55..7d29f63 100644 --- a/src/qqq/utils/qqq/ValueUtils.tsx +++ b/src/qqq/utils/qqq/ValueUtils.tsx @@ -268,7 +268,15 @@ class ValueUtils { if (!(date instanceof Date)) { + //////////////////////////////////////////////////////////////////////////////////// + // so, a new Date here will interpret the string as being at midnight UTC, but // + // the data object will be in the user/browser timezone. // + // so "2024-08-22", for a user in US/Central, will be "2024-08-21T19:00:00-0500". // + // correct for that by adding the date's timezone offset (converted from minutes // + // to millis) back to it // + //////////////////////////////////////////////////////////////////////////////////// date = new Date(date); + date.setTime(date.getTime() + date.getTimezoneOffset() * 60 * 1000) } // @ts-ignore return (`${date.toString("yyyy-MM-dd")}`); From e839da6123930c0a19c7eef9913a0afd6dfe71f7 Mon Sep 17 00:00:00 2001 From: Darin Kelkhoff Date: Thu, 29 Aug 2024 16:03:26 -0500 Subject: [PATCH 4/4] CE-1405 - Put margin-left on this, so if its used in a big number block, and it wraps, it does right, i think --- src/qqq/components/widgets/blocks/UpOrDownNumberBlock.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/qqq/components/widgets/blocks/UpOrDownNumberBlock.tsx b/src/qqq/components/widgets/blocks/UpOrDownNumberBlock.tsx index 20e0106..68e6490 100644 --- a/src/qqq/components/widgets/blocks/UpOrDownNumberBlock.tsx +++ b/src/qqq/components/widgets/blocks/UpOrDownNumberBlock.tsx @@ -58,7 +58,7 @@ export default function UpOrDownNumberBlock({widgetMetaData, data}: StandardBloc return ( <> -
+