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

O3-578: Restore Generic Dashboard Links #733

Merged
merged 1 commit into from
Jun 28, 2022

Conversation

ibacher
Copy link
Member

@ibacher ibacher commented Jun 28, 2022

Requirements

  • This PR has a title that briefly describes the work done, including the ticket number if there is a ticket.
  • My work conforms to the OpenMRS 3.0 Styleguide.
  • My work includes tests or is validated by existing tests.

Summary

This is a very simple follow-up commit to O3-578 to fix a kind of obscure feature: the Generic Dashboards that are creatable via configuration rather than code. When calling createDashboardLink(), we're able to get the currentPath passed down to the DashboardExtension component. However, the Generic Dashboards widget directly creates a DashboardExtension component in a context where we don't have the currentPath design. This switches things so we rely on the location supplied by the react-router useLocation() hook which should work in both contexts and not add any noticeable overhead.

Screenshots

Related Issue

Other

@ibacher ibacher requested review from ZacButko and denniskigen June 28, 2022 18:51
ZacButko added a commit that referenced this pull request Jun 28, 2022
Removes the currentPath typing which will be obsolete when #733 is merged
@ibacher ibacher merged commit f19d297 into master Jun 28, 2022
@ibacher ibacher deleted the restore-generic-dashboard-links branch June 28, 2022 19:12
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.

2 participants