plotly / plotly/plotly.js

[CHORE]: remove `scatter` trace from custom bundle

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

Ninguém assumiu esta issue ainda.

chore P3 plotly-internal size: 5 task
Linguagem predominante
JavaScript
Estrelas
18.3k
Forks
2k
Merge médio
2d 12h
PRs com merge (30d)
28

Descrição

Quoted from https://github.com/plotly/plotly.js/blob/main/CUSTOM_BUNDLE.md:

Please note that the scatter trace is currently included in all bundles and cannot be removed. This behaviour may change in the future, so we recommend that you explicitly include scatter anyway if you need it in your bundle.

There was previously an attempt to make scatter optional in #5535, but that PR was closed without being merged.

Since plotly.js is relatively large even when using a custom bundle, being able to exclude unused traces such as scatter would help further reduce the bundle size.

I'm not sure how much bundle size reduction this would result in, since scattergl, scatterternary and some other traces reuse parts of the scatter implementation. Still, it seems useful for custom bundles to avoid including trace modules that are not explicitly requested where possible.

Would it be worth to re-consider this optimization?

If scatter still needs to be included for architectural reasons, it may be worth updating the documentation? Since the PR is closed.

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.

Direção de pesquisa

Comece por CUSTOM_BUNDLE.md e pela discussão encerrada #5535 para entender a restrição atual do bundling de traces scatter. Verifique se bundles personalizados podem excluir scatter sem quebrar scattergl, scatterternary ou outros traces dependentes. A tarefa estará concluída quando scatter não solicitado for excluído com segurança ou quando a documentação explicar claramente por que ele precisa continuar incluído.

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

Avaliação

Stack de tecnologia
javascript
Domínio
build-system, data-visualization
Tipo de issue
Funcionalidade
Dificuldade
5/5
Tempo estimado
Mais de uma semana
Status de atividade
Ativa
Clareza
Precisa de esclarecimento
Facilidade para iniciantes
38/100

Receba novas issues na sua caixa de entrada

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