[CHORE]: Update modebar button names to be more accurate/consistent
Ninguém assumiu esta issue ainda.
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 48/100
- Tipo de issue
- Refatoração
- Clareza
- Razoavelmente clara
- Status de atividade
- Pouca atividade
- Stack de tecnologia
- javascript
- Domínio
- data-visualization
Direção de pesquisa
Comece em src/components/modebar/buttons.js e src/components/modebar/constants.js para rastrear como os nomes dos botões e os valores de _cat se tornam aliases de remoção. Atualize os nomes e as categorias de modebar listados, depois execute npm run schema e verifique se test/plot-schema.json, src/types/generated/schema.d.ts e src/types/core/layout.d.ts refletem as alterações na API pública.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
Description
Update existing modebar button/group names to be more accurate/consistent.
Three related inconsistencies in how modebar buttons are named:
resetViewSankeyreports a differentnamethan its key. It is registered asmodeBarButtons.resetViewSankeybut carriesname: 'resetSankeyGroup'- the only mismatch among the 37 buttons. Removing it therefore requiresmodeBarButtonsToRemove: ['resetSankeyGroup'], whileconfig.modeBarButtonsgroups use'resetViewSankey'._cat: 'reset'matches onlyresetGeo. It reads like a category but leavesresetViews,resetScale2d,resetViewMap, and the sankey reset in place._cat: 'resetView'matches onlyresetViewMap, so it misses the sankey reset despite the name suggesting otherwise.
All of these strings are advertised in the layout.modebar.remove enumeration (48 entries), so they are public API.
Why should this change be made?
Users reasonably expect a button's removal string to match its key, and a category alias to cover a family. Today remove: 'reset' and remove: 'resetView' silently no-op on most reset buttons, and the sankey button can only be removed by a name that appears
nowhere else. Compare the aliases that do behave as categories: zoom (2 buttons), pan (2), zoomin / zoomout (3 each), hoverclosest (4).
Scope
src/components/modebar/buttons.js-nameonresetViewSankey, and the_catvalues forreset/resetView.src/components/modebar/constants.jsbuildsforeButtonsfromname+_cat, so any change regenerates the schema enumeration (npm run schema, committingtest/plot-schema.jsonandsrc/types/generated/schema.d.ts).src/types/core/layout.d.ts-ModeBarDefaultButtonscurrently lists bothresetViewSankeyandresetSankeyGroup
Notes
- All of these changes are breaking
- Nothing is wrong with the current code, but it can be confusing
_catcasing is inconsistent (hoverCompare,resetCameraDefault,resetViewvshoverclosest,zoomin,autoscale) and should be addressed at the same time (though it's only cosmetic)- Every item breaks working code - renaming the sankey
nameinvalidatesmodeBarButtonsToRemove: ['resetSankeyGroup'], and widening the_cataliases makes existingremovecalls take out more buttons. So this belongs in a major release; v4 is the window if it's wanted at all. Separately,_catcasing is inconsistent (hoverCompare,resetCameraDefault,resetViewvshoverclosest,zoomin,autoscale) - cosmetic only, since matching lowercases both sides.
- Linguagem predominante
- JavaScript
- Estrelas
- 18.3k
- Forks
- 2k
- Merge médio
- 2d 17h
- PRs com merge (30d)
- 22
Guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de plotly/plotly.js
-
bug
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 85/100
-
chore P3 plotly-internal size: 3 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 77/100
-
chore P1 plotly-internal size: 1 task
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 82/100
-
chore P3 plotly-internal size: 1 task
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
-
bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
Todas as issues de plotly/plotly.js
Issues semelhantes
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
-
area-deployment area-integrations triage:bot-seen
Dificuldade 2/5 Meio dia Facilidade para iniciantes 86/100
-
Issue-Bug
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
sugarlabs/musicblocks#8924 ·
-
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 90/100
ArduPilot/ardupilot_wiki#8088 ·
-
[BUG] createTool tools cannot be registered with Mastra when exactOptionalPropertyTypes is enabled Abertacustomer-eng status: needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 84/100