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

refactor: use platform/runtime plugin components #2431

Draft
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Jun 21, 2023

Fixes DHIS2-17268

Relates to dhis2/data-visualizer-app#3082
Relates to dhis2/line-listing-app#396
Relates to dhis2/maps-app#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

  • 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 edoardo force-pushed the refactor/use-platform-plugin-components branch from 435147b to 3091fdd Compare June 22, 2023 07:52
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Jun 22, 2023

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

@dhis2-bot dhis2-bot temporarily deployed to netlify June 22, 2023 07:56 Inactive
@edoardo edoardo force-pushed the refactor/use-platform-plugin-components branch from 96c2efc to 4edc634 Compare October 9, 2023 08:47
@edoardo edoardo force-pushed the refactor/use-platform-plugin-components branch from 4edc634 to 35e3fc4 Compare May 24, 2024 13:37
@dhis2-bot dhis2-bot temporarily deployed to netlify May 24, 2024 13:45 Inactive
@edoardo edoardo force-pushed the refactor/use-platform-plugin-components branch from 35e3fc4 to 75857e8 Compare May 27, 2024 13:41
@dhis2-bot dhis2-bot temporarily deployed to netlify May 27, 2024 13:44 Inactive
@edoardo edoardo force-pushed the refactor/use-platform-plugin-components branch from 75857e8 to abb9749 Compare June 4, 2024 13:52
@dhis2-bot dhis2-bot temporarily deployed to netlify June 4, 2024 14:04 Inactive
@edoardo edoardo requested a review from KaiVandivier June 5, 2024 13:05
@edoardo edoardo force-pushed the refactor/use-platform-plugin-components branch from abb9749 to 2673f06 Compare June 6, 2024 13:07
@dhis2-bot dhis2-bot temporarily deployed to netlify June 6, 2024 13:10 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify June 21, 2024 07:48 Inactive
@jenniferarnesen jenniferarnesen changed the base branch from dev to master June 21, 2024 07:54
@edoardo edoardo force-pushed the refactor/use-platform-plugin-components branch from 34809de to 92cea63 Compare July 1, 2024 14:13
@dhis2-bot dhis2-bot temporarily deployed to netlify July 10, 2024 09:40 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify July 10, 2024 09:55 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify July 10, 2024 10:08 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify July 10, 2024 10:21 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify July 11, 2024 08:09 Inactive
@@ -3,14 +3,17 @@
exports[`ContentMenuItem has a LaunchLink when url is provided 1`] = `
<div>
<li
class="jsx-1930534478 "
class="jsx-3192368000 "
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe this test needs to be changed so we don't get these diffs when the ui version is upgraded.

@dhis2-bot dhis2-bot temporarily deployed to netlify July 29, 2024 10:41 Inactive
This silences warnings in the console.
Link is rendering an a tag, and MenuItem does the same.
Use a redirect on click instead (already done in the print submenu)
This hopefully has a better solution.
It should be enough to just use isParentCached for knowing when to start
recording and removing the cache in the plugins.
This should fix some issues with plugin content not being visible.
This is to avoid the error boundary to show up for uncaught errors
(failed to fetch a visualization) which
interferes with Cypress testing.
@edoardo edoardo force-pushed the refactor/use-platform-plugin-components branch from 7e97897 to 5c40e73 Compare August 2, 2024 13:44
@dhis2-bot dhis2-bot temporarily deployed to netlify August 2, 2024 13:46 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 16, 2024 07:28 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 3, 2024 13:32 Inactive
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants