Skip to content

Commit

Permalink
fix: loader alert messages were being duplicated (#2796)
Browse files Browse the repository at this point in the history
Fixes: https://dhis2.atlassian.net/browse/DHIS2-15438

The alerts were duplicated because there was both an internal alert stack/bar
system as well as the built in one from app-runtime. Solution was to remove
the internal alert stack/bar. This meant that the alerts coming from the layer
loaders had to be refactored so that loader alerts are no longer are added to redux.
Instead the component LayerLoaders use the app-runtime hook (useAlert).

Other changes:

skipPluginLogic: true has been added to d2.config.js because of the cli-app-scripts upgrade.
Previously we had set a resolution for the dependency to workaround this bug: https://dhis2.atlassian.net/browse/DHIS2-16916.
Now, we can remove the resolution as long as we include this config.
  • Loading branch information
jenniferarnesen committed Jul 30, 2024
1 parent f76808b commit 69776ad
Show file tree
Hide file tree
Showing 26 changed files with 802 additions and 892 deletions.
2 changes: 2 additions & 0 deletions d2.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ const config = {
},

coreApp: true,

skipPluginLogic: true,
}

module.exports = config
40 changes: 20 additions & 20 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-06-04T09:11:11.417Z\n"
"PO-Revision-Date: 2024-06-04T09:11:11.417Z\n"
"POT-Creation-Date: 2024-07-29T08:57:17.532Z\n"
"PO-Revision-Date: 2024-07-29T08:57:17.534Z\n"

msgid "Untitled map, {{date}}"
msgstr "Untitled map, {{date}}"
Expand Down Expand Up @@ -642,6 +642,18 @@ msgstr "Filters"
msgid "{{layername}}: {{message}}"
msgstr "{{layername}}: {{message}}"

msgid "No data found"
msgstr "No data found"

msgid "Selected org units: No coordinates found"
msgstr "Selected org units: No coordinates found"

msgid "No coordinates found"
msgstr "No coordinates found"

msgid "Error"
msgstr "Error"

msgid "Drill up one level"
msgstr "Drill up one level"

Expand Down Expand Up @@ -1308,14 +1320,8 @@ msgstr "Financial year (Start April)"
msgid "Cancelled"
msgstr "Cancelled"

msgid "{{name}}: No coordinates found"
msgstr "{{name}}: No coordinates found"

msgid "Selected org units: No coordinates found"
msgstr "Selected org units: No coordinates found"

msgid "Error: {{message}}"
msgstr "Error: {{message}}"
msgid "Earth Engine layer"
msgstr "Earth Engine layer"

msgid "You don't have access to this layer data"
msgstr "You don't have access to this layer data"
Expand All @@ -1329,17 +1335,14 @@ msgstr "An unknown error occurred while reading layer data"
msgid "Displaying first {{pageSize}} events out of {{total}}"
msgstr "Displaying first {{pageSize}} events out of {{total}}"

msgid "No data found"
msgstr "No data found"

msgid "Event"
msgstr "Event"

msgid "Facilities"
msgstr "Facilities"

msgid "Facilities: No coordinates found"
msgstr "Facilities: No coordinates found"
msgid "No coordinates found for selected facilities"
msgstr "No coordinates found for selected facilities"

msgid "There was a problem with this layer. Contact a system administrator."
msgstr "There was a problem with this layer. Contact a system administrator."
Expand All @@ -1359,18 +1362,15 @@ msgstr "Point"
msgid "Organisation units"
msgstr "Organisation units"

msgid "Error"
msgstr "Error"
msgid "Org unit layer"
msgstr "Org unit layer"

msgid "Thematic layer"
msgstr "Thematic layer"

msgid "Tracked entity"
msgstr "Tracked entity"

msgid "No tracked entities found"
msgstr "No tracked entities found"

msgid "related"
msgstr "related"

Expand Down
12 changes: 2 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"postinstall": "patch-package"
},
"devDependencies": {
"@dhis2/cli-app-scripts": "10.3.11",
"@dhis2/cli-app-scripts": "11.6.1",
"@dhis2/cli-style": "^10.5.1",
"@dhis2/cypress-commands": "^10.0.3",
"@dhis2/cypress-plugins": "^10.0.3",
Expand All @@ -38,13 +38,10 @@
},
"dependencies": {
"@dhis2/analytics": "^26.7.5",
"@dhis2/app-runtime": "3.9.4",
"@dhis2/app-runtime": "^3.10.5",
"@dhis2/app-runtime-adapter-d2": "^1.1.0",
"@dhis2/app-service-alerts": "3.9.4",
"@dhis2/app-service-datastore": "^1.0.0-beta.3",
"@dhis2/d2-i18n": "^1.1.3",
"@dhis2/maps-gl": "^3.9.2",
"@dhis2/ui": "^9.2.0",
"@krakenjs/post-robot": "^11.0.0",
"@reportportal/agent-js-cypress": "git+https://github.com/dhis2/agent-js-cypress.git#develop",
"@reportportal/agent-js-jest": "^5.0.7",
Expand Down Expand Up @@ -80,10 +77,5 @@
"redux-thunk": "^2.4.2",
"styled-jsx": "^4.0.1",
"url-polyfill": "^1.1.12"
},
"resolutions": {
"@dhis2/ui": "^9.2.0",
"@dhis2/app-runtime": "3.9.4",
"@dhis2/app-service-alerts": "3.9.4"
}
}
57 changes: 0 additions & 57 deletions src/components/alerts/AlertStack.js

This file was deleted.

154 changes: 0 additions & 154 deletions src/components/alerts/__tests__/AlertStack.spec.js

This file was deleted.

Loading

0 comments on commit 69776ad

Please sign in to comment.