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

[Question] Decoupled UI #715

Closed
lucasconstantino opened this issue May 12, 2019 · 4 comments
Closed

[Question] Decoupled UI #715

lucasconstantino opened this issue May 12, 2019 · 4 comments

Comments

@lucasconstantino
Copy link

lucasconstantino commented May 12, 2019

I'm a front-end developer, and am starting to work on a project which uses lots of data visualization. It has a backend already built on Python. My client likes Dash and the easiness the tool provides for data engineers to ship new visualizations. But, the project consists of many other features besides data visualizations, and those features would be much easier to implement if I had full control over the React application.

I'm trying to figure out a way to let backend developers use Dash to define visualization, but integrate them in a completely decoupled UI, also built on top of React.

Is this supported, or does anyone knows of sample code to achieve something similar?

Thanks

@alexcjohnson
Copy link
Collaborator

This is a tricky situation. Dash definitely wants to be the ringmaster.

You could package the rest of your front end as one or more specialized dash components https://github.com/plotly/dash-component-boilerplate. That would give the tightest integration between the datavis parts and the rest of the UI, but it requires using dash callbacks for communication between parts. Internal to any given specialized component you can do whatever kind of state management you want. And we do now have client-side callbacks #672 so your cross-component communication would not necessarily have to go through Python.

If that won't work, the only things I can think of are

  • Insert dash apps as iframes
  • Pull the results of the engineers' dash work out and remake the graphs in https://github.com/plotly/react-plotly.js. If there are some parameters that go into creating these graphs and you want to take over the UI for choosing those parameters but still use the dash back end to generate the figure, you could probably use the _dash-update-component endpoint - mimicking the request we generate in dash-renderer to retrieve the figure from Python.

@lucasconstantino
Copy link
Author

@alexcjohnson thanks very much for the overview and ideas! Me and my team have been working on this since yesterday, we forked dash-renderer and managed to build some interesting interfaces for a decoupled experience. We'll try and give all this back to the community soon enough ;)

@lucasconstantino
Copy link
Author

@alexcjohnson I would love if you could have a look at the effort so far: plotly/dash-renderer/pull/173

@gvwilson
Copy link
Contributor

Hi - we are tidying up stale issues and PRs in Plotly's public repositories so that we can focus on things that are most important to our community. If this issue is still a concern, please add a comment letting us know what recent version of our software you've checked it with so that I can reopen it and add it to our backlog. (Please note that we will give priority to reports that include a short reproducible example.) If you'd like to submit a PR, we'd be happy to prioritize a review, and if it's a request for tech support, please post in our community forum. Thank you - @gvwilson

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

No branches or pull requests

3 participants