data-visualizer-app
data-visualizer-app copied to clipboard
fix: remove d2
Implements DHIS2-XXXX
Key features
- prepare to get rid of
d2entirely
Description
This branch has changes to remove the need for d2.
There is still one place where d2 is needed and we don't have an alternative at the moment, the user data store.
TODO
- [x] figure out how to use the user data store without
d2 - [ ] lots of regression testing
- [x] fix tests, particularly the App.js tests, but before touching them we should figure out how we want to test, what should be tested in Cypress and what in unit tests
- [ ] look for and clean up more code not needed
- [x] see if it's possible to avoid fetching all user authorities to check for the
ALL, do we really need theisSuperuserflag?
Known issues
- [x] the user data store is used to store the visualization object when switching visualization from DV to Maps. Currently it relies on
d2as it's using some classes defined in that package. - [x] now that with this PR DV uses the app service data for getting/setting the current AO in the user data store, Maps should be updated in order to read the AO from the same key, since the app service stores the key under
settings. Fixed here.
Screenshots
Not very meaningful but this is the app running on this branch:

🚀 Deployed on https://pr-2125--dhis2-data-visualizer.netlify.app
22 failed tests on run #1624 ↗︎
Details:
| fix: set displayProperty from user settings required by Visualization | |||
| Project: Data Visualizer App | Commit: 2840c2761c |
||
| Status: Failed | Duration: 08:07 💡 | ||
| Started: Feb 9, 2023 11:22 AM | Ended: Feb 9, 2023 11:30 AM | ||
open.cy.js • 14 failed tests
dimensions/period.cy.js • 3 failed tests
visTypes/scatter.cy.js • 1 failed test
| Test | ||
|---|---|---|
| using a Scatter chart > saves and displays items in the correct places |
Screenshot
|
|
confirmLeave.cy.js • 4 failed tests
This comment has been generated by cypress-bot as a result of this project's GitHub integration settings.
🚀 Deployed on https://pr-2125--dhis2-data-visualizer.netlify.app
Closing. Superseded by #3023 .