Hacktoberfest 2026: as issues que os mantenedores marcaram para outubro, abertas e boas para iniciantes. Ver issues do Hacktoberfest

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

Aberta
#8,063 0 comentários 0 reações 0 responsáveis Ver no GitHub

Ninguém assumiu esta issue ainda.

Avaliação

Dificuldade
3/5
Tempo estimado
1-2 dias
Facilidade para iniciantes
76/100
Tipo de issue
Refatoração
Clareza
Claramente especificada
Status de atividade
Ativa
Stack de tecnologia
javascript
Domínio
build-system, tooling

Direção de pesquisa

Start with the config.modeBarButtonsToRemove definition in src/plot_api/plot_config.js, then inspect src/components/modebar/constants.js and the generator in tasks/generate_schema_types.mjs. Compare the existing declaration in src/types/core/layout.d.ts. Done means the schema lists the accepted button names, generated types provide the union, and the handwritten declaration is removed without runtime changes.

Escrita pelo modelo de indexação a partir do texto da issue.

Descrição

chore P3 plotly-internal size: 1 task
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
Linguagem predominante
JavaScript
Estrelas
18.3k
Forks
2k
Merge médio
2d 10h
PRs com merge (30d)
30

Guia de contribuição

Abrir o guia de contribuição

Primeiros passos

  1. Leia a issue inteira e depois o guia de contribuição do projeto.
  2. Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
  3. Faça um fork do repositório e trabalhe em uma branch.
  4. Abra um pull request que referencie o número da issue.

Mais de plotly/plotly.js

Todas as issues de plotly/plotly.js

Issues semelhantes

Mais issues de JavaScript

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.