Skip to content

[CHORE]: Describe config.modeBarButtonsToRemove values in the schema #8063

Description

@camdecoster

Description

Replace valType: 'any' on config.modeBarButtonsToRemove with an enumerated list of the button names it accepts.

Why should this change be made?

Its description sends readers to ./components/modebar/buttons.js. The names are already derived as foreButtons in src/components/modebar/constants.js, and layout.modebar.remove interpolates that constant into its own description.

This publishes the 48 names for every language port, and lets the type generator derive the union that ModeBarDefaultButtons in src/types/core/layout.d.ts maintains by hand. Config options are never coerced, so no runtime behavior changes.

Scope

  • Update src/plot_api/plot_config.js with new info
  • Update tasks/generate_schema_types.mjs to handle the new type generation
  • Remove the hand written info from src/types/core/layout.d.ts

Activity

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

    P3backlogchoreTrack maintenance work (dependency bumps, build/CI, internal refactors, docs, etc.)plotly-internalsize: 1taskone-off task

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions