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

Closed
wants to merge 14 commits into from

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Aug 16, 2023

Implements DHIS2-18576


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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Jen Jones Arnesen <[email protected]>
* 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] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Co-authored-by: @dhis2-bot <[email protected]>
Co-authored-by: Jan Henrik Øverland <[email protected]>
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] <[email protected]>

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Jen Jones Arnesen <[email protected]>
Co-authored-by: @dhis2-bot <[email protected]>
Co-authored-by: Jan Henrik Øverland <[email protected]>
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.dashboard.netlify.dhis2.org

@dhis2-bot dhis2-bot temporarily deployed to netlify August 16, 2023 11:11 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 30, 2023 12:35 Inactive
@jenniferarnesen jenniferarnesen force-pushed the dev branch 2 times, most recently from b919316 to 7f603d6 Compare March 19, 2024 14:10
@jenniferarnesen jenniferarnesen changed the base branch from dev to master June 21, 2024 07:53
Copy link

sonarcloud bot commented Dec 6, 2024

@dhis2-bot dhis2-bot temporarily deployed to netlify December 6, 2024 08:47 Inactive
@edoardo
Copy link
Member Author

edoardo commented Dec 6, 2024

Closing.
The issue is addressed in the following commits:

@edoardo edoardo closed this Dec 6, 2024
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