From 04aa8780da47bc345362b70559505a6af8b498d7 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard28 Date: Wed, 15 Feb 2023 16:39:30 +0100 Subject: [PATCH 1/7] feat: Make only variable bold and convert to markdown component. --- .../[code]/positief-geteste-mensen.tsx | 20 +++++++++---------- packages/cms/src/lokalize/key-mutations.csv | 2 ++ 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx index 09a3156ade..a33b65924f 100644 --- a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx +++ b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx @@ -66,8 +66,8 @@ export const getStaticProps = createGetStaticProps( }>((context) => { const { locale } = context; return `{ - "parts": ${getPagePartsQuery('positive_tests_page')}, - "elements": ${getElementsQuery('gm', ['tested_overall'], locale)} + "parts": ${getPagePartsQuery('positive_tests_page')}, + "elements": ${getElementsQuery('gm', ['tested_overall'], locale)} }`; })(context); return { @@ -219,18 +219,18 @@ function PositivelyTestedPeople(props: StaticProps) { description={ <> - - {replaceComponentsInText(textGm.map_last_value_text, { - infected_per_100k: {`${formatNumber(lastValue.infected_per_100k)}`}, + - - {replaceComponentsInText(textGm.map_safety_region_last_value_text, { - infected_per_100k: {`${formatNumber(vrData?.infected_per_100k)}`}, + /> + + /> } legend={{ diff --git a/packages/cms/src/lokalize/key-mutations.csv b/packages/cms/src/lokalize/key-mutations.csv index ced081f81c..4ed22cb224 100644 --- a/packages/cms/src/lokalize/key-mutations.csv +++ b/packages/cms/src/lokalize/key-mutations.csv @@ -9,3 +9,5 @@ timestamp,action,key,document_id,move_to 2023-02-10T14:27:20.288Z,add,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average__renamed,xjLKnlFrh2WM7l3TeFR9rD,__ 2023-02-10T14:27:20.295Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_infected_percentage,jF33EuwumlGuwav2FD3Zd6,__ 2023-02-10T14:27:20.301Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average,6s2ymgdY1hbg7zMfb8Z5wD,__ +2023-02-15T15:31:58.572Z,add,pages.positive_tests_page.gm.map_last_value_text__renamed,cQD0A3OGksV3pY6pYGz5LJ,__ +2023-02-15T15:31:59.442Z,add,pages.positive_tests_page.gm.map_safety_region_last_value_text__renamed,xjLKnlFrh2WM7l3TehfRNX,__ From c3bf5b67c35755b0d92a32e9a5faae1a8bec9a74 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard28 Date: Wed, 15 Feb 2023 16:47:52 +0100 Subject: [PATCH 2/7] feat: Delete old keys --- packages/cms/src/lokalize/key-mutations.csv | 2 ++ 1 file changed, 2 insertions(+) diff --git a/packages/cms/src/lokalize/key-mutations.csv b/packages/cms/src/lokalize/key-mutations.csv index 4ed22cb224..34097e48b9 100644 --- a/packages/cms/src/lokalize/key-mutations.csv +++ b/packages/cms/src/lokalize/key-mutations.csv @@ -11,3 +11,5 @@ timestamp,action,key,document_id,move_to 2023-02-10T14:27:20.301Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average,6s2ymgdY1hbg7zMfb8Z5wD,__ 2023-02-15T15:31:58.572Z,add,pages.positive_tests_page.gm.map_last_value_text__renamed,cQD0A3OGksV3pY6pYGz5LJ,__ 2023-02-15T15:31:59.442Z,add,pages.positive_tests_page.gm.map_safety_region_last_value_text__renamed,xjLKnlFrh2WM7l3TehfRNX,__ +2023-02-15T15:47:31.649Z,delete,pages.positive_tests_page.gm.map_last_value_text,Hpcrbv9k01wdsU0EheZaiI,__ +2023-02-15T15:47:31.651Z,delete,pages.positive_tests_page.gm.map_safety_region_last_value_text,0ztyMU2xVVOl2tFNiaUuSE,__ From 8b5c11d56e55117f653c0da533559049f5860db5 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard28 Date: Thu, 16 Feb 2023 11:16:56 +0100 Subject: [PATCH 3/7] feat: Revert addition of new keys. --- .../src/pages/gemeente/[code]/positief-geteste-mensen.tsx | 4 ++-- packages/cms/src/lokalize/key-mutations.csv | 6 ++---- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx index a33b65924f..dff0e3a551 100644 --- a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx +++ b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx @@ -220,13 +220,13 @@ function PositivelyTestedPeople(props: StaticProps) { <> Date: Thu, 16 Feb 2023 11:35:32 +0100 Subject: [PATCH 4/7] feat: One more conversion to markdown. --- .../pages/gemeente/[code]/positief-geteste-mensen.tsx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx index dff0e3a551..b80f4bf9a1 100644 --- a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx +++ b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx @@ -3,7 +3,7 @@ import { useState } from 'react'; import { GgdTesten } from '@corona-dashboard/icons'; import { GetStaticPropsContext } from 'next'; import { Box } from '~/components/base'; -import { Text, InlineText, BoldText } from '~/components/typography'; +import { Text } from '~/components/typography'; import { ChartTile, DynamicChoropleth, @@ -143,12 +143,12 @@ function PositivelyTestedPeople(props: StaticProps) { - - {replaceComponentsInText(textGm.infected_kpi.last_value_text, { - infected: {`${formatNumber(lastValue.infected)}`}, + + /> {textGm.infected_kpi.link_cta && } From 78db3c5e61f3e2df674e84b429ee3cff394298f6 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard28 Date: Thu, 16 Feb 2023 11:45:18 +0100 Subject: [PATCH 5/7] feat: removed key mutations. --- packages/cms/src/lokalize/key-mutations.csv | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/cms/src/lokalize/key-mutations.csv b/packages/cms/src/lokalize/key-mutations.csv index 61859d9604..ced081f81c 100644 --- a/packages/cms/src/lokalize/key-mutations.csv +++ b/packages/cms/src/lokalize/key-mutations.csv @@ -9,5 +9,3 @@ timestamp,action,key,document_id,move_to 2023-02-10T14:27:20.288Z,add,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average__renamed,xjLKnlFrh2WM7l3TeFR9rD,__ 2023-02-10T14:27:20.295Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_infected_percentage,jF33EuwumlGuwav2FD3Zd6,__ 2023-02-10T14:27:20.301Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average,6s2ymgdY1hbg7zMfb8Z5wD,__ -2023-02-16T10:12:52.969Z,delete,pages.positive_tests_page.gm.map_last_value_text__renamed,cQD0A3OGksV3pY6pYGz5LJ,__ -2023-02-16T10:12:52.970Z,delete,pages.positive_tests_page.gm.map_safety_region_last_value_text__renamed,xjLKnlFrh2WM7l3TehfRNX,__ From 3b7237894d16a26c67ccb176ddf68daf67cdb8df Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard28 Date: Fri, 17 Feb 2023 10:30:20 +0100 Subject: [PATCH 6/7] feat: Delete unused keys, remove barrel file imports --- .../[code]/positief-geteste-mensen.tsx | 38 +++++++++---------- packages/cms/src/lokalize/key-mutations.csv | 2 + 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx index b80f4bf9a1..619578e485 100644 --- a/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx +++ b/packages/app/src/pages/gemeente/[code]/positief-geteste-mensen.tsx @@ -1,36 +1,34 @@ import { colors, TimeframeOption, TimeframeOptionsList } from '@corona-dashboard/common'; -import { useState } from 'react'; import { GgdTesten } from '@corona-dashboard/icons'; import { GetStaticPropsContext } from 'next'; +import { useState } from 'react'; import { Box } from '~/components/base'; -import { Text } from '~/components/typography'; -import { - ChartTile, - DynamicChoropleth, - TwoKpiSection, - ChoroplethTile, - TimeSeriesChart, - TileList, - InView, - CollapsibleContent, - KpiTile, - KpiValue, - Markdown, - PageInformationBlock, -} from '~/components'; +import { ChartTile } from '~/components/chart-tile'; +import { DynamicChoropleth } from '~/components/choropleth'; +import { ChoroplethTile } from '~/components/choropleth-tile'; import { thresholds } from '~/components/choropleth/logic/thresholds'; -import { Layout, GmLayout } from '~/domain/layout'; +import { CollapsibleContent } from '~/components/collapsible/collapsible-content'; +import { InView } from '~/components/in-view'; +import { KpiTile } from '~/components/kpi-tile'; +import { KpiValue } from '~/components/kpi-value'; +import { Markdown } from '~/components/markdown'; +import { PageInformationBlock } from '~/components/page-information-block'; +import { TileList } from '~/components/tile-list'; +import { TimeSeriesChart } from '~/components/time-series-chart/time-series-chart'; +import { TwoKpiSection } from '~/components/two-kpi-section'; +import { Text } from '~/components/typography'; +import { GmLayout, Layout } from '~/domain/layout'; import { useIntl } from '~/intl'; import { Languages, SiteText } from '~/locale'; import { ElementsQueryResult, getElementsQuery, getTimelineEvents } from '~/queries/get-elements-query'; import { getArticleParts, getPagePartsQuery } from '~/queries/get-page-parts-query'; import { createGetStaticProps, StaticProps } from '~/static-props/create-get-static-props'; -import { createGetChoroplethData, createGetContent, getLastGeneratedDate, selectGmData, getLokalizeTexts } from '~/static-props/get-data'; +import { createGetChoroplethData, createGetContent, getLastGeneratedDate, getLokalizeTexts, selectGmData } from '~/static-props/get-data'; import { filterByRegionMunicipalities } from '~/static-props/utils/filter-by-region-municipalities'; import { ArticleParts, PagePartQueryResult } from '~/types/cms'; -import { replaceComponentsInText, replaceVariablesInText, getVrForMunicipalityCode, useReverseRouter } from '~/utils'; -import { getLastInsertionDateOfPage } from '~/utils/get-last-insertion-date-of-page'; +import { getVrForMunicipalityCode, replaceComponentsInText, replaceVariablesInText, useReverseRouter } from '~/utils'; import { useDynamicLokalizeTexts } from '~/utils/cms/use-dynamic-lokalize-texts'; +import { getLastInsertionDateOfPage } from '~/utils/get-last-insertion-date-of-page'; export { getStaticPaths } from '~/static-paths/gm'; diff --git a/packages/cms/src/lokalize/key-mutations.csv b/packages/cms/src/lokalize/key-mutations.csv index ced081f81c..fd421eb1ab 100644 --- a/packages/cms/src/lokalize/key-mutations.csv +++ b/packages/cms/src/lokalize/key-mutations.csv @@ -9,3 +9,5 @@ timestamp,action,key,document_id,move_to 2023-02-10T14:27:20.288Z,add,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average__renamed,xjLKnlFrh2WM7l3TeFR9rD,__ 2023-02-10T14:27:20.295Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_infected_percentage,jF33EuwumlGuwav2FD3Zd6,__ 2023-02-10T14:27:20.301Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average,6s2ymgdY1hbg7zMfb8Z5wD,__ +2023-02-17T09:24:14.946Z,delete,pages.positive_tests_page.gm.map_last_value_text__renamed,cQD0A3OGksV3pY6pYGz5LJ,__ +2023-02-17T09:24:14.948Z,delete,pages.positive_tests_page.gm.map_safety_region_last_value_text__renamed,xjLKnlFrh2WM7l3TehfRNX,__ From 45ae0efc51b9fe3b1ef7afbcf12e3df682d1744a Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard28 Date: Fri, 17 Feb 2023 11:44:39 +0100 Subject: [PATCH 7/7] feat: Remove mutations, again. --- packages/cms/src/lokalize/key-mutations.csv | 2 -- 1 file changed, 2 deletions(-) diff --git a/packages/cms/src/lokalize/key-mutations.csv b/packages/cms/src/lokalize/key-mutations.csv index fd421eb1ab..ced081f81c 100644 --- a/packages/cms/src/lokalize/key-mutations.csv +++ b/packages/cms/src/lokalize/key-mutations.csv @@ -9,5 +9,3 @@ timestamp,action,key,document_id,move_to 2023-02-10T14:27:20.288Z,add,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average__renamed,xjLKnlFrh2WM7l3TeFR9rD,__ 2023-02-10T14:27:20.295Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_infected_percentage,jF33EuwumlGuwav2FD3Zd6,__ 2023-02-10T14:27:20.301Z,delete,pages.positive_tests_page.shared.tooltip_labels.ggd_tested_total_moving_average,6s2ymgdY1hbg7zMfb8Z5wD,__ -2023-02-17T09:24:14.946Z,delete,pages.positive_tests_page.gm.map_last_value_text__renamed,cQD0A3OGksV3pY6pYGz5LJ,__ -2023-02-17T09:24:14.948Z,delete,pages.positive_tests_page.gm.map_safety_region_last_value_text__renamed,xjLKnlFrh2WM7l3TehfRNX,__