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: use PeriodDimension in ThematicDialog #3407

Draft
wants to merge 33 commits into
base: master
Choose a base branch
from

Conversation

BRaimbault
Copy link
Collaborator

@BRaimbault BRaimbault commented Nov 18, 2024

Implement: DHIS2-15796
Linked @dhis2/analytics PR: dhis2/analytics#1735


WORK IN PROGRESS

Main changes are:

  1. Use of SegmentedControl to select period type (presets / start-end dates)
  2. Use PeriodDimension period selector (transfer-style) for preset periods
  3. Update of RenderingStrategy that controls the use of single map / timeline / split-map
  4. Update of StartEndDate for start-end dates periods

1. SegmentedControl

  • src/components/edit/thematic/ThematicDialog.js

2. PeriodDimension

The new period selector used is PeriodDimension (transfer-style) is defined in @dhis2/analytics.

Most of the changes are orchestrated in:

  • src/components/edit/thematic/ThematicDialog.js
    And relies on modifications to support multiple periods:
  • src/util/analytics.js
  • src/actions/layerEdit.js
  • src/reducers/layerEdit.js
  • src/constants/actionTypes.js

We also updated and rename StartEndDates to StartEndDate to align with the Linelisting app but with an updated date picker CalendarInput from @dhis2/ui which supports multiple calendars.

EventDialog and TrackedEntityDialog are also updated to use StartEndDate:

  • src/components/edit/event/EventDialog.js
  • src/components/edit/trackedEntity/TrackedEntityDialog.js & src/components/edit/trackedEntity/PeriodTypeSelect.js

Small adjustments to RadioGroup are made

  • src/components/core/RadioGroup.js

Small adjustment to InterpretationMap is made to handle and array of periods:

  • src/components/interpretations/InterpretationMap.js

Smaller quality of life improvements are included:

  • Keyboard controls "Esc" & "Enter":
    • src/hooks/useKeyDown.js
    • src/components/datatable/BottomPanel.js
    • src/components/interpretations/InterpretationsToggle.js
    • src/components/map/Popup.js
    • src/components/download/DownloadSettings.js
    • src/components/edit/LayerEdit.js
    • src/components/layers/overlays/AddLayerPopover.js
    • src/components/layerSources/ManageLayerSourcesModal.js
    • src/components/orgunits/OrgUnitProfile.js
  • Added "x" close modal buttons:
    • src/components/edit/LayerEdit.js
    • src/components/layerSources/ManageLayerSourcesModal.js

Smaller bug fixes are included:

  • In TrackedEntityPopup and EventPopup, "Not set" text should be displayed also for data item with options:
    • src/components/map/layers/TrackedEntityPopup.js

Checklist:

  • Jest tests added
  • Cypress tests added
  • Manual testing complete
  • Dashboard tested
  • Update @dhis2/analytics dependency (to not point to d2-ci)

Before:

After:

@dhis2-bot
Copy link
Contributor

dhis2-bot commented Nov 18, 2024

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

@dhis2-bot dhis2-bot temporarily deployed to netlify November 18, 2024 16:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify November 25, 2024 15:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 2, 2024 16:05 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 3, 2024 08:49 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 3, 2024 14:40 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 4, 2024 14:58 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 5, 2024 12:36 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 5, 2024 16:04 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 6, 2024 10:42 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 6, 2024 17:04 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 9, 2024 17:54 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 10, 2024 14:35 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 11, 2024 10:46 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 11, 2024 11:36 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 12, 2024 12:03 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 12, 2024 12:39 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 12, 2024 15:38 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 13, 2024 13:41 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 13, 2024 15:25 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 18, 2024 08:58 Inactive
height: `${32 + rectTotalHeight}`,
bottom: `30`,
height: `${32 + rectTotalHeight}px`,
bottom: `30px`,
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think the backward tics are needed, just regular single quotes.

@dhis2-bot dhis2-bot temporarily deployed to netlify December 20, 2024 15:15 Inactive
@dhis2-bot dhis2-bot temporarily deployed to netlify December 20, 2024 15:52 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.

3 participants