-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
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/multi route modes #4318
base: master
Are you sure you want to change the base?
Feat/multi route modes #4318
Conversation
✅ Deploy Preview for ohif-platform-docs ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
✅ Deploy Preview for ohif-dev ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Should |
Hi there, this is a nice addition, any chance to get it merged ? |
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.
Could we get an integration test that demonstrates this, and a comment in the routes md file so that it is explained how to add it? Otherwise I think it looks good generally.
Hi, thank you for the feedback! Just to keep you in the loop, I will circle back to making the suggested changes, just not sure we have the time & bandwidth before RSNA 🤞 |
Context
The documentation mentions support for multi-route/multi-layout modes being planned in the future.
Given that we'd like to start using this functionality, we'd be happy to contribute it.
Changes & Results
Updated ModeRoute (
platform/app/src/routes/Mode/Mode.tsx
) to accept an optionalmodeRoutePath
proproute
of a given mode)route
object with the matchingpath
parameter frommode.routes
Updated buildModeRoutes logic (
platform/app/src/routes/buildModeRoutes.tsx
)In addition to generating & registering
/{mode.routeName}
and/{mode.routeName}/{dataSourceID}
paths, we generate & register for each route in a mode/{mode.routeName}/{mode.route[n].path}
route/{mode.routeName}/{mode.route[n].path}/{dataSourceID}
pathGiven that we still register the
/{mode.routeName}
and/{mode.routeName}/{dataSourceID}
paths, the router retains previous functionality.Testing
basic-dev-mode
or temporarily add the following to the longitudinal mode's (modes/longitudinal/src/index.ts
) routes:yarn dev
/viewer?...
URL/viewer/dicomweb?....
) still works/viewer/longitudinal?....
) worksviewer/panelless?...
) works and renders without any side panelsviewer/panelless/dicomweb?...
)Checklist
PR
feat(ModeRoute): add support for rendering an explicit route
feat(buildModeRoutes): generate an explicit route mapping for each route in a mode
My Pull Request title is descriptive, accurate and follows the
semantic-release format and guidelines.
Code
etc.)
Public Documentation Updates
additions or removals.
Tested Environment