-
Notifications
You must be signed in to change notification settings - Fork 13
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: add support for hash routing which is used by other analytics apps [DHIS2-15762] #3009
Conversation
…lem with jest tests
🚀 Deployed on https://pr-3009--dhis2-maps.netlify.app |
1 flaky test on run #2859 ↗︎
Details:
cypress/integration/dataDownload.cy.js • 1 flaky test • e2e-chrome-parallel-2.40
Review all test suite changes for PR #3009 ↗︎ |
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've left some comments/questions....
Looking at the code changes it feels more likely that the re-rendering issues you encountered are related to history state changes rather than the useAlert
hook. But you have obviously found that creating this custom hook fixed the issue, so I guess there is either some interaction between these two things, or there is something at play that I don't fully understand.
… location and action
…eat/router-latest
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.
Awesome 🚀
# [100.3.0](v100.2.3...v100.3.0) (2024-01-12) ### Features * add support for hash routing in line with other analytics apps [DHIS2-15762] ([#3009](#3009)) ([b25267d](b25267d))
🎉 This PR is included in version 100.3.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
# [100.3.0](v100.2.3...v100.3.0) (2024-01-12) ### Features * add support for hash routing in line with other analytics apps [DHIS2-15762] ([#3009](#3009)) ([b25267d](b25267d))
* chore(release): cut 100.3.0 [skip release] # [100.3.0](v100.2.3...v100.3.0) (2024-01-12) ### Features * add support for hash routing in line with other analytics apps [DHIS2-15762] ([#3009](#3009)) ([b25267d](b25267d)) * chore(deps): bump @dhis2/app-runtime from 3.9.4 to 3.10.2 Bumps [@dhis2/app-runtime](https://github.com/dhis2/app-runtime/tree/HEAD/runtime) from 3.9.4 to 3.10.2. - [Release notes](https://github.com/dhis2/app-runtime/releases) - [Changelog](https://github.com/dhis2/app-runtime/blob/master/CHANGELOG.md) - [Commits](https://github.com/dhis2/app-runtime/commits/v3.10.2/runtime) --- updated-dependencies: - dependency-name: "@dhis2/app-runtime" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: @dhis2-bot <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jen Jones Arnesen <[email protected]>
* chore(release): cut 100.3.0 [skip release] # [100.3.0](v100.2.3...v100.3.0) (2024-01-12) ### Features * add support for hash routing in line with other analytics apps [DHIS2-15762] ([#3009](#3009)) ([b25267d](b25267d)) * chore(deps): bump @dhis2/app-runtime from 3.9.4 to 3.10.2 Bumps [@dhis2/app-runtime](https://github.com/dhis2/app-runtime/tree/HEAD/runtime) from 3.9.4 to 3.10.2. - [Release notes](https://github.com/dhis2/app-runtime/releases) - [Changelog](https://github.com/dhis2/app-runtime/blob/master/CHANGELOG.md) - [Commits](https://github.com/dhis2/app-runtime/commits/v3.10.2/runtime) --- updated-dependencies: - dependency-name: "@dhis2/app-runtime" dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <[email protected]> --------- Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: @dhis2-bot <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Jen Jones Arnesen <[email protected]>
Implements https://dhis2.atlassian.net/browse/DHIS2-15762
Continue to support the old url patterns for backwards compatibility
Supports:
The app supports legacy urls (see above) because dashboard-app still produces the legacy url for both opening the map, and opening an interpretation. In addition, urls to maps may have been shared in other ways. In maps-app, legacy urls are replaced with the new url style when the maps-app first opens (AppWrapper)
FileMenu
: push paths to history for the various actions. Also, some renaming was done in the file to (hopefully) increase clarity.useLoadMap
: this is where all the map loading and history listening is set up. history.listen implementation has been copied from LL and adjusted as needed to support maps.Refactoring. Previously there were 3 components that dealt with initiating the maps app: AppWrapper, App, AppLayout.
App
has become the former "AppLayout", and all of the loading and navigating logic has been moved to the new custom hookuseLoadMap