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: fix period filter and loading spinner when filtering in dashboard #3002

Merged
merged 2 commits into from
Mar 21, 2024

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Mar 20, 2024

Part of DHIS2-13858


Key features

  1. ensure only the 1st item selected for the period is used
  2. enable the loading spinner when plugin props change

Description

When applying filters in dashboard, it's possible to select more than 1 item for the period.
Outlier table only allows for 1 period item.
The fix is to always only use the 1st item for the period dimension, otherwise the outlier api returns an error.

When applying a filter in dashboard, the loading spinner of the plugin didn't trigger.
The fix enabled the loading spinner whenever the plugin props are updated, which causes a re-render of the visualization in the plugin.


Screenshots

Period filter before:
Screenshot 2024-03-20 at 13 57 53

Period filter after:
Screenshot 2024-03-20 at 13 59 12

Loading before:
Screenshot 2024-03-20 at 13 58 20

Loading after:
Screenshot 2024-03-20 at 13 59 04

edoardo added 2 commits March 20, 2024 13:48
This fixes a problem when a period filter with more than 1 item is
applied in dashboard.
Passing more than 1 item to the outlier api results in an error.
This happens for example when a filter is added in dashboard which
causes the visualization object to change and triggers a re-render of
the plugin.
@edoardo edoardo requested a review from jenniferarnesen March 20, 2024 13:00
@dhis2-bot
Copy link
Contributor

@dhis2-bot dhis2-bot temporarily deployed to netlify March 20, 2024 13:05 Inactive
Copy link

cypress bot commented Mar 20, 2024

2 flaky tests on run #2726 ↗︎

0 771 2 0 Flakiness 2

Details:

Merge c9bdcc9 into fe16062...
Project: Data Visualizer App Commit: 84ee7ee759 ℹ️
Status: Passed Duration: 06:51 💡
Started: Mar 20, 2024 1:36 PM Ended: Mar 20, 2024 1:43 PM
Flakiness  cypress/integration/dimensions/data.cy.js • 2 flaky tests • e2e-chrome-parallel-2.40

View Output Video

Test Artifacts
Data dimension > displays Event data items correctly Test Replay Screenshots Video
Data dimension > displays Program indicators correctly Test Replay Screenshots Video

Review all test suite changes for PR #3002 ↗︎

@edoardo edoardo merged commit 8a54037 into dev Mar 21, 2024
40 of 41 checks passed
@edoardo edoardo deleted the fix/period-filter-and-loading-in-dashboard branch March 21, 2024 08:09
@cypress cypress bot mentioned this pull request Mar 21, 2024
dhis2-bot added a commit that referenced this pull request Mar 21, 2024
## [100.5.1](v100.5.0...v100.5.1) (2024-03-21)

### Bug Fixes

* fix period filter and loading spinner when filtering in dashboard ([#3002](#3002)) ([8a54037](8a54037))
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.5.1 🎉

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.

3 participants