-
Notifications
You must be signed in to change notification settings - Fork 12
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: merge multi-calendar support from alpha to master #1434
Conversation
chore: update alpha branch with master
feat: use multi-calendar-dates library to generate fixed periods
# [24.5.0-alpha.1](v24.4.2...v24.5.0-alpha.1) (2023-02-07) ### Bug Fixes * ensure date falls back to year if no eraYear present ([2a197d5](2a197d5)) ### Features * use multi-calendar-dates library to generate fixed periods ([acc3801](acc3801))
fix: bump multi-calendar-dates to avoid jest config change
# [24.5.0-alpha.2](v24.5.0-alpha.1...v24.5.0-alpha.2) (2023-02-14) ### Bug Fixes * bump multi-calendar-dates to avoid jest config change ([3e5892a](3e5892a))
feat: localise multi-calendar fixed periods according to user locale
# [24.5.0-alpha.3](v24.5.0-alpha.2...v24.5.0-alpha.3) (2023-02-23) ### Features * localise fixed periods according to user settings ([c640c90](c640c90))
# [24.9.0-alpha.1](v24.8.0...v24.9.0-alpha.1) (2023-02-23) ### Bug Fixes * bump multi-calendar-dates to avoid jest config change ([3e5892a](3e5892a)) * ensure date falls back to year if no eraYear present ([2a197d5](2a197d5)) ### Features * localise fixed periods according to user settings ([c640c90](c640c90)) * use multi-calendar-dates library to generate fixed periods ([acc3801](acc3801))
@@ -6980,6 +6996,11 @@ classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1: | |||
resolved "https://registry.yarnpkg.com/classnames/-/classnames-2.3.1.tgz#dfcfa3891e306ec1dad105d0e88f4417b8535e8e" | |||
integrity sha512-OlQdbZ7gLfGarSqxesMesDa5uz7KFbID8Kpq/SxIoNGDqY8lSYs0D+hhtBXhcdB3rcbXArFr7vlHheLk1voeNA== | |||
|
|||
classnames@^2.3.2: | |||
version "2.3.2" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is a duplicate of classnames@^2.2.5, classnames@^2.2.6, classnames@^2.3.1
above.
Both should resolve to 2.3.2
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I updated it here since this PR was already merged.
# [24.9.0](v24.8.0...v24.9.0) (2023-02-24) ### Features * merge multi-calendar support from alpha to master ([#1434](#1434)) ([3cdac8f](3cdac8f))
🎉 This PR is included in version 24.9.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
* feat: use multi-calendar-dates library to generate fixed periods * fix: ensure date falls back to year if no eraYear present * refactor: remove unnecessary default value for config * test: fix failing test * chore(release): cut 24.5.0-alpha.1 [skip ci] * ensure date falls back to year if no eraYear present ([2a197d5](2a197d5)) * use multi-calendar-dates library to generate fixed periods ([acc3801](acc3801)) * fix: bump multi-calendar-dates to avoid jest config change * chore(release): cut 24.5.0-alpha.2 [skip ci] * bump multi-calendar-dates to avoid jest config change ([3e5892a](3e5892a)) * feat: localise fixed periods according to user settings * chore: bump @dhis2/multi-calendar-dates to main version * chore(release): cut 24.5.0-alpha.3 [skip ci] * localise fixed periods according to user settings ([c640c90](c640c90)) * chore(release): cut 24.9.0-alpha.1 [skip ci] * bump multi-calendar-dates to avoid jest config change ([3e5892a](3e5892a)) * ensure date falls back to year if no eraYear present ([2a197d5](2a197d5)) * localise fixed periods according to user settings ([c640c90](c640c90)) * use multi-calendar-dates library to generate fixed periods ([acc3801](acc3801)) * refactor: move period settings to parent container component --------- Co-authored-by: @dhis2-bot <apps@dhis2.org>
# [21.9.0](v21.8.2...v21.9.0) (2023-03-02) ### Features * merge multi-calendar support from alpha to master ([#1434](#1434)) ([9bacb7c](9bacb7c))
This PR includes the updates to alpha channel to use the multi-calendar-dates library to generate fixed periods in order to support non-Gregorian calendrical systems (such as Nepali and Ethiopic).
Implements DHIS2-14709. Used in this Data-Visualiser PR: dhis2/data-visualizer-app#2233
Notes
The previous implementation came with an comprehensive set of snapshot tests that cover all period generation scenarios and edge cases (especially with EPI week generation). This test suite guided this new implementation, to ensure that all the subtle edge cases were covered.
The bulk of these changes were reviewed by Edoardo, Abyot and Hendrik in this PR. The description and discussions there can provide more context for the changes.
Testing
This can be tested from the Data-Visualiser PR deploy link which uses the alpha release. For the purpose of merging this PR, the testing should concentrate on testing the Gregorian calendar fixed periods in Data-Visualiser and ensure that it still has the same behaviour as before.
[optional] Testing for other calendrical systems (ethiopic and nepali) can be done as well, but only for the FE, as we don't have a readily-available DHIS2 instance configured with these calendars.
Key features
BREAKING CHANGE
No breaking change. The existing period generation logic in analytics came with an exhaustive suite of tests. The library used those as a specs to guide the implementation, and make sure they all pass, so the library should not change the existing behaviour, only extend it to support other calendars ✅
Screenshots
dv-multi-calendars.mov