Skip to content

feat: support multiple split layers [DHIS2-19542]#3584

Open
BRaimbault wants to merge 71 commits intochore/DHIS2-18209-ThematicDialogfrom
feat/DHIS2-19542
Open

feat: support multiple split layers [DHIS2-19542]#3584
BRaimbault wants to merge 71 commits intochore/DHIS2-18209-ThematicDialogfrom
feat/DHIS2-19542

Conversation

@BRaimbault
Copy link
Collaborator

@BRaimbault BRaimbault commented Nov 20, 2025

Parent PR: #3588 > chore: refactor ThematicDialog to functional component DHIS2-18209
Child PR: #3628 > feat: support multiple timeline layers DHIS2-19542

Implements DHIS2-19542

Description

This PR enables adding multiple split layers to a map.

image

Feats

  • Add support for multiple thematic layers in split view component (handles the map):
    • src/components/map/SplitView.jsx
    • SplitView parent: src/components/map/MapView.jsx to pass layers as an array instead of single layer
    • Helpers to support multiple split layers: src/util/helpers.js

 

  • Allow adding a new thematic layer when a split layer is already there: src/components/layers/overlays/LayerList.jsx
  • Hide manage layer sources button on split view: src/components/layers/overlays/AddLayerPopover.jsx
image

 

  • Display rendering strategy on top in period tab: src/components/edit/thematic/ThematicDialog.jsx and src/components/edit/styles/LayerDialog.module.css
  • Let the user change rendering strategy if selected period type is start-end dates: src/components/edit/thematic/ThematicDialog.jsx#L268-L288
image

 

  • Change the logic in the rendering strategy to only allow split if no other layer or only split layers are already there: src/components/periods/RenderingStrategy.jsx
  • Change the logic to set default rendering strategy to split if a split layer is already there: src/components/edit/thematic/ThematicDialog.jsx#L193-L204
  • Get filter (ie periods) from already present split layers: src/components/edit/thematic/ThematicDialog.jsx#L111-L117
  • Change the logic to get set default periods to match other split layer if exists: src/components/edit/thematic/ThematicDialog.jsx#L222-L224
image

 

  • Delegate logic to test number of periods is compatible with rendering strategy to thematic layer validation, ie. we don't change to rendering: single if the number of selected periods <2 anymore, affects:
    • cypress/integration/layers/thematiclayer.cy.js
    • src/components/periods/__tests__/RenderingStrategy.spec.js
    • src/components/edit/thematic/validateThematicLayer.js

 

  • Sync period change across split layers upon successful layer validation:
    • src/components/edit/thematic/ThematicDialog.jsx#L308-L312
    • src/actions/map.js
    • src/constants/actionTypes.js
    • src/reducers/map.js

 

  • Indicate if the layer is of type: "Split" or "Timeline" in layer card (legend):
    • src/util/legend.js
    • src/components/layers/LayerCard.jsx
    • src/components/plugin/LegendLayer.jsx
image

Fixes

  • Update src/components/map/MapItem.jsx to properly handle 2 map items (DHIS2-19808).
image

 

Chores

  • Extract thematic layer validation into a util: src/components/edit/thematic/validateThematicLayer.js.
  • Address unrelated prop type warning: src/components/periods/CalendarInput.jsx
  • Address unrelated inconsistent file type: src/hooks/useLayersLoader.js and src/components/app/App.jsx

Quality checklist

Add N/A to items that are not applicable.


Testing

BRaimbault and others added 30 commits June 11, 2025 11:55
…ds to sort [DHIS2-6683] (#3541)

Implements DHIS2-6683

Description
* Disable text selection while dragging the layer cards
* Disable map interactivity while dragging the layer cards

The reason for the timeout in onSortEnd is because sometimes when releasing the
drag (mouseUp), the css change happened so fast that some text got selected
right at mouseUp. Delaying it 100ms seemed to fix that.
…[DHIS2-19716] (#3547)

Support both ALL and F_EXTERNAL_MAP_LAYER_PUBLIC_ADD as maps-app admin authorities.
Update "Remove all existing layers to add a split map view."
to "Remove all other layers to add a split map view."
@dhis2-bot dhis2-bot temporarily deployed to netlify January 13, 2026 11:05 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 13, 2026 11:28 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 13, 2026 12:01 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 13, 2026 12:21 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 20, 2026 16:03 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 22, 2026 08:26 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 23, 2026 18:04 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify January 30, 2026 10:08 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 3, 2026 13:07 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 10, 2026 09:28 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 10, 2026 11:25 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 10, 2026 11:32 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 10, 2026 12:19 Inactive
@sonarqubecloud
Copy link

@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 15:51 Inactive
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.

4 participants