dashboard-app icon indicating copy to clipboard operation
dashboard-app copied to clipboard

refactor: use platform/runtime plugin components

Open edoardo opened this issue 2 years ago • 1 comments

Fixes DHIS2-17268

Relates to https://github.com/dhis2/data-visualizer-app/pull/3082 Relates to https://github.com/dhis2/line-listing-app/pull/396 Relates to https://github.com/dhis2/maps-app/pull/3232


Key features

  1. use plugin components from app-runtime
  2. fix Cypress login for >=41

Description

Generic components for plugins are available in app-platform and app-runtime. This PR is removing the original iframe plugin with the message handling that has been "moved" to the platform. All analytics apps have a correspondent PR for using the platform plugin build with embedded message handling.

Cypress started to fail in >=41 because the login mechanism changed. Dashboard is still using v6.9.1 of Cypress which prevents us from upgrading cli-utils-cypress to a recent version with support for the new login. The temporary solution is to add a custom login command which accommodates login for all DHIS2 versions.


TODO

  • [x] figure out how to transmit the removeCachedData message to the plugin without re-rendering
  • [ ] handle recordOnNextLoad to avoid multiple recordings
  • [ ] test plugin type switch (ie. DV to Maps)
  • [ ] test installation status stuff

Known issues

  • [ ] an infinite loop happened and this seems to solve it, I'm not sure why and if this is a proper solution.

Screenshots

Screenshot 2023-06-21 at 16 25 33

edoardo avatar Jun 21 '23 14:06 edoardo

🚀 Deployed on https://pr-2431--dhis2-dashboard.netlify.app

dhis2-bot avatar Jun 22 '23 07:06 dhis2-bot