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

persist callback graph layout when callbacks fire #1408

Merged
merged 5 commits into from
Sep 15, 2020

Conversation

alexcjohnson
Copy link
Collaborator

@alexcjohnson alexcjohnson commented Sep 15, 2020

Fixes #1401
Fixes #1402

The way I stored the callback graph layout is hacky: I just mutated the value in the redux store directly to insert it. I did this because I didn't want it to trigger a rerender of the callback graph (a potentially infinite loop), since I'm just recording changes that have already been drawn by cytoscape, so that they'll be available for the next time the graph is rendered. But I neglected to check that this info stuck around when new profile information is added - now it does. If there's a better pattern for this kind of use case I'd be happy to learn about it, but this works. I included a test specifically for #1402 but #1401 is also solved, it's the same issue.

Contributor Checklist

  • I have run the tests locally and they passed. (refer to testing section in contributing)
  • I have added tests, or extended existing tests, to cover any new features or bugs fixed in this PR

optionals

  • I have added entry in the CHANGELOG.md

dash_duo.find_element("#add").click()
dash_duo.find_element(".dash-debug-menu__button--callbacks").click()
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Worked fine locally but failed on CI before this commit, because the "Add" button was hidden by the callback graph. The bug still applies if the callbacks are fired while the graph is hidden, so that's what the test now does... but this brings up that it would be nice at some point to be able to shrink and/or move the callback graph so you can still interact with whichever parts of the app you want to while it's open.

Copy link
Contributor

@Marc-Andre-Rivet Marc-Andre-Rivet left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💃🐱💻

@alexcjohnson alexcjohnson merged commit 06a4178 into dev Sep 15, 2020
@alexcjohnson alexcjohnson deleted the 1402-cb-graph-layout-fix branch September 15, 2020 14:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants