From 3651a716531dee8064a44c1771d74a55d6f3e4e1 Mon Sep 17 00:00:00 2001 From: "@dhis2-bot" Date: Sun, 21 Apr 2024 03:37:29 +0200 Subject: [PATCH 1/3] fix(translations): sync translations from transifex (dev) Automatically merged. --- i18n/zh.po | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/i18n/zh.po b/i18n/zh.po index 34f81342e..8b5760236 100644 --- a/i18n/zh.po +++ b/i18n/zh.po @@ -83,10 +83,10 @@ msgid "Filters not applied" msgstr "未应用过滤器" msgid "Only Period and Organisation unit filters can be applied to this item" -msgstr "" +msgstr "仅可对此项应用期间和组织机构过滤器" msgid "Some filters not applied" -msgstr "" +msgstr "某些过滤器未应用" msgid "There was a problem loading this dashboard item" msgstr "载入仪表盘有问题" From c0fc1d68b3fae20c1dcd3e5912a26e745fb015cb Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Tue, 23 Apr 2024 13:46:55 +0200 Subject: [PATCH 2/3] fix: short name was not being shown in visualizations (#2959) Fixes: https://dhis2.atlassian.net/browse/DHIS2-12499 The plugin was changed and now just directly uses the value of the displayProperty. Analytics requests expects 'name' or 'shortName'. Meanwhile, fetching dimensions and dimensionItems still expects 'displayName' or 'displayShortName'. --- .../Visualization/IframePlugin.js | 2 +- src/components/UserSettingsProvider.js | 7 +++++-- src/modules/useDimensions.js | 16 +++++++++------- src/pages/view/TitleBar/FilterDialog.js | 4 +--- 4 files changed, 16 insertions(+), 13 deletions(-) diff --git a/src/components/Item/VisualizationItem/Visualization/IframePlugin.js b/src/components/Item/VisualizationItem/Visualization/IframePlugin.js index 79ba21c38..545cf3af2 100644 --- a/src/components/Item/VisualizationItem/Visualization/IframePlugin.js +++ b/src/components/Item/VisualizationItem/Visualization/IframePlugin.js @@ -66,7 +66,7 @@ const IframePlugin = ({ () => ({ isVisualizationLoaded: true, forDashboard: true, - displayProperty: userSettings.displayProperty, + displayProperty: userSettings.keyAnalysisDisplayProperty, visualization, onError, diff --git a/src/components/UserSettingsProvider.js b/src/components/UserSettingsProvider.js index 393a9eb31..1be994286 100644 --- a/src/components/UserSettingsProvider.js +++ b/src/components/UserSettingsProvider.js @@ -17,11 +17,14 @@ const UserSettingsProvider = ({ children }) => { setSettings({ ...userSettings, - displayProperty: userSettings.keyAnalysisDisplayProperty, + displayProperty: + userSettings.keyAnalysisDisplayProperty === 'name' + ? 'displayName' + : 'displayShortName', }) } fetchData() - }, []) + }, [engine]) return ( { try { const unfilteredDimensions = await apiFetchDimensions( dataEngine, - userSettings.keyAnalysisDisplayProperty + userSettings.displayProperty ) dispatch( @@ -28,14 +28,16 @@ const useDimensions = (doFetch) => { } } - if ( - !dimensions.length && - doFetch && - userSettings.keyAnalysisDisplayProperty - ) { + if (!dimensions.length && doFetch && userSettings.displayProperty) { fetchDimensions() } - }, [dimensions, doFetch, userSettings.keyAnalysisDisplayProperty]) + }, [ + dimensions, + doFetch, + userSettings.displayProperty, + dispatch, + dataEngine, + ]) return dimensions } diff --git a/src/pages/view/TitleBar/FilterDialog.js b/src/pages/view/TitleBar/FilterDialog.js index 0cb807089..10e15b1aa 100644 --- a/src/pages/view/TitleBar/FilterDialog.js +++ b/src/pages/view/TitleBar/FilterDialog.js @@ -119,9 +119,7 @@ const FilterDialog = ({ dimensionId={dimension.id} onSelect={onSelectItems} dimensionTitle={dimension.name} - displayNameProp={ - userSettings.keyAnalysisDisplayProperty - } + displayNameProp={userSettings.displayProperty} /> ) } From 783399eb916556d1fe5723af1781d2e3c74e6f18 Mon Sep 17 00:00:00 2001 From: Jen Jones Arnesen Date: Wed, 24 Apr 2024 14:10:05 +0200 Subject: [PATCH 3/3] fix: in paragraphs were removed in dashboard item description (#2962) If a dashboard item description contained newlines (paragraphs), they were being removed when displaying the visualization description --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 1ba81f022..d435cd25f 100644 --- a/package.json +++ b/package.json @@ -5,7 +5,7 @@ "private": true, "license": "BSD-3-Clause", "dependencies": { - "@dhis2/analytics": "^26.6.0", + "@dhis2/analytics": "^26.6.5", "@dhis2/app-runtime": "^3.10.2", "@dhis2/app-runtime-adapter-d2": "^1.1.0", "@dhis2/d2-i18n": "^1.1.3", diff --git a/yarn.lock b/yarn.lock index 782de9e17..1ed96ddc8 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2245,10 +2245,10 @@ classnames "^2.3.1" prop-types "^15.7.2" -"@dhis2/analytics@^26.6.0": - version "26.6.0" - resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.0.tgz#1d70463fca8a4d5f5838928e9ab6c5c07873715f" - integrity sha512-fO8ozVfnTulXQptPcT3W/y+Ru6sN/Qjhr6dWHL4LsG2siL1v8QOWKcnM/yScClJtRZvsbEnQ6vX47c7ujRsGUA== +"@dhis2/analytics@^26.6.5": + version "26.6.5" + resolved "https://registry.yarnpkg.com/@dhis2/analytics/-/analytics-26.6.5.tgz#44ee29a279c37f3969096d859bc0f07d953e3f42" + integrity sha512-ob6kNEEkIAC50RtKuUZWi8Y04uwsPHK/EiYhzxZkSOdS5wFm8X+88KZrD//fILXQjwMhJvl/4+F/T0qVxOF/jQ== dependencies: "@dhis2/d2-ui-rich-text" "^7.4.1" "@dhis2/multi-calendar-dates" "1.0.0"