From 4cd0be05f43ec9ddbd477adc997f7b337e0ba0a7 Mon Sep 17 00:00:00 2001 From: braimbault Date: Mon, 3 Jun 2024 17:46:14 +0200 Subject: [PATCH 1/6] fix: unclear 'show no data' --- i18n/en.pot | 12 ++++++------ src/components/edit/thematic/NoDataColor.js | 2 +- src/components/map/layers/ThematicLayer.js | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 1979ff1ce..818dadab8 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-05-16T08:31:58.810Z\n" -"PO-Revision-Date: 2024-05-16T08:31:58.810Z\n" +"POT-Creation-Date: 2024-06-03T15:34:31.145Z\n" +"PO-Revision-Date: 2024-06-03T15:34:31.145Z\n" msgid "Maps" msgstr "" @@ -315,7 +315,7 @@ msgstr "" msgid "Only show completed events" msgstr "" -msgid "Show no data" +msgid "Include org. units with no data" msgstr "" msgid "Low radius" @@ -605,6 +605,9 @@ msgstr "" msgid "Parent unit" msgstr "" +msgid "No data" +msgstr "" + msgid "Last updated" msgstr "" @@ -1285,9 +1288,6 @@ msgstr "" msgid "Thematic layer" msgstr "" -msgid "No data" -msgstr "" - msgid "Tracked entity" msgstr "" diff --git a/src/components/edit/thematic/NoDataColor.js b/src/components/edit/thematic/NoDataColor.js index cb4be70b2..ef218ba70 100644 --- a/src/components/edit/thematic/NoDataColor.js +++ b/src/components/edit/thematic/NoDataColor.js @@ -14,7 +14,7 @@ const NoDataColor = ({ value, onChange, className }) => { return (
{indicator}
{periodName}
- {i18n.t('Value')}: {value} + {i18n.t('Value')}: {value ? value : i18n.t('No data')}
{aggregationType && aggregationType !== 'DEFAULT' && (
{aggregationType}
From ae98cbe1f052787c468a3fcb23a9e9d7c1b00450 Mon Sep 17 00:00:00 2001 From: braimbault Date: Tue, 4 Jun 2024 11:14:11 +0200 Subject: [PATCH 2/6] fix: removed period for consistency --- i18n/en.pot | 6 +++--- src/components/edit/thematic/NoDataColor.js | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/i18n/en.pot b/i18n/en.pot index 818dadab8..aeb2c5094 100644 --- a/i18n/en.pot +++ b/i18n/en.pot @@ -5,8 +5,8 @@ msgstr "" "Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n != 1)\n" -"POT-Creation-Date: 2024-06-03T15:34:31.145Z\n" -"PO-Revision-Date: 2024-06-03T15:34:31.145Z\n" +"POT-Creation-Date: 2024-06-04T09:13:34.373Z\n" +"PO-Revision-Date: 2024-06-04T09:13:34.373Z\n" msgid "Maps" msgstr "" @@ -315,7 +315,7 @@ msgstr "" msgid "Only show completed events" msgstr "" -msgid "Include org. units with no data" +msgid "Include org units with no data" msgstr "" msgid "Low radius" diff --git a/src/components/edit/thematic/NoDataColor.js b/src/components/edit/thematic/NoDataColor.js index ef218ba70..cb9ecf7cb 100644 --- a/src/components/edit/thematic/NoDataColor.js +++ b/src/components/edit/thematic/NoDataColor.js @@ -14,7 +14,7 @@ const NoDataColor = ({ value, onChange, className }) => { return (
Date: Tue, 4 Jun 2024 14:48:35 +0200 Subject: [PATCH 3/6] fix: handle translation in maps-gl --- src/components/map/mapLocale.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/components/map/mapLocale.js b/src/components/map/mapLocale.js index 5bd901a14..bd46744ef 100644 --- a/src/components/map/mapLocale.js +++ b/src/components/map/mapLocale.js @@ -19,6 +19,7 @@ const getMapLocale = () => ({ km: i18n.t('km'), 'Measure distances and areas': i18n.t('Measure distances and areas'), mi: i18n.t('mi'), + 'No data': i18n.t('No data'), Perimeter: i18n.t('Perimeter'), 'Reset bearing to north': i18n.t('Reset bearing to north'), 'Search for place or address': i18n.t('Search for place or address'), From 5462d30423f835f1bb81e99871f9427c2079c499 Mon Sep 17 00:00:00 2001 From: braimbault Date: Thu, 6 Jun 2024 16:05:20 +0200 Subject: [PATCH 4/6] fix: maps-gl upgrade --- package.json | 4 ++-- yarn.lock | 8 ++++---- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 44d788a81..29039c02b 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "@dhis2/d2-ui-core": "^7.4.0", "@dhis2/d2-ui-org-unit-dialog": "^7.4.0", "@dhis2/d2-ui-org-unit-tree": "^7.4.0", - "@dhis2/maps-gl": "^3.8.3", + "@dhis2/maps-gl": "^3.9.2", "@dhis2/ui": "^8.4.13", "abortcontroller-polyfill": "^1.7.3", "array-move": "^4.0.0", @@ -149,4 +149,4 @@ } } } -} +} \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 3267b4472..a691e872f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2083,10 +2083,10 @@ markdown-it "^8.4.2" prop-types "^15.6.2" -"@dhis2/maps-gl@^3.8.3": - version "3.8.3" - resolved "https://registry.yarnpkg.com/@dhis2/maps-gl/-/maps-gl-3.8.3.tgz#05038dfc95895080c04ad8e6e8c325654a58996e" - integrity sha512-Qss5VQBOwjrB+C/D1qC9DfI5TYGog2JRk7q3+F+zm62QDMgJZz6/P+JJ5NkSI7hl2hf9AAV3WwHyTV2SuPLf2Q== +"@dhis2/maps-gl@^3.9.2": + version "3.9.2" + resolved "https://registry.yarnpkg.com/@dhis2/maps-gl/-/maps-gl-3.9.2.tgz#510a7d0f91bfbbdc6139283c8269506e3680bdc3" + integrity sha512-AJQ8Q2qKiZ6+ieaiM7qdsZ5tjIEdUQKp/zCQoUaTpmgOPB86sM2BYV1fJ8tvSSqHU4Wo7jyoEoNku1zbpCQZRQ== dependencies: "@mapbox/sphericalmercator" "^1.2.0" "@turf/area" "^6.5.0" From c69f2924b61b71929b36d44611578fd2fb68e7ad Mon Sep 17 00:00:00 2001 From: braimbault Date: Fri, 7 Jun 2024 12:47:09 +0200 Subject: [PATCH 5/6] chore: delete map cypress test update --- cypress/elements/file_menu.js | 1 + cypress/integration/filemenu.cy.js | 2 ++ 2 files changed, 3 insertions(+) diff --git a/cypress/elements/file_menu.js b/cypress/elements/file_menu.js index 8021926f8..64999302f 100644 --- a/cypress/elements/file_menu.js +++ b/cypress/elements/file_menu.js @@ -91,6 +91,7 @@ export const deleteMap = () => { cy.getByDataTest('file-menu-container').should('be.visible'); cy.getByDataTest('file-menu-delete') + .should('not.have.class', 'disabled') .should('be.visible') .click(); diff --git a/cypress/integration/filemenu.cy.js b/cypress/integration/filemenu.cy.js index 05eb27f97..562d522a1 100644 --- a/cypress/integration/filemenu.cy.js +++ b/cypress/integration/filemenu.cy.js @@ -185,6 +185,8 @@ describe('File menu', () => { url: /\/maps/, }).as('deleteMap'); + cy.getByDataTest('layercard').should('not.contain', 'Loading layer...') + deleteMap(); cy.wait('@deleteMap') From 4bf32e37e11926729d987e29ff7689892e4f2dd5 Mon Sep 17 00:00:00 2001 From: braimbault Date: Fri, 7 Jun 2024 13:30:39 +0200 Subject: [PATCH 6/6] chore: interpretations cypress test update --- cypress/integration/interpretations.cy.js | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/cypress/integration/interpretations.cy.js b/cypress/integration/interpretations.cy.js index 043920c3a..b664552bd 100644 --- a/cypress/integration/interpretations.cy.js +++ b/cypress/integration/interpretations.cy.js @@ -20,10 +20,9 @@ context('Interpretations', () => { 'Write an interpretation' ); - cy.get('p') - .contains( - 'Koinadugu has a very high LLITN coverage despite low density of facilities providing nets.' - ) - .should('be.visible'); + cy.contains( + 'p', + 'Koinadugu has a very high LLITN coverage despite low density of facilities providing nets.' + ).should('be.visible'); }); });