Skip to content

Decircularise a few things #837

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 10 commits into from
Aug 10, 2016
Merged

Decircularise a few things #837

merged 10 commits into from
Aug 10, 2016

Conversation

etpinard
Copy link
Contributor

@etpinard etpinard commented Aug 10, 2016

... a few steps towards (finally) fixing #236

In brief this PR:

  • remove a bunch of Plotly[module][method]() pattern. When the modules in question are free of circular dependency patterns, require modules directly instead of src/plotly.js.
  • refactor src/snapshot/ so that it is free of circular dependency patterns
  • refactor src/plots/polar/ ( 🎉 ) so that it is free of circular dependency patterns
  • patch up lib/ , namely loggers.js, dates.js and search.js to free it from circular dependencies
  • refactor components/modebar/ to make it more consistent with other components (and eventually more easily registrable).

@etpinard etpinard added this to the Decirculise the src directory dependencies milestone Aug 10, 2016
};

var extendDeepAll = Plotly.Lib.extendDeepAll;
var µ = module.exports = { version: '0.2.2' };
Copy link
Contributor

Choose a reason for hiding this comment

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

Why use µ when we could use this instead?

@mdtusz
Copy link
Contributor

mdtusz commented Aug 10, 2016

🎉 🎉 🎉 🎉 💃 🎉 🎉 🎉 🎉

by:
- not requiring Lib into plot_config.js to log error
- rm useless Lib.log in lib/dates.js
- require lib/loggers.js directly instead of Lib in lib/search.js
by:
- making modebar/index.js require what needs to be exposed
  for other parts of the code
- in consequence old modebar/index.js -> modebar/modebar.js
- var ModeBar = require('modebar/') and use ModeBar.manage
  in plot_api.js
@etpinard etpinard merged commit fffddcb into master Aug 10, 2016
@etpinard etpinard deleted the decircular-a-few-things branch August 10, 2016 20:58
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

Successfully merging this pull request may close these issues.

2 participants