[CHORE]: Warn on config values that do not match the schema
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 77/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- javascript
調査の方向性
src/plot_api/plot_api.js の setPlotContext から始め、次に src/plot_api/plot_config.js を読んで configAttributes とその valType メタデータを理解します。該当する各値を Lib.validate でチェックし、不一致がある場合は警告を出します。ただし、valType: 'any' の属性はスキップします。無効な型付き値が、値を強制変換または置換することなく警告を生成すれば完了です。
索引モデルが issue の本文から書いたものです。
説明
Description
Validate config values in setPlotContext against configAttributes and call Lib.warn on a mismatch.
Why should this change be made?
src/plot_api/plot_config.js says valType and values are documentation only, so a bad config value lands in _context in silence and fails somewhere else later.
Full coercion would replace bad values with defaults, which silently changes charts that work today. A warning gives the diagnostic benefit with no behavior change, and the hit rate tells us whether coercion is worth it later.
The metadata supports it: every typed config attribute is self-consistent, with no dflt outside its own values.
Scope
src/plot_api/plot_api.js- insetPlotContext, runLib.validate(value, attr)per key and warn on false- Skip the
valType: 'any'attributes.Lib.validateaccepts anything for them.
- 主要言語
- JavaScript
- スター
- 18.3k
- フォーク
- 2k
- 平均マージ
- 2日 10時間
- マージ済み PR(30日)
- 30
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
plotly/plotly.js のほかの issue
-
bug P2 size: 1
難易度 2/5 1〜3時間 初心者へのやさしさ 72/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
plotly/plotly.js の issue をすべて見る
似ている issue
-
ai-observability bug team/ai-observability
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
AllTheMods/ATM-10-L#19 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
SignalK/n2k-signalk#345 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
-
難易度 1/5 1〜3時間 初心者へのやさしさ 88/100
JuliaPluto/PlutoPlotly.jl#72 ·