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: avoid re-rendering an item when adding the same again (DHIS2-17016) #2935

Merged
merged 28 commits into from
Apr 26, 2024

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Mar 13, 2024

Fixes: https://dhis2.atlassian.net/browse/DHIS2-17016

Key features

  1. avoid re-render plugin when the same item is added multiple times

Description

It is possible to add the same dashboard item to a dashboard multiple times.
Probably not a scenario that happens often, but nothing prevents it.
The bug caused a re-render of all the previously added items for the same visualization when in edit mode.

dhis2-bot and others added 22 commits December 12, 2023 09:36
* chore: 26.2.0-cumulative-values-alpha.1

* chore: [email protected]
Bumps [@adobe/css-tools](https://github.com/adobe/css-tools) from 4.3.1 to 4.3.2.
- [Changelog](https://github.com/adobe/css-tools/blob/main/History.md)
- [Commits](https://github.com/adobe/css-tools/commits)

---
updated-dependencies:
- dependency-name: "@adobe/css-tools"
  dependency-type: indirect
...

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

chore(deps): bump @adobe/css-tools from 4.3.1 to 4.3.2
Bumps [browserify-sign](https://github.com/crypto-browserify/browserify-sign) from 4.2.1 to 4.2.2.
- [Changelog](https://github.com/browserify/browserify-sign/blob/main/CHANGELOG.md)
- [Commits](browserify/browserify-sign@v4.2.1...v4.2.2)

---
updated-dependencies:
- dependency-name: browserify-sign
  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]>
Bumps [crypto-js](https://github.com/brix/crypto-js) from 4.1.1 to 4.2.0.
- [Commits](brix/crypto-js@4.1.1...4.2.0)

---
updated-dependencies:
- dependency-name: crypto-js
  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]>
Bumps [get-func-name](https://github.com/chaijs/get-func-name) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/chaijs/get-func-name/releases)
- [Commits](https://github.com/chaijs/get-func-name/commits/v2.0.2)

---
updated-dependencies:
- dependency-name: get-func-name
  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]>
Related to https://dhis2.atlassian.net/browse/LIBS-383

Add package patches to the yarn cache key.

If a new patch is added, then this ensures that that the yarn cache
gets invalidated and forces yarn install, which will then do the
postinstall step that applies the patches.

From user perspective, the e2e-prod tests might fail if it is depending
on a patch that didn't get installed.

Co-authored-by: Jan Henrik Øverland <[email protected]>
Bumps [react-redux](https://github.com/reduxjs/react-redux) from 7.2.4 to 7.2.9.
- [Release notes](https://github.com/reduxjs/react-redux/releases)
- [Changelog](https://github.com/reduxjs/react-redux/blob/master/CHANGELOG.md)
- [Commits](reduxjs/react-redux@v7.2.4...v7.2.9)

---
updated-dependencies:
- dependency-name: react-redux
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

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]>
Bumps [moment](https://github.com/moment/moment) from 2.29.4 to 2.30.1.
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.4...2.30.1)

---
updated-dependencies:
- dependency-name: moment
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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]>
Bumps [@dhis2/d2-i18n](https://github.com/dhis2/d2-i18n) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/dhis2/d2-i18n/releases)
- [Changelog](https://github.com/dhis2/d2-i18n/blob/master/CHANGELOG.md)
- [Commits](dhis2/d2-i18n@v1.1.1...v1.1.3)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Bumps
[@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse)
 from 7.18.13 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  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(deps): bump @dhis2/app-runtime from 3.9.4 to 3.10.2

Bumps
[@dhis2/app-runtime](https://github.com/dhis2/app-runtime/tree/HEAD/runtime)
from 3.9.4 to 3.10.2.
- [Release notes](https://github.com/dhis2/app-runtime/releases)
- [Changelog](https://github.com/dhis2/app-runtime/blob/master/CHANGELOG.md)
- [Commits](https://github.com/dhis2/app-runtime/commits/v3.10.2/runtime)

---
updated-dependencies:
- dependency-name: "@dhis2/app-runtime"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

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

* chore(deps): bump @dhis2/d2-i18n from 1.1.1 to 1.1.3 (#2896)

Bumps [@dhis2/d2-i18n](https://github.com/dhis2/d2-i18n) from 1.1.1 to 1.1.3.
- [Release notes](https://github.com/dhis2/d2-i18n/releases)
- [Changelog](https://github.com/dhis2/d2-i18n/blob/master/CHANGELOG.md)
- [Commits](dhis2/d2-i18n@v1.1.1...v1.1.3)

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

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* chore(deps): bump @babel/traverse from 7.18.13 to 7.23.2 (#2796)

Bumps
[@babel/traverse](https://github.com/babel/babel/tree/HEAD/packages/babel-traverse)
 from 7.18.13 to 7.23.2.
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v7.23.2/packages/babel-traverse)

---
updated-dependencies:
- dependency-name: "@babel/traverse"
  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]>

---------

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]>
For the 41 soft freeze period, the app bundle needs to be deployed to d2-ci.
Since it will be built from the 'dev' branch, we need to run the deploy build step on 'dev'
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Mar 13, 2024

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

@dhis2-bot dhis2-bot temporarily deployed to netlify March 13, 2024 12:19 Inactive
@edoardo edoardo changed the title fix: avoid re-rendering an item when adding the same again fix: avoid re-rendering an item when adding the same again (DHIS2-17016) Mar 13, 2024
@edoardo edoardo requested a review from jenniferarnesen March 13, 2024 12:20
@edoardo edoardo force-pushed the fix/item-copies-rendering-issue branch from 1c8da88 to 9b28b41 Compare March 13, 2024 12:25
@dhis2-bot dhis2-bot temporarily deployed to netlify March 13, 2024 12:34 Inactive
* chore: use latest alpha for testing

* chore: update analytics dependency

* test: use 41 test instance
This also avoids an unnecessary fetch of the same visualization object.
@edoardo edoardo force-pushed the fix/item-copies-rendering-issue branch from 9b28b41 to d4b3f4d Compare March 13, 2024 13:40
@dhis2-bot dhis2-bot temporarily deployed to netlify March 13, 2024 13:46 Inactive
@jenniferarnesen jenniferarnesen force-pushed the dev branch 2 times, most recently from b919316 to 7f603d6 Compare March 19, 2024 14:10
@dhis2-bot dhis2-bot temporarily deployed to netlify March 20, 2024 11:00 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 8, 2024 09:43 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 25, 2024 09:37 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 25, 2024 10:40 Inactive
@edoardo edoardo merged commit dd67fc6 into dev Apr 26, 2024
14 checks passed
@edoardo edoardo deleted the fix/item-copies-rendering-issue branch April 26, 2024 12:09
dhis2-bot added a commit that referenced this pull request May 16, 2024
## [100.2.2](v100.2.1...v100.2.2) (2024-05-16)

### Bug Fixes

* avoid re-rendering an item when adding the same again (DHIS2-17016) ([#2935](#2935)) ([dd67fc6](dd67fc6))
* avoid reading from undefined error (DHIS2-17334) ([#2970](#2970)) ([a4e5340](a4e5340))
* dimension list design (DHIS2-16270) ([#2861](#2861)) ([790afd2](790afd2))
* system / user setting for display name not respected in Org Unit tree (DHIS2-15000) ([#2971](#2971)) ([928b88a](928b88a))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.2.2 🎉

The release is available on:

Your semantic-release bot 📦🚀

kabaros pushed a commit that referenced this pull request May 31, 2024
## [100.2.2](v100.2.1...v100.2.2) (2024-05-16)

### Bug Fixes

* avoid re-rendering an item when adding the same again (DHIS2-17016) ([#2935](#2935)) ([dd67fc6](dd67fc6))
* avoid reading from undefined error (DHIS2-17334) ([#2970](#2970)) ([a4e5340](a4e5340))
* dimension list design (DHIS2-16270) ([#2861](#2861)) ([790afd2](790afd2))
* system / user setting for display name not respected in Org Unit tree (DHIS2-15000) ([#2971](#2971)) ([928b88a](928b88a))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants