Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unclear 'show no data' [v39] #3230

Merged
merged 6 commits into from
Jun 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions cypress/elements/file_menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
2 changes: 2 additions & 0 deletions cypress/integration/filemenu.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ describe('File menu', () => {
url: /\/maps/,
}).as('deleteMap');

cy.getByDataTest('layercard').should('not.contain', 'Loading layer...')

deleteMap();

cy.wait('@deleteMap')
Expand Down
9 changes: 4 additions & 5 deletions cypress/integration/interpretations.cy.js
Original file line number Diff line number Diff line change
Expand Up @@ -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');
});
});
12 changes: 6 additions & 6 deletions i18n/en.pot
Original file line number Diff line number Diff line change
Expand Up @@ -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-04T09:13:34.373Z\n"
"PO-Revision-Date: 2024-06-04T09:13:34.373Z\n"

msgid "Maps"
msgstr ""
Expand Down Expand Up @@ -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"
Expand Down Expand Up @@ -605,6 +605,9 @@ msgstr ""
msgid "Parent unit"
msgstr ""

msgid "No data"
msgstr ""

msgid "Last updated"
msgstr ""

Expand Down Expand Up @@ -1285,9 +1288,6 @@ msgstr ""
msgid "Thematic layer"
msgstr ""

msgid "No data"
msgstr ""

msgid "Tracked entity"
msgstr ""

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -149,4 +149,4 @@
}
}
}
}
}
2 changes: 1 addition & 1 deletion src/components/edit/thematic/NoDataColor.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const NoDataColor = ({ value, onChange, className }) => {
return (
<div className={className}>
<Checkbox
label={i18n.t('Show no data')}
label={i18n.t('Include org units with no data')}
checked={!!value}
onChange={onCheck}
className={styles.checkbox}
Expand Down
2 changes: 1 addition & 1 deletion src/components/map/layers/ThematicLayer.js
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ class ThematicLayer extends Layer {
<div>{indicator}</div>
<div>{periodName}</div>
<div>
{i18n.t('Value')}: {value}
{i18n.t('Value')}: {value ? value : i18n.t('No data')}
</div>
{aggregationType && aggregationType !== 'DEFAULT' && (
<div>{aggregationType}</div>
Expand Down
1 change: 1 addition & 0 deletions src/components/map/mapLocale.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading