-
Notifications
You must be signed in to change notification settings - Fork 16
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
Feature/open chart as map [DHIS2-5987] #213
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One doubt, but I might have missed the spec for this, is the Open as map still supposed to be part of the chart type selector as per: https://projects.invisionapp.com/d/main#/console/12702965/266385321/preview @joeDHIS ?
…tAnalyticalObject"
…to user data store
…a store on app start
Tested the branch successfully |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks fine.
I just have one comment about prepareCurrentAnalyticalObject
.
I didn't try the branch yet, but I see @joakimia did test it.
packages/app/src/components/VisualizationTypeSelector/VisualizationTypeSelector.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i18n on the text and button labels?
🎉 This PR is included in version 33.0.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 32.1.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
🎉 This PR is included in version 33.1.13 🎉 The release is available on: Your semantic-release bot 📦🚀 |
This PR enables "Open as: Map" chart type in DV app.
User Data Store (UDS) has been chosen for data sharing across DV and Maps apps.
More details about user data store in docs.
Chart config format
After some discussion decision was made to remove some attributes from analytical object (AO) before putting it into user data store:
Reason: if user decides to open existing chart/AO in another app (e.g. maps), then we need to allow sharing only chart configuration (excluding name and interpretations).
How it works
Open as map use case
id
,name
,displayName
attributes from objectpath
attributes to org unit dimension itemsnamespace=analytics
andkey=currentAnalyticalObject
currentAnalyticalObject=true
Open visualization from map use case
currentAnalyticalObject
(assume yes for this use case)analytics
andcurrentAnalyticalObject
correspondingly)parentGraphMap
and puts it inui
redux object (required for org units tree functioning)acSetVisualization
action with fetched AO as argumentacSetUiFromVisualization
action with fetched AO as argumentacSetCurrentFromUi
action with updatedcurrent
redux store object