[CHORE]: Describe `config.modeBarButtonsToRemove` values in the schema
還沒有人認領這個 Issue。
評估
- 難度
- 3/5
- 預估耗時
- 1-2 天
- 新手友好度
- 76/100
- Issue 類型
- 重構
- 描述清晰度
- 描述清楚
- 活躍度
- 活躍
- 技術堆疊
- javascript
- 領域
- build-system, tooling
研究方向
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.
由索引模型根據 Issue 內容生成。
描述
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.jswith new info - Update
tasks/generate_schema_types.mjsto handle the new type generation - Remove the hand written info from
src/types/core/layout.d.ts
- 主要語言
- JavaScript
- 星號
- 18.3k
- 分支
- 2k
- 平均合併
- 2 天 10 小時
- 30 天內合併 PR
- 30
貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
plotly/plotly.js 的其他 Issue
-
chore P3 plotly-internal size: 3 task
難度 2/5 1-3 小時 新手友好度 77/100
-
chore P1 plotly-internal size: 1 task
難度 1/5 1 小時以內 新手友好度 82/100
-
chore P3 plotly-internal size: 1 task
難度 2/5 1-3 小時 新手友好度 65/100
-
bug
難度 2/5 1-3 小時 新手友好度 65/100
-
bug infrastructure P2
難度 1/5 1 小時以內 新手友好度 65/100
相似的 Issue
-
bug confirmed issue
難度 2/5 1-3 小時 新手友好度 75/100
open-webui/open-webui#30750 · 1 則留言 ·
-
難度 2/5 1-3 小時 新手友好度 75/100
-
難度 2/5 1-3 小時 新手友好度 70/100
-
難度 2/5 1-3 小時 新手友好度 75/100
-
Mend: dependency security vulnerability untriaged
難度 2/5 1-3 小時 新手友好度 70/100