Skip to content

refactor: reorganise visualization module - #367

Draft
HendrikThePendric wants to merge 1 commit into
feat/unapplied-changes-DHIS2-22011from
refactor/reorganise-visualization-module
Draft

HendrikThePendric wants to merge 1 commit into
feat/unapplied-changes-DHIS2-22011from
refactor/reorganise-visualization-module

Conversation

@HendrikThePendric

@HendrikThePendric HendrikThePendric commented Sep 3, 2026

Copy link
Copy Markdown
Collaborator

Implements N/A

Description

This does not need a thorough review since all this PR does is move some stuff around.

The main issue was that state.ts held six unrelated concerns in 684 lines. Each now lives in a file with a more specific name. I tried to stick to the general guideline that says "a file should be named for what it produces", but this didn't always work completely, so we now ended up withguards, normalize-legacy, ui-config, save, and current-vis (which now also has buildCurrentVisFromVisUiConfig from the store, since that produces a CurrentVisualization). state.ts keeps the comparison.

removeDimensionPropertiesBeforeSaving was moved to the dimension domain: it produces a DimensionArray and has callers in two concerns.


Quality checklist

  • Cypress and/or Jest tests added/updated N/A
  • Docs added
  • d2-ci dependency replaced N/A

ToDo


Some files had grown a bit out of control
@dhis2-bot

Copy link
Copy Markdown
Contributor

🚀 Deployed on https://pr-367.event-visualizer.netlify.dhis2.org

@dhis2-bot
dhis2-bot temporarily deployed to netlify September 3, 2026 10:42 Inactive
@sonarqubecloud

sonarqubecloud Bot commented Sep 3, 2026

Copy link
Copy Markdown

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.

3 participants