Skip to content

Commit

Permalink
fix: plugin loading performance [patch/2.40.0] (#2294)
Browse files Browse the repository at this point in the history
* fix: consolidate legacy and default plugin and fix resizing (#2254) (#2268)

* fix: consolidate legacy and default plugin and fix ER/EV resizing

* fix: show offline message on EE maps

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* fix: fix props handling when switching Map <-> DV plugins (#2272)

* feat(iframe-plugin): wait to load plugins from cache to save network [DHIS2-15097] (#2285)

* feat(iframe-plugin): receive pwa installation status from plugins

* chore: add todos

* fix: wait to render until the first item of the type has gotten the plugin

* fix: add property to the top-most item of each iframe plugin type

* fix: dont use the <Layer> component

* chore: cli-app-scripts upgrade

* fix: remove unused var

* refactor: combine loops

---------

Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>

* fix: disable ll plugin if it doesnt support installationStatus

* fix: clean up and lint

* fix: handle case where LL is not installed

* fix: center spinner

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>
Co-authored-by: Edoardo Sabadelli <edoardo@dhis2.org>
Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>
  • Loading branch information
4 people authored May 3, 2023
1 parent e4861e3 commit 3efe9aa
Show file tree
Hide file tree
Showing 27 changed files with 1,012 additions and 448 deletions.
26 changes: 13 additions & 13 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: 2023-02-14T12:38:49.529Z\n"
"PO-Revision-Date: 2023-02-14T12:38:49.529Z\n"
"POT-Creation-Date: 2023-05-03T11:08:21.315Z\n"
"PO-Revision-Date: 2023-05-03T11:08:21.315Z\n"

msgid "Untitled dashboard"
msgstr "Untitled dashboard"
Expand Down Expand Up @@ -101,15 +101,6 @@ msgstr "View as Map"
msgid "There was a problem loading interpretations for this item"
msgstr "There was a problem loading interpretations for this item"

msgid "Maps with Earth Engine layers cannot be displayed when offline"
msgstr "Maps with Earth Engine layers cannot be displayed when offline"

msgid "The plugin for rendering this item is not available"
msgstr "The plugin for rendering this item is not available"

msgid "Install the {{appName}} app from the App Hub"
msgstr "Install the {{appName}} app from the App Hub"

msgid "The plugin for rendering this item is not available"
msgstr "The plugin for rendering this item is not available"

Expand All @@ -119,12 +110,21 @@ msgstr "Install the {{appName}} app from the App Hub"
msgid "No data to display"
msgstr "No data to display"

msgid "Filters are not applied to line list dashboard items."
msgstr "Filters are not applied to line list dashboard items."
msgid ""
"Install Line Listing app version ${minLLVersion.join(\n"
" '.'\n"
" )} or higher in order to display this item."
msgstr ""
"Install Line Listing app version ${minLLVersion.join(\n"
" '.'\n"
" )} or higher in order to display this item."

msgid "Show without filters"
msgstr "Show without filters"

msgid "Maps with Earth Engine layers cannot be displayed when offline"
msgstr "Maps with Earth Engine layers cannot be displayed when offline"

msgid "Unable to load the plugin for this item"
msgstr "Unable to load the plugin for this item"

Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@
"cy:capture": "cypress_dhis2_api_stub_mode=CAPTURE yarn d2-utils-cypress run --appStart 'yarn cypress:start'"
},
"devDependencies": {
"@dhis2/cli-app-scripts": "^10.3.6",
"@dhis2/cli-style": "^10.4.1",
"@dhis2/cli-app-scripts": "^10.3.7",
"@dhis2/cli-style": "^10.5.1",
"@dhis2/cli-utils-cypress": "^7.0.1",
"@dhis2/cypress-commands": "^7.0.1",
"@testing-library/jest-dom": "^5.14.1",
Expand Down
13 changes: 10 additions & 3 deletions src/AppWrapper.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,11 +41,18 @@ const query = {
paging: false,
},
},
apps: {
resource: 'apps',
},
}

const providerDataTransformation = ({ rootOrgUnits }) => ({
rootOrgUnits: rootOrgUnits.organisationUnits,
})
const providerDataTransformation = ({ rootOrgUnits, apps }) => {
const lineListingApp = apps.find((app) => app.key === 'line-listing') || {}
return {
rootOrgUnits: rootOrgUnits.organisationUnits,
lineListingAppVersion: lineListingApp.version || '0.0.0',
}
}

const AppWrapper = () => {
const dataEngine = useDataEngine()
Expand Down
6 changes: 6 additions & 0 deletions src/actions/iframePluginStatus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
import { ADD_IFRAME_PLUGIN_STATUS } from '../reducers/iframePluginStatus.js'

export const acAddIframePluginStatus = (value) => ({
type: ADD_IFRAME_PLUGIN_STATUS,
value,
})
2 changes: 2 additions & 0 deletions src/components/DropdownButton/assets/Arrow.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import PropTypes from 'prop-types'
import React from 'react'

/* eslint-disable react/no-unknown-property */
export function ArrowDown({ className }) {
return (
<svg
Expand Down Expand Up @@ -48,6 +49,7 @@ export function ArrowUp({ className }) {
</svg>
)
}
/* eslint-enable react/no-unknown-property */
ArrowUp.propTypes = {
className: PropTypes.string,
}

This file was deleted.

Loading

0 comments on commit 3efe9aa

Please sign in to comment.