Skip to content

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

Merged
merged 7 commits into from
Apr 6, 2016
Merged

Conversation

mdtusz
Copy link
Contributor

@mdtusz mdtusz commented Apr 1, 2016

This PR just touches devtools and adds some niceties for testing stuff out.

  1. Tabs.reload() - will tear down and re-load the Plotly object.
  2. Tabs.onReload - define a function on Tabs.onReload and it will be run whenever Tabs.reload() is called.
  3. Tabs.purge() - clear the testing area of all plots and images.
  4. Tabs.fresh(id) - create a new fresh plot with the specified id. Defaults to 'default-plot`
  5. Tabs.getGraph(id) - same as before but now you can grab a specific plot.
  6. Tabs.snapshot(id) - will create a snapshot of the specified plot
  7. Search through all the mocks - no more restarting to switch from cartesian/gl2d/geo/gl3d


source = document.createElement('script');
source.id = 'source';
source.src = '../../build/plotly.js';
Copy link
Contributor

Choose a reason for hiding this comment

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

🎉

@etpinard
Copy link
Contributor

etpinard commented Apr 1, 2016

Oh man. This will make my life so much easier. Thanks for doing this 🎉

</header>

<section id="mocks-list"></section>
<div id="plots"></div>
Copy link
Contributor

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?

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

nice touch.

@etpinard
Copy link
Contributor

etpinard commented Apr 6, 2016

@mdtusz looking great. One minor issue:

image

could you make the graph container scrollable in the horizontal so that we can see the color bar in e.g gl3d_surface-lighting ?

@mdtusz
Copy link
Contributor Author

mdtusz commented Apr 6, 2016

Interesting. I have the plot-containers being resized to match the width but I'll add an overflow: scroll; to it.

@etpinard
Copy link
Contributor

etpinard commented Apr 6, 2016

Awesome. Let's 💃

@mdtusz mdtusz merged commit 469012a into master Apr 6, 2016
@mdtusz mdtusz deleted the devtools-refresh branch April 6, 2016 18:42
@etpinard etpinard mentioned this pull request May 5, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature something new
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants