Skip to content

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

Merged
BRaimbault merged 186 commits intofeat/DHIS2-19542-releasefrom
feat/DHIS2-19542-2alt
Mar 5, 2026
Merged

feat: support multiple timeline layers [DHIS2-19542]#3628
BRaimbault merged 186 commits intofeat/DHIS2-19542-releasefrom
feat/DHIS2-19542-2alt

Conversation

@BRaimbault
Copy link
Copy Markdown
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

 

  • Set thematic layer initialization within a thunk: src/components/edit/thematic/initializeThematicLayer.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

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 February 26, 2026 15:52 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify February 26, 2026 16:14 Inactive
Copy link
Copy Markdown
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
Copy link
Copy Markdown
Contributor

@HendrikThePendric HendrikThePendric left a comment

Choose a reason for hiding this comment

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

Looks great. I left a few suggestions. If possible, I would try to address my Cypress comment because these calls to cy.wait() can be the cause of flaky tests

Comment thread cypress/integration/layers/thematiclayer.cy.js
Comment thread src/components/edit/thematic/ThematicDialog.jsx Outdated
Comment thread src/components/edit/thematic/ThematicDialog.jsx
@dhis2-bot dhis2-bot temporarily deployed to netlify March 5, 2026 10:20 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify March 5, 2026 11:08 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify March 5, 2026 11:32 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify March 5, 2026 12:06 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify March 5, 2026 13:01 Inactive
Base automatically changed from feat/DHIS2-19542 to feat/DHIS2-19542-release March 5, 2026 13:16
@dhis2-bot dhis2-bot temporarily deployed to netlify March 5, 2026 13:23 Inactive
@sonarqubecloud
Copy link
Copy Markdown

sonarqubecloud Bot commented Mar 5, 2026

@dhis2-bot dhis2-bot temporarily deployed to netlify March 5, 2026 13:31 Inactive
@BRaimbault BRaimbault merged commit fd9eeab into feat/DHIS2-19542-release Mar 5, 2026
28 checks passed
@BRaimbault BRaimbault deleted the feat/DHIS2-19542-2alt branch March 5, 2026 13:39
dhis2-bot added a commit that referenced this pull request Mar 5, 2026
# [101.7.0](v101.6.1...v101.7.0) (2026-03-05)

### Features

* support multiple split layers [DHIS2-19542] ([#3584](#3584)) ([36d0e18](36d0e18))
* support multiple timeline layers [DHIS2-19542] ([#3628](#3628)) ([fd9eeab](fd9eeab))
@dhis2-bot
Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 101.7.0 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants