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: implement data icon option for SV visualization (DHIS2-10496) #2236

Merged
merged 9 commits into from
Apr 27, 2023

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Feb 17, 2023

Implements DHIS2-10496

Requires: dhis2/analytics#1440


Key features

  1. implement option for showing data icon in SV

Description

In maintenance app is possible to assign an icon to a data element, indicator, etc...
If an icon is assigned, when using the SV visualization type, it should be possible to see the icon together with the value.
This should be controlled via the options dialog.


Screenshots

Option in the Style tab for SV only:
Screenshot 2023-02-17 at 14 11 21

Example of SV with icon:
Screenshot 2023-03-02 at 10 53 19

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Feb 17, 2023

@dhis2-bot dhis2-bot temporarily deployed to netlify February 17, 2023 13:14 Inactive
@cypress
Copy link

cypress bot commented Feb 17, 2023

Passing run #1805 ↗︎

0 597 0 0 Flakiness 0

Details:

chore: update cli-app-scripts to fix plugin issue in dev
Project: Data Visualizer App Commit: c76293fa8e
Status: Passed Duration: 08:30 💡
Started: Apr 13, 2023 1:49 PM Ended: Apr 13, 2023 1:57 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

'If the data item has an icon, display it next to the value'
)}
option={{
name: 'icons',
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is icons coming from the backend? if not, maybe we can change it to something more descriptive like showIcon (or even more detailed like showDataItemIcon if that makes sense) in case there are more icon related options coming in the future

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, it is called icons in the backend.
I also thought maybe to use a more explicative name, but for the other options it seems we just keep the original name in the AO, which it makes sense for readability and debugging once you know that the names in the options correspond to the ones you see in the AO.

@martinkrulltott martinkrulltott changed the title feat: implement data icon option for SV visualization DHIS2-10496 feat: implement data icon option for SV visualization (DHIS2-10496) Feb 21, 2023
@edoardo edoardo changed the base branch from master to dev February 27, 2023 12:43
@edoardo edoardo force-pushed the feat/icon-in-sv-DHIS2-10496 branch from 427d5d2 to ce476b7 Compare March 2, 2023 10:05
@dhis2-bot dhis2-bot temporarily deployed to netlify March 2, 2023 10:12 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify March 2, 2023 11:26 Inactive
@janhenrikoverland janhenrikoverland marked this pull request as ready for review March 2, 2023 12:38
@martinkrulltott martinkrulltott self-requested a review March 2, 2023 13:41
Copy link
Contributor

@martinkrulltott martinkrulltott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs Cypress tests for the Analytics part

@dhis2-bot dhis2-bot temporarily deployed to netlify March 2, 2023 14:55 Inactive
@martinkrulltott
Copy link
Contributor

Do not merge until #2223 is merged and the icons have been tested in combination with the background color as well.

@edoardo edoardo force-pushed the feat/icon-in-sv-DHIS2-10496 branch from 818d086 to 4a88294 Compare March 27, 2023 10:08
@dhis2-bot dhis2-bot temporarily deployed to netlify March 27, 2023 10:11 Inactive
@edoardo edoardo force-pushed the feat/icon-in-sv-DHIS2-10496 branch from 4a88294 to c76293f Compare April 13, 2023 13:45
@dhis2-bot dhis2-bot temporarily deployed to netlify April 13, 2023 13:50 Inactive
@martinkrulltott martinkrulltott self-assigned this Apr 14, 2023
@edoardo edoardo force-pushed the feat/icon-in-sv-DHIS2-10496 branch from c76293f to 3e0f086 Compare April 20, 2023 12:00
@dhis2-bot dhis2-bot temporarily deployed to netlify April 20, 2023 12:04 Inactive
@cypress
Copy link

cypress bot commented Apr 20, 2023

Passing run #1867 ↗︎

0 622 0 0 Flakiness 0

Details:

Merge 62acb37 into 13f8096...
Project: Data Visualizer App Commit: fe72bde236 ℹ️
Status: Passed Duration: 09:17 💡
Started: Apr 27, 2023 1:45 PM Ended: Apr 27, 2023 1:54 PM

This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.

@dhis2-bot dhis2-bot temporarily deployed to netlify April 27, 2023 07:51 Inactive
If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.
This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.
This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.
@edoardo edoardo force-pushed the feat/icon-in-sv-DHIS2-10496 branch from 08fb847 to dee6f8a Compare April 27, 2023 08:13
@dhis2-bot dhis2-bot temporarily deployed to netlify April 27, 2023 08:17 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 27, 2023 13:22 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify April 27, 2023 13:39 Inactive
@edoardo edoardo merged commit 19686cd into dev Apr 27, 2023
@edoardo edoardo deleted the feat/icon-in-sv-DHIS2-10496 branch April 27, 2023 14:07
janhenrikoverland added a commit that referenced this pull request May 3, 2023
* chore(deps): bump tar from 4.4.13 to 4.4.19 (#1946)

Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v4.4.13...v4.4.19)

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

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

* chore: set v100.0.0

* feat: support non-gregorian fixed periods (#2233)

* feat: support non-gregorian fixed periods

* test: fix test failing due to change in single value behaviour

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* chore: prepare app for continuous delivery

* fix: remove old i18n initialisation (#2241)

All the old i18n files have been removed already, but because
the D2Shim had the i18nRoot prop, the app tries to load the en property
file which does not exist.

* fix: dependency updates (#2243)

* fix: update cli-app-scripts and analytics deps

* fix: set height on chart container when not defined (#2246)

This fixes a cutoff issue in dashboard.
It didn't affect the app, where everything still seems to work fine.

* fix: update cli-app-scripts and analytics (#2247)

The gray background in the initial loading spinner is removed
(cli-app-scripts).

More fixes to FileMenu -> GetLink (analytics).

* chore: add styled-jsx which is a peer dependency (#2253)

@dhis2/ui lists styled-jsx as a peer dependency.
Not having it in package.json results in a bunch of warnings during yarn install

* chore(deps): bump webpack from 5.74.0 to 5.76.2 (#2248)

Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.74.0...v5.76.2)

---
updated-dependencies:
- dependency-name: webpack
  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(deps): bump async from 2.6.3 to 2.6.4 (#2148)

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  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(deps): bump moment from 2.29.2 to 2.29.4 (#2122)

Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  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>

* fix: target window.parent for postRobot communication (#2256)

This solves the issue of plugin communication not working in Cypress,
where the app runs in an iframe and window.top is not the app window but
some Cypress window.
window.parent targets the window immediately above the plugin window.

* chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 (#2191)

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](chalk/ansi-regex@v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  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(deps): bump @sideway/formula from 3.0.0 to 3.0.1 (#2245)

Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases)
- [Commits](hapijs/formula@v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

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

* chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#2234)

Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

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

* chore(deps): bump json5 from 1.0.1 to 1.0.2 (#2228)

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>

* chore(deps): bump qs from 6.5.2 to 6.5.3 (#2220)

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.5.2...v6.5.3)

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

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

* chore(deps): bump handlebars from 4.7.6 to 4.7.7 (#1995)

Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.7.6...v4.7.7)

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

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

* chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3 (#1988)

Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](stevemao/trim-off-newlines@v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

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

* fix(translations): sync translations from transifex (master) (#2192)

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

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

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

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

---------

Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>

* chore(deps): bump ws from 5.2.2 to 5.2.3 (#1947)

Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@5.2.2...5.2.3)

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

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

* chore(deps): bump tmpl from 1.0.4 to 1.0.5 (#1945)

Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

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

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

* chore: configure continuous delivery workflows (#2254)

There are 4 workflows:

verify PR (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod

verify commit to dev (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod, report-failure-to-slack

verify commit to master (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod, release, report-failure-to-slack

nightly (nightly.yml)
-- e2e-dev, report-failure

In addition:

* e2e-prod and e2e-dev are reusable workflows and are called from dhis2-verify-app and nightly.
* removed uses: c-hive/gha-yarn-cache@v1 since it is deprecated and setup-node handles that work.
* updated action versions and node versions
* cypress test version tagging for features and bugs has been added (copied from line-list)

* feat: single value background color change based upon legend (DHIS2-13702) (#2223)

* fix: inject CSS UI variables in plugin (#2270)

* fix: nightly workflow has to run on default branch which is currently dev (#2269)

nightly workflow is triggered by workflow_dispatch, so it only runs on the default branch (dev)

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* feat: implement data icon option for SV visualization (DHIS2-10496) (#2236)

* fix: do not pass a boolean for icons when saving

If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.

* fix: hide icon from visualization when option is toggled

This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.

* fix: fetch data element icon and pass it in extraOptions

This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.

* feat: custom calculations (DHIS2-13871) (#2232)

* chore: bump analytics (#2276)

* feat(plugin): send installation status [DHIS2-15097] (#2273)

* feat(plugin): send installation status

* fix(deps): bump cli-app-scripts for precaching improvement

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* chore: bump analytics (#2279)

* chore: converge master-to-dev (#2281)

* chore: prepare app for continuous delivery
BREAKING CHANGE: v100.0.0

* chore: trigger v100.0.0 (#2237)

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

# [100.0.0](v99.0.0...v100.0.0) (2023-02-27)

### chore

* prepare app for continuous delivery ([8db6c88](8db6c88))

### BREAKING CHANGES

* v100.0.0

* fix: set height on chart container when not defined (#2246) (#2250)

This fixes a cutoff issue in dashboard.
It didn't affect the app, where everything still seems to work fine.

Co-authored-by: Edoardo Sabadelli <edoardo@dhis2.org>

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

## [100.0.1](v100.0.0...v100.0.1) (2023-03-23)

### Bug Fixes

* set height on chart container when not defined ([#2246](#2246)) ([#2250](#2250)) ([a922569](a922569))

* fix: remove translucent layer by using app-scripts 10.3.4 (DHIS2-15008) (#2251)

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

## [100.0.2](v100.0.1...v100.0.2) (2023-03-27)

### Bug Fixes

* remove translucent layer by using app-scripts 10.3.4 (DHIS2-15008) ([#2251](#2251)) ([9d62ca7](9d62ca7))

* chore(deps-dev): bump loglevel from 1.7.1 to 1.8.1 (#2199)

Bumps [loglevel](https://github.com/pimterry/loglevel) from 1.7.1 to 1.8.1.
- [Release notes](https://github.com/pimterry/loglevel/releases)
- [Commits](pimterry/loglevel@v1.7.1...v1.8.1)

---
updated-dependencies:
- dependency-name: loglevel
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* chore(deps): bump reselect from 4.0.0 to 4.1.7 (#2229)

Bumps [reselect](https://github.com/reduxjs/reselect) from 4.0.0 to 4.1.7.
- [Release notes](https://github.com/reduxjs/reselect/releases)
- [Changelog](https://github.com/reduxjs/reselect/blob/master/CHANGELOG.md)
- [Commits](reduxjs/reselect@v4.0.0...v4.1.7)

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

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

* fix: plugin sends installation status (#2277)

Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>

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

## [100.0.3](v100.0.2...v100.0.3) (2023-05-03)

### Bug Fixes

* plugin sends installation status ([#2277](#2277)) ([de989c3](de989c3))

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: @dhis2-bot <apps@dhis2.org>
Co-authored-by: Edoardo Sabadelli <edoardo@dhis2.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mozafar <kabaros@gmail.com>
Co-authored-by: Edoardo Sabadelli <edoardo@dhis2.org>
Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>
Co-authored-by: @dhis2-bot <apps@dhis2.org>
Co-authored-by: Martin <martin@moid.se>
Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>
janhenrikoverland added a commit that referenced this pull request May 5, 2023
* chore(deps): bump tar from 4.4.13 to 4.4.19 (#1946)

Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v4.4.13...v4.4.19)

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

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

* chore: set v100.0.0

* feat: support non-gregorian fixed periods (#2233)

* feat: support non-gregorian fixed periods

* test: fix test failing due to change in single value behaviour

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* chore: prepare app for continuous delivery

* fix: remove old i18n initialisation (#2241)

All the old i18n files have been removed already, but because
the D2Shim had the i18nRoot prop, the app tries to load the en property
file which does not exist.

* fix: dependency updates (#2243)

* fix: update cli-app-scripts and analytics deps

* fix: set height on chart container when not defined (#2246)

This fixes a cutoff issue in dashboard.
It didn't affect the app, where everything still seems to work fine.

* fix: update cli-app-scripts and analytics (#2247)

The gray background in the initial loading spinner is removed
(cli-app-scripts).

More fixes to FileMenu -> GetLink (analytics).

* chore: add styled-jsx which is a peer dependency (#2253)

@dhis2/ui lists styled-jsx as a peer dependency.
Not having it in package.json results in a bunch of warnings during yarn install

* chore(deps): bump webpack from 5.74.0 to 5.76.2 (#2248)

Bumps [webpack](https://github.com/webpack/webpack) from 5.74.0 to 5.76.2.
- [Release notes](https://github.com/webpack/webpack/releases)
- [Commits](webpack/webpack@v5.74.0...v5.76.2)

---
updated-dependencies:
- dependency-name: webpack
  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(deps): bump async from 2.6.3 to 2.6.4 (#2148)

Bumps [async](https://github.com/caolan/async) from 2.6.3 to 2.6.4.
- [Release notes](https://github.com/caolan/async/releases)
- [Changelog](https://github.com/caolan/async/blob/v2.6.4/CHANGELOG.md)
- [Commits](caolan/async@v2.6.3...v2.6.4)

---
updated-dependencies:
- dependency-name: async
  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(deps): bump moment from 2.29.2 to 2.29.4 (#2122)

Bumps [moment](https://github.com/moment/moment) from 2.29.2 to 2.29.4.
- [Release notes](https://github.com/moment/moment/releases)
- [Changelog](https://github.com/moment/moment/blob/develop/CHANGELOG.md)
- [Commits](moment/moment@2.29.2...2.29.4)

---
updated-dependencies:
- dependency-name: moment
  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>

* fix: target window.parent for postRobot communication (#2256)

This solves the issue of plugin communication not working in Cypress,
where the app runs in an iframe and window.top is not the app window but
some Cypress window.
window.parent targets the window immediately above the plugin window.

* chore(deps): bump ansi-regex from 3.0.0 to 3.0.1 (#2191)

Bumps [ansi-regex](https://github.com/chalk/ansi-regex) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/chalk/ansi-regex/releases)
- [Commits](chalk/ansi-regex@v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: ansi-regex
  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(deps): bump @sideway/formula from 3.0.0 to 3.0.1 (#2245)

Bumps [@sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1.
- [Release notes](https://github.com/sideway/formula/releases)
- [Commits](hapijs/formula@v3.0.0...v3.0.1)

---
updated-dependencies:
- dependency-name: "@sideway/formula"
  dependency-type: indirect
...

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

* chore(deps): bump http-cache-semantics from 4.1.0 to 4.1.1 (#2234)

Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1.
- [Release notes](https://github.com/kornelski/http-cache-semantics/releases)
- [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1)

---
updated-dependencies:
- dependency-name: http-cache-semantics
  dependency-type: indirect
...

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

* chore(deps): bump json5 from 1.0.1 to 1.0.2 (#2228)

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>

* chore(deps): bump qs from 6.5.2 to 6.5.3 (#2220)

Bumps [qs](https://github.com/ljharb/qs) from 6.5.2 to 6.5.3.
- [Release notes](https://github.com/ljharb/qs/releases)
- [Changelog](https://github.com/ljharb/qs/blob/main/CHANGELOG.md)
- [Commits](ljharb/qs@v6.5.2...v6.5.3)

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

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

* chore(deps): bump handlebars from 4.7.6 to 4.7.7 (#1995)

Bumps [handlebars](https://github.com/wycats/handlebars.js) from 4.7.6 to 4.7.7.
- [Release notes](https://github.com/wycats/handlebars.js/releases)
- [Changelog](https://github.com/handlebars-lang/handlebars.js/blob/master/release-notes.md)
- [Commits](handlebars-lang/handlebars.js@v4.7.6...v4.7.7)

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

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

* chore(deps): bump trim-off-newlines from 1.0.1 to 1.0.3 (#1988)

Bumps [trim-off-newlines](https://github.com/stevemao/trim-off-newlines) from 1.0.1 to 1.0.3.
- [Release notes](https://github.com/stevemao/trim-off-newlines/releases)
- [Commits](stevemao/trim-off-newlines@v1.0.1...v1.0.3)

---
updated-dependencies:
- dependency-name: trim-off-newlines
  dependency-type: indirect
...

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

* fix(translations): sync translations from transifex (master) (#2192)

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

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

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

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

---------

Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>

* chore(deps): bump ws from 5.2.2 to 5.2.3 (#1947)

Bumps [ws](https://github.com/websockets/ws) from 5.2.2 to 5.2.3.
- [Release notes](https://github.com/websockets/ws/releases)
- [Commits](websockets/ws@5.2.2...5.2.3)

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

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

* chore(deps): bump tmpl from 1.0.4 to 1.0.5 (#1945)

Bumps [tmpl](https://github.com/daaku/nodejs-tmpl) from 1.0.4 to 1.0.5.
- [Release notes](https://github.com/daaku/nodejs-tmpl/releases)
- [Commits](https://github.com/daaku/nodejs-tmpl/commits/v1.0.5)

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

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

* chore: configure continuous delivery workflows (#2254)

There are 4 workflows:

verify PR (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod

verify commit to dev (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod, report-failure-to-slack

verify commit to master (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod, release, report-failure-to-slack

nightly (nightly.yml)
-- e2e-dev, report-failure

In addition:

* e2e-prod and e2e-dev are reusable workflows and are called from dhis2-verify-app and nightly.
* removed uses: c-hive/gha-yarn-cache@v1 since it is deprecated and setup-node handles that work.
* updated action versions and node versions
* cypress test version tagging for features and bugs has been added (copied from line-list)

* feat: single value background color change based upon legend (DHIS2-13702) (#2223)

* fix: inject CSS UI variables in plugin (#2270)

* fix: nightly workflow has to run on default branch which is currently dev (#2269)

nightly workflow is triggered by workflow_dispatch, so it only runs on the default branch (dev)

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* feat: implement data icon option for SV visualization (DHIS2-10496) (#2236)

* fix: do not pass a boolean for icons when saving

If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.

* fix: hide icon from visualization when option is toggled

This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.

* fix: fetch data element icon and pass it in extraOptions

This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.

* feat: custom calculations (DHIS2-13871) (#2232)

* chore: bump analytics (#2276)

* feat(plugin): send installation status [DHIS2-15097] (#2273)

* feat(plugin): send installation status

* fix(deps): bump cli-app-scripts for precaching improvement

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* chore: bump analytics (#2279)

* chore: converge master-to-dev (#2281)

* chore: prepare app for continuous delivery
BREAKING CHANGE: v100.0.0

* chore: trigger v100.0.0 (#2237)

* chore(release): cut 100.0.0

# [100.0.0](v99.0.0...v100.0.0) (2023-02-27)

### chore

* prepare app for continuous delivery ([8db6c88](8db6c88))

### BREAKING CHANGES

* v100.0.0

* fix: set height on chart container when not defined (#2246) (#2250)

This fixes a cutoff issue in dashboard.
It didn't affect the app, where everything still seems to work fine.

Co-authored-by: Edoardo Sabadelli <edoardo@dhis2.org>

* chore(release): cut 100.0.1

## [100.0.1](v100.0.0...v100.0.1) (2023-03-23)

### Bug Fixes

* set height on chart container when not defined ([#2246](#2246)) ([#2250](#2250)) ([a922569](a922569))

* fix: remove translucent layer by using app-scripts 10.3.4 (DHIS2-15008) (#2251)

* chore(release): cut 100.0.2

## [100.0.2](v100.0.1...v100.0.2) (2023-03-27)

### Bug Fixes

* remove translucent layer by using app-scripts 10.3.4 (DHIS2-15008) ([#2251](#2251)) ([9d62ca7](9d62ca7))

* chore(deps-dev): bump loglevel from 1.7.1 to 1.8.1 (#2199)

Bumps [loglevel](https://github.com/pimterry/loglevel) from 1.7.1 to 1.8.1.
- [Release notes](https://github.com/pimterry/loglevel/releases)
- [Commits](pimterry/loglevel@v1.7.1...v1.8.1)

---
updated-dependencies:
- dependency-name: loglevel
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

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

* chore(deps): bump reselect from 4.0.0 to 4.1.7 (#2229)

Bumps [reselect](https://github.com/reduxjs/reselect) from 4.0.0 to 4.1.7.
- [Release notes](https://github.com/reduxjs/reselect/releases)
- [Changelog](https://github.com/reduxjs/reselect/blob/master/CHANGELOG.md)
- [Commits](reduxjs/reselect@v4.0.0...v4.1.7)

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

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

* fix: plugin sends installation status (#2277)

Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>

* chore(release): cut 100.0.3

## [100.0.3](v100.0.2...v100.0.3) (2023-05-03)

### Bug Fixes

* plugin sends installation status ([#2277](#2277)) ([de989c3](de989c3))

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: @dhis2-bot <apps@dhis2.org>
Co-authored-by: Edoardo Sabadelli <edoardo@dhis2.org>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>

* test: add extended timeout for file open modal (#2284)

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mozafar <kabaros@gmail.com>
Co-authored-by: Edoardo Sabadelli <edoardo@dhis2.org>
Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>
Co-authored-by: @dhis2-bot <apps@dhis2.org>
Co-authored-by: Martin <martin@moid.se>
Co-authored-by: Kai Vandivier <49666798+KaiVandivier@users.noreply.github.com>
edoardo added a commit that referenced this pull request Oct 23, 2023
…2236)

* fix: do not pass a boolean for icons when saving

If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.

* fix: hide icon from visualization when option is toggled

This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.

* fix: fetch data element icon and pass it in extraOptions

This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.
edoardo added a commit that referenced this pull request Oct 23, 2023
…2236)

* fix: do not pass a boolean for icons when saving

If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.

* fix: hide icon from visualization when option is toggled

This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.

* fix: fetch data element icon and pass it in extraOptions

This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.
edoardo added a commit that referenced this pull request Nov 24, 2023
…2236)

* fix: do not pass a boolean for icons when saving

If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.

* fix: hide icon from visualization when option is toggled

This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.

* fix: fetch data element icon and pass it in extraOptions

This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.
janhenrikoverland added a commit that referenced this pull request Dec 14, 2023
* chore(deps): bump tar from 4.4.13 to 4.4.19 (#1946)

Bumps [tar](https://github.com/npm/node-tar) from 4.4.13 to 4.4.19.
- [Release notes](https://github.com/npm/node-tar/releases)
- [Changelog](https://github.com/npm/node-tar/blob/main/CHANGELOG.md)
- [Commits](isaacs/node-tar@v4.4.13...v4.4.19)

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

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

* feat: support non-gregorian fixed periods (#2233)

* feat: support non-gregorian fixed periods

* test: fix test failing due to change in single value behaviour

---------

Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>

* fix: dependency updates (#2243)

* fix: update cli-app-scripts and analytics deps

* chore: configure continuous delivery workflows (#2254)

There are 4 workflows:

verify PR (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod

verify commit to dev (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod, report-failure-to-slack

verify commit to master (dhis2-verify-app.yml)
-- build, lint, test, e2e-prod, release, report-failure-to-slack

nightly (nightly.yml)
-- e2e-dev, report-failure

In addition:

* e2e-prod and e2e-dev are reusable workflows and are called from dhis2-verify-app and nightly.
* removed uses: c-hive/gha-yarn-cache@v1 since it is deprecated and setup-node handles that work.
* updated action versions and node versions
* cypress test version tagging for features and bugs has been added (copied from line-list)

* feat: single value background color change based upon legend (DHIS2-13702) (#2223)

* feat: implement data icon option for SV visualization (DHIS2-10496) (#2236)

* fix: do not pass a boolean for icons when saving

If the option is not set, and thus its value is the same as the default
(false) remove it from the current object to avoid sending a boolean
value that the backend does not expect.
This was causing any save to return 500.

* fix: hide icon from visualization when option is toggled

This didn't work before because the icons option was removed from the
options object, but when the current object was merged with
the new options, it retained the original value.

* fix: fetch data element icon and pass it in extraOptions

This is needed for SV visualizations when the "Show data item icon"
options is checked and an icon is assigned to the dx dimension in the
maintenance app.
In that case the icon's SVG is fetched from the API and passed to the
visualization API in the extraOptions object.
The SVG generator embeds the icon in the SVG so it appears on the side
of the value.

* chore: manually bump deps (#2543)

* chore: upgrade cypress to v12 and adjust project to it

* chore: remove videos

* chore: switch test server to debug (test.e2e is broken/slow)

* chore: revert the test server changes and move to a separate PR

* test: refactor clickCheckbox to check/uncheckCheckbox

* test: add helper functions for totals options

* test: add tests for cumulativeValues option in PT

* refactor: allow non toggleable select to be disabled

* refactor: allow checkbox options to be disabled

* feat: disable option when cumulativeValues is checked in PT DHiS2-15728

* refactor: add helper text when used in PT DHIS2-15727

* feat: disabled options based on cumulativeValues in PT DHIS2-15728

* chore: update pot file

* feat: handle disabled option in Redux store

* refactor: revert changes to option components

* feat: handle disabled and helpText props for disabled options

* refactor: avoid extra prop and detect visType internally

* feat: remove disabled before passing object to visualization generator

* refactor: remove unnecessary code

* refactor: streamlined code

* fix: set disabledOptions on AO loading and vis type switching

* fix: fix bug which cause current to loose props

* chore: update pot file

* refactor: rename variable for clarity

* chore: fix rebase conflict resolutions

* fix: avoid crash when visualization object is empty (ie. New)

* refactor: allow disabled to be passed as prop

* refactor: allow legend related option to be disabled

* feat: disable legend option when cumulative values is enabled

* refactor: add styles for titles of disabled sections

* chore: regenerate pot file

* fix: avoid visualization flashing when changing options

Move the filtering of disabled options in the plugin, which is needed
anyway to have the visualization looking the same also in dashboards.

* refactor: simplify code for passing displayProperty

* refactor: avoid involuntary changes to current in Redux store

We still need to clone the object, and use it also for the various
checks on options.

* test: enhance tests, options and sorting

* test: use current year instead of hardcode it

* chore: use alpha version of analytics

* docs: add PT to the list of vis types for cumulative values

* chore: fix linting error

* chore(analytics): add support for cumulative values

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Mozafar <kabaros@gmail.com>
Co-authored-by: Jan Henrik Øverland <janhenrik.overland@gmail.com>
Co-authored-by: Jen Jones Arnesen <jennifer@dhis2.org>
Co-authored-by: Martin <martin@moid.se>
Co-authored-by: HendrikThePendric <hendrik@dhis2.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants