Skip to content

v2 changes #5395

Closed
Closed

Description

@nicolaskruchten

Here's what we're going to do for v2, targeting a release in January or February 2020:

  • switch to native-promise-only and officially drop support for IE9 and IE10
  • stop exporting D3
  • stop exporting Plotly.plot
  • drop area, contourgl and pointcloud traces
  • drop support for polar plots in scatter (aka "micropolar"?) i.e. scatter.r and scatter.t and layout.angularaxis and layout.radialaxis and anything else related (cc @alexcjohnson anything else I missed?)

For reference, the primary trigger for version 2.0 is the native-promise-only change, with which we fully drop support for IE 9/10, even though that support has been eroding severely over the last couple of years. This change is driven by a desire to remove function constructors from as many of our bundles as possible for security reasons, as tracked in #897. Since we're doing a v2, we're trying to shed as much deprecated stuff as we can without being otherwise too-disruptive.

Activity

  1. nicolaskruchten commented on Jan 11, 2021

    @nicolaskruchten
    ContributorAuthor

    @alexcjohnson suggested the following, which I approve if they take less than a day:

    • change isPlainObject - either just drop the second clause or use something like the new one I found in Validation fails when running via JsDom in NodeJs #5151 - in principle this needn’t be a major but it feels a bit risky to me for some straight JS users
    • drop some other exports: it also may be nice to strip Plotly.Fx to just {hover, unhover, loneHover, loneUnhover} and Plotly.Plots to just {graphJson, resize}
  2. nicolaskruchten commented on Jan 11, 2021

    @nicolaskruchten
    ContributorAuthor

    Note to self: the plotly.com/javascript docs will need to stop relying on the built-in D3 :)

  3. added this to the NEXT milestone on Jan 12, 2021
  4. nicolaskruchten commented on Jan 20, 2021

    @nicolaskruchten
    ContributorAuthor

    @archmoj can you please provide a list as a comment in this issue of all the methods in our public API that have been dropped, so that folks like @cpsievert can easily grep for them in their own codebases. I've pinged the R/Julia/.Net downstream folks to let them know what's coming and directed them here :)

  5. archmoj commented on Jan 20, 2021

    @archmoj
    Contributor

    @archmoj can you please provide a list as a comment in this issue of all the methods in our public API that have been dropped, so that folks like @cpsievert can easily grep for them in their own codebases. I've pinged the R/Julia/.Net downstream folks to let them know what's coming and directed them here :)

    Here is a list of Plotly methods that are going to be removed in v2:

    "Plotly.d3",
    
    "Plotly.plot",
    
    "Plotly.Plots": [
        "modules",
        "allCategories",
        "allTypes",
        "subplotsRegistry",
        "transformsRegistry",
        "componentsRegistry",
        "layoutArrayContainers",
        "layoutArrayRegexes",
        "traceLayoutAttributes",
        "localeRegistry",
        "apiMethodRegistry",
        "collectableSubplotTypes",
        "register",
        "getModule",
        "traceIs",
        "getTransformIndices",
        "hasTransform",
        "getComponentMethod",
        "call",
        "attributes",
        "fontAttrs",
        "layoutAttributes",
        "fontWeight",
        "executeAPICommand",
        "computeAPICommandBindings",
        "manageCommandObserver",
        "hasSimpleAPICommandBindings",
        "redrawText",
        "previousPromises",
        "addLinks",
        "supplyDefaults",
        "supplyDefaultsUpdateCalc",
        "createTransitionData",
        "_hasPlotType",
        "cleanPlot",
        "linkSubplots",
        "clearExpandedTraceDefaultColors",
        "supplyDataDefaults",
        "supplyAnimationDefaults",
        "supplyAnimationFrameDefaults",
        "supplyAnimationTransitionDefaults",
        "supplyFrameDefaults",
        "supplyTraceDefaults",
        "hasMakesDataTransform",
        "supplyTransformDefaults",
        "supplyLayoutGlobalDefaults",
        "plotAutoSize",
        "supplyLayoutModuleDefaults",
        "purge",
        "style",
        "sanitizeMargins",
        "clearAutoMarginIds",
        "allowAutoMargin",
        "autoMargin",
        "doAutoMargin",
        "didMarginChange",
        "modifyFrames",
        "computeFrame",
        "recomputeFrameHash",
        "extendObjectWithContainers",
        "dataArrayContainers",
        "extendTrace",
        "extendLayout",
        "transition",
        "transitionFromReact",
        "doCalcdata",
        "rehover",
        "redrag",
        "generalUpdatePerTraceModule",
        "plotBasePlot",
        "cleanBasePlot"
    ],
    
    "Plotly.Fx": [
        "moduleType",
        "name",
        "constants",
        "schema",
        "attributes",
        "layoutAttributes",
        "supplyLayoutGlobalDefaults",
        "supplyDefaults",
        "supplyLayoutDefaults",
        "calc",
        "getDistanceFunction",
        "getClosest",
        "inbox",
        "quadrature",
        "appendArrayPointValue",
        "castHoverOption",
        "castHoverinfo",
        "click"
    ],
    
    "Plotly.Queue": [
        "add",
        "startSequence",
        "stopSequence",
        "undo",
        "redo",
        "plotDo"
    ],

    Milestone: https://github.com/plotly/plotly.js/milestone/60?closed=1

  6. nicolaskruchten commented on Jan 20, 2021

    @nicolaskruchten
    ContributorAuthor

    Hmmm is Plotly.purge() still around? and Plotly.extendTraces() ? I would expect that the only function from this page https://plotly.com/javascript/plotlyjs-function-reference/ to be removed would be Plotly.plot() no? @alexcjohnson confirm your intentions here plz?

  7. archmoj commented on Jan 20, 2021

    @archmoj
    Contributor

    Hmmm is Plotly.purge() still around? and Plotly.extendTraces() ? I would expect that the only function from this page https://plotly.com/javascript/plotlyjs-function-reference/ to be removed would be Plotly.plot() no? @alexcjohnson confirm your intentions here plz?

    Yes Plotly.purge() and `Plotly.extendTraces() are still around.
    The following methods are unchanged:

    "Plotly": [
        "version",
        "register",
        "newPlot",
        "restyle",
        "relayout",
        "redraw",
        "update",
        "react",
        "extendTraces",
        "prependTraces",
        "addTraces",
        "deleteTraces",
        "moveTraces",
        "purge",
        "addFrames",
        "deleteFrames",
        "animate",
        "setPlotConfig",
        "toImage",
        "validate",
        "downloadImage",
        "makeTemplate",
        "validateTemplate",
        "Icons",
        "Snapshot",
        "PlotSchema"
    ]
  8. nicolaskruchten commented on Jan 20, 2021

    @nicolaskruchten
    ContributorAuthor

    Ah ok so in your message above, it's Plotly.Plots.purge that is going away, and that's an alias to Plotly.purge?

    Also, in the message above, is Plotly.Plot the same thing as the Plotly.plot() function or something else? unsure if the capitalization matters here :)

  9. archmoj commented on Jan 20, 2021

    @archmoj
    Contributor

    Also, in the message above, is Plotly.Plot the same thing as the Plotly.plot() function or something else? unsure if the capitalization matters here :)

    Thanks for catching that! I edited the message above so that Plotly.plot is not capital.

  10. archmoj commented on Jan 20, 2021

    @archmoj
    Contributor

    Ah ok so in your message above, it's Plotly.Plots.purge that is going away, and that's an alias to Plotly.purge?

    No it is not an alias.
    Plotly.purge() performs other operations in addition to calling Plotly.Plots.purge()

    function purge(gd) {
    gd = Lib.getGraphDiv(gd);
    var fullLayout = gd._fullLayout || {};
    var fullData = gd._fullData || [];
    // remove gl contexts
    Plots.cleanPlot([], {}, fullData, fullLayout);
    // purge properties
    Plots.purge(gd);
    // purge event emitter methods
    Events.purge(gd);
    // remove plot container
    if(fullLayout._container) fullLayout._container.remove();
    // in contrast to _doPlots.purge which does NOT clear _context!
    delete gd._context;
    return gd;
    }

  11. nicolaskruchten commented on Jan 22, 2021

    @nicolaskruchten
    ContributorAuthor

    Updates:

    1. we're keeping role: "object" in the schema (because they're useful and consistent) and dropping the other role values (because they're inconsistent and therefore potentially dangerous to use and Plotly.py and docs don't use them)
    2. we're keeping pointcloud and marking it deprecated
    3. we're marking heatmapgl as deprecated
  12. dhirschfeld commented on Jan 28, 2021

    @dhirschfeld

    Just wondering if #5230 will make it in 2.0?

  13. archmoj commented on Jan 28, 2021

    @archmoj
    Contributor

    Just wondering if #5230 will make it in 2.0?

    I think new features like that could possibly be added in a minor afterwards e.g. v2.x.0

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions