plotly / Dash.jl

Dash for Julia - A Julia interface to the Dash ecosystem for creating analytic web applications in Julia. No JavaScript required.
MIT License
486 stars 41 forks source link

Move `DashBase.to_dash` type-piracy definitions to DashBase repo #221

Closed etpinard closed 1 year ago

etpinard commented 1 year ago

https://github.com/plotly/Dash.jl/blob/d01ce73b4667991f3441e167816fd00a24a35a54/src/plotly_base.jl#L1-L8

https://github.com/plotly/Dash.jl/blob/d01ce73b4667991f3441e167816fd00a24a35a54/src/plotly_js.jl#L1-L7

are defining DashBase.to_dash methods on type the Dash module does not own. This is type-piracy!

We should move these method definitions to https://github.com/plotly/DashBase.jl inside package extension modules with PlotlyBase.jl and PlotlyJS.jl as weakdeps.

etpinard commented 1 year ago

related: https://github.com/plotly/Dash.jl/issues/214

etpinard commented 1 year ago

After resolving this issue, we'll be able to drop PlotlyBase as a dep.

Moreover, we'll be pretty close to dropping all references to the JSON package, with the exception of

https://github.com/plotly/Dash.jl/blob/d01ce73b4667991f3441e167816fd00a24a35a54/gen_resources/generator/github.jl#L45

https://github.com/plotly/Dash.jl/blob/d01ce73b4667991f3441e167816fd00a24a35a54/test/integration/dash_assets/test_dash_assets.py#L27