feat: axis disabling [DHIS2-21565]#249
Open
HendrikThePendric wants to merge 13 commits into
Open
Conversation
|
🚀 Deployed on https://pr-249.event-visualizer.netlify.dhis2.org |
5 tasks
Member
|
I've pushed a commit for the styles, which are now applied to the inner
So, design LGTM. Logic needs adjustment, as noted in Slack, we can discuss there. |
|
edoardo
approved these changes
Jun 3, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Implements DHIS2-21565
Description
This PR implements the following axis disabling features for pivot tables:
Disabling happens for dimensions that are not aggregatable, and a dimension is classified as aggregatable when:
dimensionTypeis one of:PROGRAM_INDICATORSTATUSCATEGORYCATEGORY_OPTION_GROUP_SETORGANISATION_UNIT_GROUP_SETORitsvalueTypeis numeric:NUMBERUNIT_INTERVALPERCENTAGEINTEGERINTEGER_POSITIVEINTEGER_NEGATIVEINTEGER_ZERO_OR_POSITIVEBOOLEANTRUE_ONLYMulti select
When in multi-select mode we use the same logic as we do when dragging a single dimension, but we apply the check to all items. So this means that if one out of many items is "non-aggregatable" the axis is disabled.
DnD hooks and helpers
While working on the
DraggableDimensionItemI found that the component was starting to get boated, so I created a hook to encapsulate the DnD logic. I found this to be quite a nice pattern so I decided to do it for the layout chip. Similarly, I needed to export a new helper from the DnD provider dir, and found some of the current helpers to be exported from a hook file, so I created a newdnd-data.tsfile and moved the helpers there.Quality checklist
ToDo
Screenshots