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

Merged
merged 90 commits into from
Feb 14, 2025

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.
@dhis2-bot dhis2-bot temporarily deployed to netlify January 31, 2025 12:44 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 11, 2025 14:13 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 12, 2025 15:01 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 08:08 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 09:15 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 09:27 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 09:45 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 10:08 Inactive
@jenniferarnesen jenniferarnesen added the e2e record Apply this label to a pull request to trigger recording of E2E tests on Cypress Cloud label Feb 14, 2025
Copy link

cypress bot commented Feb 14, 2025

dashboards-app    Run #5126

Run Properties:  status check failed Failed #5126  •  git commit 0d87e9da9a ℹ️: Merge 9866d9a9092807f24a401a69322262098e7dcc59 into 3f9c897b55a6bc57344a936138d2...
Project dashboards-app
Branch Review feat/custom-plugins-rebased-latest
Run status status check failed Failed #5126
Run duration 06m 06s
Commit git commit 0d87e9da9a ℹ️: Merge 9866d9a9092807f24a401a69322262098e7dcc59 into 3f9c897b55a6bc57344a936138d2...
Committer Jen Jones Arnesen
View all properties for this run ↗︎

Test results
Tests that failed  Failures 5
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 0
Tests that did not run due to a failure in a mocha hook  Skipped 4
Tests that passed  Passing 8
View all changes introduced in this branch ↗︎

Tests for review

Failed  edit_errors.feature • 3 failed tests • e2e-chrome-parallel-2.41-3

View Output Video

Test Artifacts
Error occurs while editing a dashboard > An error occurs while saving a dashboard that I don't have access to Test Replay Screenshots Video
Error occurs while editing a dashboard > A 500 error is thrown when I save the dashboard Test Replay Screenshots Video
Error occurs while editing a dashboard > A 500 error is thrown when I delete the dashboard Test Replay Screenshots Video
Failed  view_dashboard.feature • 1 failed test • e2e-chrome-parallel-2.40-1

View Output Video

Test Artifacts
Viewing dashboards > I view a dashboard with items lacking shape Test Replay Screenshots Video
Failed  dashboard_filter.feature • 1 failed test • e2e-chrome-parallel-2.40-1

View Output Video

Test Artifacts
Dashboard filter > I add and remove filters Test Replay Screenshots Video

Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
3 New issues
3 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

@dhis2-bot dhis2-bot temporarily deployed to netlify February 14, 2025 14:29 Inactive
@jenniferarnesen
Copy link
Collaborator Author

Tests reported as failing above are passing locally:

image

image

image

@jenniferarnesen jenniferarnesen merged commit 9d25bb1 into master Feb 14, 2025
45 of 48 checks passed
@jenniferarnesen jenniferarnesen deleted the feat/custom-plugins-rebased-latest branch February 14, 2025 15:14
dhis2-bot added a commit that referenced this pull request Feb 14, 2025
# [101.0.0](v100.5.0...v101.0.0) (2025-02-14)

### Features

* support custom 3rd party plugins along with platform plugins ([#3184](#3184)) ([9d25bb1](9d25bb1))

### BREAKING CHANGES

* this version is only compatible with plugin versions ->
* Maps plugin >= v101.0.0
* Line Listing plugin >= v102.0.0
* Data Visualizer plugin >= v101.0.0

Implements:
* DHIS2-17283
Support dashboard plugins built with the App Platform

* DHIS2-17268
Visualizations render twice when loading a dashboard,
creating a flashing effect

* DHIS2-18576
If you add a filter that results in "no data" for a chart,
removing the filter does not reload the original chart

Key features
* Add support for 3rd party dashboard plugins
* Add item menu on plugin items that includes fullscreen button
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 101.0.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
e2e record Apply this label to a pull request to trigger recording of E2E tests on Cypress Cloud released
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants