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: cumulative values in PT (DHIS2-5497) #2746

Merged
merged 47 commits into from
Dec 14, 2023

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Aug 25, 2023

Implements DHIS2-5497

Requires dhis2/analytics#1567


Key features

  1. add cumulativeValues option in PT
  2. disable Totals, Number type and Use legend for chart colors options when cumulativeValues is checked
  3. add helper texts on options to explain the behaviours
  4. added Cypress helper functions and test for the cumulativeValues option

Description

The cumulativeValues option is already implemented for other vis types.
We reuse the same option for PT so we don't need any change in the backend, but it requires some custom behaviours because in PT when cumulativeValues is enabled other options don't make sense and should be disabled.


Known issues

  • when totals and numberType options are disabled, they are still applied to the PT table if their values are initialised (checkboxes checked and select with a selection).

Screenshots

Data tab in Options modal with cumulativeValues unchecked for PT vis type:
Screenshot 2023-08-25 at 16 05 06

Data tab in Options modal with cumulativeValues checked for PT vis type:
Screenshot 2023-11-13 at 14 31 39

Legend tab in Options modal with cumulativeValues checked for PT vis type:
Screenshot 2023-11-13 at 14 31 45
Screenshot 2023-11-13 at 14 32 02

@edoardo edoardo marked this pull request as draft August 25, 2023 14:05
@dhis2-bot
Copy link
Contributor

dhis2-bot commented Aug 25, 2023

@cypress
Copy link

cypress bot commented Aug 25, 2023

Passing run #2584 ↗︎

0 458 1 0 Flakiness 0

Details:

Merge 24c826c into 65441f2...
Project: Data Visualizer App Commit: dafaf9c032 ℹ️
Status: Passed Duration: 06:27 💡
Started: Dec 14, 2023 2:42 PM Ended: Dec 14, 2023 2:48 PM

Review all test suite changes for PR #2746 ↗︎

@edoardo edoardo changed the title feat: cumulativeValues in PT DHIS22-5497 feat: cumulativeValues in PT DHIS2-5497 Aug 28, 2023
@dhis2-bot dhis2-bot temporarily deployed to netlify August 30, 2023 14:48 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify August 31, 2023 08:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 1, 2023 09:51 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 1, 2023 12:53 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify September 1, 2023 13:02 Inactive
@cypress
Copy link

cypress bot commented Sep 27, 2023

19 failed tests on run #2393 ↗︎

19 0 0 608 Flakiness 0

Details:

fix(deps): platform deps for login redirect [DHIS2-15319] (#2300)
Project: Data Visualizer App Commit: 390e6b0520
Status: Failed Duration: 05:19 💡
Started: Sep 27, 2023 1:22 PM Ended: Sep 27, 2023 1:27 PM
Failed  dimensions/data.cy.js • 1 failed test • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
Data dimension > initial state > navigates to the start page Output Screenshots Video
Failed  options/fontStyles.cy.js • 1 failed test • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
Options - Font styles > navigates to the start page and adds a data item Output Screenshots Video
Failed  options/legend.cy.js • 1 failed test • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
Options - Legend > Applying a legend: Column > navigates to the start page and adds data items Output Screenshots Video
Failed  open.cy.js • 1 failed test • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
opening a saved AO > navigates to the start page Output Screenshots Video
Failed  new.cy.js • 1 failed test • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
creating a new AO > navigates to the start page Output Screenshots Video

The first 5 failed specs are shown, see all 19 specs in Cypress Cloud.

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

@edoardo edoardo force-pushed the feat/pt-cumulative-values-DHIS2-5497 branch from 48bfa52 to 30368b7 Compare October 23, 2023 10:47
@dhis2-bot dhis2-bot temporarily deployed to netlify October 23, 2023 10:50 Inactive
@edoardo edoardo force-pushed the feat/pt-cumulative-values-DHIS2-5497 branch from 9aea213 to ebee722 Compare October 23, 2023 14:18
@dhis2-bot dhis2-bot temporarily deployed to netlify October 23, 2023 14:23 Inactive
@edoardo edoardo marked this pull request as ready for review October 24, 2023 07:34
@dhis2-bot dhis2-bot temporarily deployed to netlify November 13, 2023 13:20 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 24, 2023 09:02 Inactive
dependabot bot and others added 8 commits November 24, 2023 10:02
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] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* feat: support non-gregorian fixed periods

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

---------

Co-authored-by: Jan Henrik Øverland <[email protected]>
* fix: update cli-app-scripts and analytics deps
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)
…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 edoardo force-pushed the feat/pt-cumulative-values-DHIS2-5497 branch from 4a85a12 to ef0f79d Compare November 24, 2023 09:03
@dhis2-bot dhis2-bot temporarily deployed to netlify November 24, 2023 09:05 Inactive
We still need to clone the object, and use it also for the various
checks on options.
@dhis2-bot dhis2-bot temporarily deployed to netlify November 24, 2023 13:46 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 11, 2023 11:03 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 12, 2023 08:32 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 14, 2023 14:05 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 14, 2023 14:35 Inactive
@janhenrikoverland janhenrikoverland merged commit bff69ab into dev Dec 14, 2023
17 checks passed
@janhenrikoverland janhenrikoverland deleted the feat/pt-cumulative-values-DHIS2-5497 branch December 14, 2023 15:20
@janhenrikoverland janhenrikoverland changed the title feat: cumulativeValues in PT DHIS2-5497 feat: cumulative values in PT DHIS2-5497 Dec 14, 2023
@janhenrikoverland janhenrikoverland changed the title feat: cumulative values in PT DHIS2-5497 feat: cumulative values in PT (DHIS2-5497) Dec 14, 2023
@cypress cypress bot mentioned this pull request Dec 14, 2023
dhis2-bot added a commit that referenced this pull request Dec 14, 2023
# [100.4.0](v100.3.1...v100.4.0) (2023-12-14)

### Bug Fixes

* **translations:** sync translations from transifex (dev) ([65441f2](65441f2))
* **translations:** sync translations from transifex (dev) ([005be59](005be59))

### Features

* cumulative values in PT (DHIS2-5497) ([#2746](#2746)) ([bff69ab](bff69ab)), closes [#1946](#1946)
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.4.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

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.

7 participants