Skip to content

feat: support multiple timeline layers [DHIS2-19542]#3628

Open
BRaimbault wants to merge 38 commits intofeat/DHIS2-19542from
feat/DHIS2-19542-2alt
Open

feat: support multiple timeline layers [DHIS2-19542]#3628
BRaimbault wants to merge 38 commits intofeat/DHIS2-19542from
feat/DHIS2-19542-2alt

Conversation

@BRaimbault
Copy link
Collaborator

@BRaimbault BRaimbault commented Feb 19, 2026

Parent PR: #3584 > feat: support multiple split layers DHIS2-19542
Child PR: none

Implements DHIS2-19542

Description

This PR enables adding multiple timeline layers to a map.

image

Feats

  • Changes:
    • Move Timeline component from ThematicLayer component to map/Maps component.
    • Let map/Maps component pass period property down to ThematicLayer components so multiple timelines are updated in sync.
    • Handle scenario where currently selected period is removed from Timeline.
  • In:
    • src/components/map/layers/ThematicLayer.jsx
    • src/components/map/Map.jsx

 

  • Change the logic in the rendering strategy to allow timeline if other timeline layers are already there:
    • src/components/periods/RenderingStrategy.jsx
    • cypress/integration/layers/thematiclayer.cy.js

 

  • Changes:
    • Re-organise useEffects in ThematicDialog component.
    • Get filter (ie periods) from already present timeline layers.
    • Default to rendering strategy to timeline if one is already present.
    • Get default periods to match other timeline layer if exists.
    • Handle specifically scenario: "converting an single layer to a timeline layer and another timeline layer exist" to both sync period from other timeline and keep pre-existing single period selection as backup in case the user goes back.
    • Sync period change across split layers upon successful layer validation.
  • In:
    • src/components/edit/thematic/ThematicDialog.jsx
    • src/hooks/useLayersPeriodSync.js

 

  • Don't persist period backups beyond the editing session: src/components/edit/LayerEdit.jsx
  • Fix: losing other filters when periods are synced: src/reducers/map.js

Quality checklist

Add N/A to items that are not applicable.

  • Dashboard tested
  • Cypress and/or Jest tests added/updated
  • Docs added
  • d2-ci dependencies replaced (analytics or maps-gl link https://github.com/dhis2/[lib]/pull/XXX) N/A
  • Testers approved (BugBash 2026-03-03)

Testing

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Feb 19, 2026

🚀 Deployed on https://pr-3628.maps.netlify.dhis2.org

@dhis2-bot dhis2-bot temporarily deployed to netlify February 19, 2026 10:34 Inactive
@BRaimbault BRaimbault changed the title feat: support multiple timeline layers [DHIS2-19542] - sync periods whenever switches to "timeline" feat: support multiple timeline layers [DHIS2-19542] - sync periods whenever user switches to "timeline" Feb 19, 2026
@dhis2-bot dhis2-bot temporarily deployed to netlify February 24, 2026 14:12 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 24, 2026 17:39 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 24, 2026 17:56 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 24, 2026 18:03 Inactive
@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
1 New issue
1 New Code Smells (required ≤ 0)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 13:16 Inactive
@BRaimbault BRaimbault changed the title feat: support multiple timeline layers [DHIS2-19542] - sync periods whenever user switches to "timeline" feat: support multiple timeline layers [DHIS2-19542] Feb 26, 2026
@BRaimbault BRaimbault changed the base branch from master to feat/DHIS2-19542 February 26, 2026 14:27
@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 14:31 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 14:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 15:09 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 15:46 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 15:52 Inactive
@sonarqubecloud
Copy link

@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 16:14 Inactive
Copy link
Collaborator Author

@BRaimbault BRaimbault left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ready for review

@BRaimbault BRaimbault marked this pull request as ready for review February 26, 2026 16:33
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.

2 participants