-
-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Devtools overhaul - now with reloadng and search! #386
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
Conversation
|
||
source = document.createElement('script'); | ||
source.id = 'source'; | ||
source.src = '../../build/plotly.js'; |
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.
🎉
Oh man. This will make my life so much easier. Thanks for doing this 🎉 |
</header> | ||
|
||
<section id="mocks-list"></section> | ||
<div id="plots"></div> |
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.
maybe the dashboard should start with a <div id="default-plot">
. Thoughts?
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.
Sure. It's hard to tell others usage of the dashboard but I usually plot with Tabs.fresh()
so it wasn't necessary.
|
||
var PORT = process.argv[2] || 3000; |
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.
nice touch.
@mdtusz looking great. One minor issue: could you make the graph container scrollable in the horizontal so that we can see the color bar in e.g |
Interesting. I have the plot-containers being resized to match the width but I'll add an |
Awesome. Let's 💃 |
This PR just touches devtools and adds some niceties for testing stuff out.
Tabs.reload()
- will tear down and re-load thePlotly
object.Tabs.onReload
- define a function onTabs.onReload
and it will be run wheneverTabs.reload()
is called.Tabs.purge()
- clear the testing area of all plots and images.Tabs.fresh(id)
- create a new fresh plot with the specifiedid
. Defaults to 'default-plot`Tabs.getGraph(id)
- same as before but now you can grab a specific plot.Tabs.snapshot(id)
- will create a snapshot of the specified plot