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: implement option set selector in Data dimension modal (DHIS2-17872) #1746

Open
wants to merge 31 commits into
base: master
Choose a base branch
from

Conversation

edoardo
Copy link
Member

@edoardo edoardo commented Jan 23, 2025

Implements DHIS2-17872

Relates to dhis2/data-visualizer-app#3324


Key features

  1. add icon in item selector for indicating a data item has an assigned option set
  2. implement a 2nd Transfer component for the "option view mode"
  3. move out some component for reuse and reduce duplication

Description

The "option view mode" is enabled via the list icon added to the data items with an assigned optionSetId.
When this mode is enabled, a separate Transfer component is shown in place of the "primary" one, which is just hidden but still present in the DOM.
This allows for all selections, highlights, filtering, etc... to persist after the "option view mode" is dismissed.
Both Transfer components are affecting the same selected items list and therefore changes made in one are automatically reflected in the other.

The "option view mode" Transfer component is using filters for fetching program data element options or program attribute options depending on the clicked data item.
The source (left) part of the Transfer is only listing the options for a specific data item/type.
The selected (right) part of the Transfer has the same list as the "primary" Transfer component.


TODO

  • enable programDataElementId/programAttributeId filters when the backend is ready

Known issues

  • issue

Screenshots

Data dimension modal:
Screenshot 2025-02-17 at 15 53 17

Data dimension with option view mode modal:
Screenshot 2025-02-20 at 14 19 51

Sorry, something went wrong.

@edoardo edoardo force-pushed the feat/option-set-selector-DHIS2-17872 branch from 16d3d4a to 939b77a Compare February 17, 2025 14:49
@edoardo edoardo marked this pull request as ready for review February 19, 2025 14:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants