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

Improve UX of Script Tag Deployment/Usage #521

Closed
dannyrb opened this issue Jun 5, 2019 · 2 comments

Comments

@dannyrb
Copy link
Member

@dannyrb dannyrb commented Jun 5, 2019

One of our more popular use cases is dropping the viewer into an existing application, Google Colab, Python Notebook, or Codesandbox to provide a quick demonstration of something else, or a quick view of interesting imaging data.

Existing documentation for this approach lives here: https://docs.ohif.org/deployment/recipes/embedded-viewer.html

While it is currently easier than customizing and building the OHIF Viewer, it still has too many hurdles to provide the ease of use one would expect. These should be addressed so it truly feels "drop-in". We need to remember, and optimize for, the use cases and users that this approach makes sense for.

Existing Issues

  • Co-hosting, and configuring, the location of Cornerstone WebWorker scripts and codecs
    • We can improve this w/ the use of worker-loader in CornerstoneWADOImageLoader
  • Inclusion of global external dependencies
    • React, ReactDom, Stylesheets, etc.
  • Requiring React specific calls to attach our viewer to a DOM element
    • Provide a reasonable default id to attach to. Allow override w/ config when app bootstraps
  • Use hash routing for embedded scenarios to avoid history push state security issues (seems to occur more frequently when located in an iFrame)

@pieper has a good Google Colab playground for testing these requirements.

@pieper

This comment has been minimized.

Copy link
Member

@pieper pieper commented Jun 5, 2019

Here's an example that should be viewable by anyone:

https://colab.research.google.com/drive/1AVD_U1nO-vm5zZqXelUP1ZURJBpJXN-M

@dannyrb

This comment has been minimized.

Copy link
Member Author

@dannyrb dannyrb commented Aug 26, 2019

The bulk of this has been accomplished (thanks, @swederik!). If we find that hash routing is needed, we'll create a new issue.

@dannyrb dannyrb closed this Aug 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.