Skip to content

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

@etpinard

Description

@etpinard

import PlotlyBase
import JSON
function DashBase.to_dash(p::PlotlyBase.Plot)
data = JSON.lower(p)
pop!(data, :config, nothing)
return data
end

import JSON
function DashBase.to_dash(p::PlotlyJS.SyncPlot)
data = JSON.lower(p.plot)
pop!(data, :config, nothing)
return data
end

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions