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

fix: reload iframe plugins when filters causing errors are changed/removed #2675

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

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Aug 16, 2023

Implements DHIS2-XXXX


Key features

  1. fix a bug that prevented iframe plugins from reloading when filters causing errors are changed/removed

Description

Sometimes when applying certain filters some iframe plugin can show an error, for example if no analytics data is returned.
When this happens, an error screen is shown in place of the iframe tag.
When removing the filter, the error screen was still shown and the iframe plugin was not reloaded.

The PR addresses 2 issues.

  1. filterVersion which controls the clearing of the error in the IframePlugin component was never changing, thus not clearing the error when filters were changed/removed.
  2. the getProps listener was not initialised when the iframe tag was added again, causing the plugin to fail to load.

TODO

  • fix Cypress tests

Known issues

  • Cypress tests related to dashboard filters are still failing. The issue seem to be that IframePlugin re-render more than needed and Cypress runs the tests after the first re-render which still has the "outdated" UI.

Screenshots

Filter causing an error:
Screenshot 2023-08-16 at 13 03 49

Before, removing the filter did not reload the iframe plugin:
Screenshot 2023-08-16 at 13 04 09

After, removing the filter correctly reloads the iframe plugin:
Screenshot 2023-08-16 at 13 04 20

jenniferarnesen and others added 12 commits June 7, 2023 14:23
The verify workflow should run on tags, so that a corresponding branch is created
in the d2-ci repository

Do not run the release step on PRs, but do allow it for pushes

yarn cypress install sometimes fails. Turns out it isn't necessary anyway
since the cypress-io gh action takes care of installing cypress.
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](json5/json5@v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>
* chore: nightly failing to set up cypress (#2378)

The verify workflow should run on tags, so that a corresponding branch is created
in the d2-ci repository

Do not run the release step on PRs, but do allow it for pushes

yarn cypress install sometimes fails. Turns out it isn't necessary anyway
since the cypress-io gh action takes care of installing cypress.

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* docs: move docs to app (#2384)

* chore(release): cut 100.0.1 [skip release]

## [100.0.1](v100.0.0...v100.0.1) (2023-06-12)

### Bug Fixes

* **translations:** sync translations from transifex (dev) ([5b0b3b6](5b0b3b6))

* chore(deps): bump @dhis2/analytics from 25.1.10 to 25.1.15

Bumps [@dhis2/analytics](https://github.com/dhis2/analytics) from 25.1.10 to 25.1.15.
- [Release notes](https://github.com/dhis2/analytics/releases)
- [Changelog](https://github.com/dhis2/analytics/blob/master/CHANGELOG.md)
- [Commits](dhis2/analytics@v25.1.10...v25.1.15)

---
updated-dependencies:
- dependency-name: "@dhis2/analytics"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>
Co-authored-by: @dhis2-bot <apps@dhis2.org>
Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* chore: nightly failing to set up cypress (#2378)

The verify workflow should run on tags, so that a corresponding branch is created
in the d2-ci repository

Do not run the release step on PRs, but do allow it for pushes

yarn cypress install sometimes fails. Turns out it isn't necessary anyway
since the cypress-io gh action takes care of installing cypress.

* fix(translations): sync translations from transifex (dev)

Automatically merged.

* docs: move docs to app (#2384)

* chore(release): cut 100.0.1 [skip release]

## [100.0.1](v100.0.0...v100.0.1) (2023-06-12)

### Bug Fixes

* **translations:** sync translations from transifex (dev) ([5b0b3b6](5b0b3b6))

* chore(deps): bump @dhis2/ui from 8.13.6 to 8.13.11

Bumps [@dhis2/ui](https://github.com/dhis2/ui/tree/HEAD/collections/ui) from 8.13.6 to 8.13.11.
- [Release notes](https://github.com/dhis2/ui/releases)
- [Changelog](https://github.com/dhis2/ui/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dhis2/ui/commits/v8.13.11/collections/ui)

---
updated-dependencies:
- dependency-name: "@dhis2/ui"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>
Co-authored-by: @dhis2-bot <apps@dhis2.org>
Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
This is temporary during summer 2023 when there is very little frontend or backend activity
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Aug 16, 2023

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

@dhis2-bot dhis2-bot temporarily deployed to netlify August 30, 2023 12:35 Inactive
@jenniferarnesen jenniferarnesen changed the base branch from dev to master June 21, 2024 07:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

4 participants