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

Make Lib.nestedProperty an npm module of its own #2138

Closed
etpinard opened this issue Nov 1, 2017 · 2 comments
Closed

Make Lib.nestedProperty an npm module of its own #2138

etpinard opened this issue Nov 1, 2017 · 2 comments

Comments

@etpinard
Copy link
Contributor

etpinard commented Nov 1, 2017

So that users and plotly.js consumer projects can use it!

The tricky part will be to factor out the core nested property logic from the plotly.js-specific parts (namely plot_api/container_array_match.js).

Wrapping nestedProperty in a constructor should do the trick. For example, plotly.js/src/lib/nested_property.js could become:

var NestedProperty = require('@plotly/nested-property');
var containerArrayMatch = require('../plot_api/container_array_match');

module.exports = new NestedProperty({containerArrayMatch: containerArrayMatch});

cc @bpostlethwaite @alexcjohnson

@alexcjohnson
Copy link
Collaborator

@etpinard sounds great! The only change I'd suggest is instead of containerArrayMatch, factor out isDeletable - there's more plotly.js-specific logic in there than just containerArrayMatch. That said, this logic is fairly obtuse and always makes me wonder how much would really be lost if we ditched it or at least simplified it...

@etpinard
Copy link
Contributor Author

etpinard commented May 8, 2019

Probably not going to happen in the near future. Closing.

@etpinard etpinard closed this as completed May 8, 2019
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

No branches or pull requests

2 participants