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: add support for hash routing in line with other analytics apps [DHIS2-15762] #3107

Merged
merged 2 commits into from
Jan 12, 2024

Conversation

jenniferarnesen
Copy link
Collaborator

…[DHIS2-15762] (#3009)

Implements https://dhis2.atlassian.net/browse/DHIS2-15762

Continue to support the old url patterns for backwards compatibility

Supports:

/#/ZBjCfSaLSqD
/#/ZBjCfSaLSqD/download
/#/ZBjCfSaLSqD?interpretationId=yKqhXZdeJ6a
/#/ZBjCfSaLSqD?interpretationId=yKqhXZdeJ6a&initialFocus=true
/#/currentAnalyticalObject
/#/download (new map, in download mode)

// legacy urls
/?id=ZBjCfSaLSqD
/?id=ZBjCfSaLSqD&interpretationid=yKqhXZdeJ6a
/?id=ZBjCfSaLSqD&interpretationId=yKqhXZdeJ6a
/?currentAnalyticalObject=true

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.

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 hook useLoadMap
@dhis2-bot
Copy link
Contributor

🚀 Deployed on https://pr-3107--dhis2-maps.netlify.app

@dhis2-bot dhis2-bot temporarily deployed to netlify January 12, 2024 07:43 Inactive
Copy link

cypress bot commented Jan 12, 2024

Passing run #2862 ↗︎

0 52 16 0 Flakiness 0

Details:

Merge 264af44 into 8110ed1...
Project: maps Commit: 0bef3f49d0 ℹ️
Status: Passed Duration: 07:39 💡
Started: Jan 12, 2024 8:29 AM Ended: Jan 12, 2024 8:36 AM

Review all test suite changes for PR #3107 ↗︎

Copy link

cypress bot commented Jan 12, 2024

Passing run #2863 ↗︎

0 52 16 0 Flakiness 0

Details:

chore: remove only from cypress test
Project: maps Commit: 264af44796
Status: Passed Duration: 07:43 💡
Started: Jan 12, 2024 9:02 AM Ended: Jan 12, 2024 9:09 AM

Review all test suite changes for PR #3107 ↗︎

@jenniferarnesen jenniferarnesen merged commit 3e33d25 into master Jan 12, 2024
28 checks passed
@dhis2-bot
Copy link
Contributor

🎉 This PR is included in version 100.3.0 🎉

The release is available on:

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