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

feat: support custom 3rd party plugins along with platform plugins #3184

Open
wants to merge 79 commits into
base: master
Choose a base branch
from

Conversation

jenniferarnesen
Copy link
Collaborator

@jenniferarnesen jenniferarnesen commented Jan 15, 2025

Implements:

Requires these PRs:


Key features

  • add support for 3rd party dashboard plugins
  • item menu on app items that includes fullscreen button

Description
Dashboard app should have support for custom plugins built with the DHIS2 tooling.
This assumes the plugin uses the platform's components that provide the postRobot communication compatible with this version of dashboard app.

How to test

For the 3rd party new support, install the Climate app manually on the test instance. Ask Bjørn for the latest version.
For the other analytics apps, build a version from each respective PR and install them manually on the test instance.
For the dashboard app, the Netlify link pointing to the test instance should work.
To avoid conflicts with other testing, it's a good idea to create a dedicated test instance via the instance manager.

TODO

  • update min versions for analytics apps

Known issues

  • rendering error on AppItem

edoardo and others added 30 commits January 14, 2025 17:04
This silences warnings in the console.
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 is to avoid the error boundary to show up for uncaught errors
(failed to fetch a visualization) which
interferes with Cypress testing.
* chore(deps): bump the security group with 3 updates

Updates `ejs` from 3.1.8 to 3.1.10
- [Release notes](https://github.com/mde/ejs/releases)
- [Commits](mde/ejs@v3.1.8...v3.1.10)

Updates `tmpl` from 1.0.4 to 1.0.5
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

Updates `word-wrap` from 1.2.3 to 1.2.5
- [Release notes](https://github.com/jonschlinkert/word-wrap/releases)
- [Commits](jonschlinkert/word-wrap@1.2.3...1.2.5)

---
updated-dependencies:
- dependency-name: ejs
  dependency-type: indirect
  dependency-group: security
- dependency-name: tmpl
  dependency-type: indirect
  dependency-group: security
- dependency-name: word-wrap
  dependency-type: indirect
  dependency-group: security
...

Signed-off-by: dependabot[bot] <[email protected]>

* chore: break up command chain

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
So it can be used also for custom 3rd-party plugins.
So it can be reused for different item types, ie. both VisualizationItem
and AppItem.
…HIS2-17947)

The same solution is used in VisualizationItem
This together with the fixes in app-runtime should solve he refresh on
resize issues.
This is needed as the new plugin system is used, because the messages
used in the communication have changed.
These are now reused for AppItem items too.
Don't render Plugin before knowing width and height.
Platform's plugin components rely on width and height in order to
disable automatic resize.
@jenniferarnesen jenniferarnesen changed the title feat: support custom 3rd party plugins feat: support custom 3rd party plugins along with platform plugins Jan 17, 2025
@dhis2-bot dhis2-bot temporarily deployed to netlify January 20, 2025 15:00 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 22, 2025 15:38 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 27, 2025 10:37 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 27, 2025 13:29 Inactive
The visualization request stopped being recorded after recent changes.
The componentDidUpdate method was taking care of the recording, but it
doesn't work as before.
This change ensures the visualization is fetched when the dashboard is
marked for offline so that the request is properly cached.
@dhis2-bot dhis2-bot temporarily deployed to netlify January 28, 2025 14:47 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 29, 2025 12:43 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 29, 2025 14:46 Inactive
* fix: update filter version only when filters change

This avoids unnecessary re-renders of LegacyPlugin items (EV/ER) which
cause EV visualizations to flash and extra analytics requests to fire.

* refactor: remove filterVersion and rely on visualization instead

Filters are already applied to visualization.
filterVersion can be removed since it was only used to trigger a reload
of the LegacyPlugin items.
visualization can be used directly instead for that.
@dhis2-bot dhis2-bot temporarily deployed to netlify January 29, 2025 15:00 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 29, 2025 15:10 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 30, 2025 10:05 Inactive
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

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.

4 participants