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

Can the Dash frontend's URL be used in input in its callback functions? #82

Open
penyuan opened this issue Jan 26, 2021 · 1 comment
Open
Assignees
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@penyuan
Copy link
Contributor

penyuan commented Jan 26, 2021

URLs can use ? and # as "messages" to the server.

Can Dash accept URL customisations like this to dynamically alter its behaviour? A simple case would be for a user to specify dark vs light mode in the URL after a ?. More advanced applications might include doing this to specify which repository to visualise, trigger actions, or return a smaller "card" version of the dashboard to embed in other pages or even Markdown documents.

@penyuan penyuan added the enhancement New feature or request label Jan 26, 2021
@penyuan penyuan self-assigned this Jan 26, 2021
@penyuan
Copy link
Contributor Author

penyuan commented Jan 30, 2021

I wrestled with this for a while and discovered that it will, as Dash is currently implemented, create a circular dependency:

  1. User-supplied URL initialises menu options
  2. Those menu options then updates the URL which "becomes" the user-supplied URL
  3. Loop back to 1.

This issue is being discussed in the repository plotly/dash-core-components issue #44, but with no solution yet...

A compromise for now would be to only do 1., meaning a user can access specific repositories from the URL, but that URL wouldn't change as the users start changing the menu selections. This will need to be explained in the documentation, otherwise a user might get confused.

@penyuan penyuan added the help wanted Extra attention is needed label Jan 31, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

1 participant