[CHORE]: Warn on config values that do not match the schema
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 77/100
- Issue type
- Feature
- Clarity
- Clearly specified
- Activity status
- Active
- Tech stack
- javascript
- Domain
- data-visualization
Research direction
Start in src/plot_api/plot_api.js at setPlotContext, then read src/plot_api/plot_config.js to understand configAttributes and its valType metadata. Check each applicable value with Lib.validate and warn on mismatches while skipping valType: 'any' attributes. Done means invalid typed values produce warnings without coercing or replacing values.
Written by the indexing model from the issue text.
Description
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.
- Dominant language
- JavaScript
- Stars
- 18.3k
- Forks
- 2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 30
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from plotly/plotly.js
-
chore P1 plotly-internal size: 1 task
Difficulty 1/5 Under an hour Newbie friendliness 82/100
-
chore P3 plotly-internal size: 1 task
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
bug infrastructure P2
Difficulty 1/5 Under an hour Newbie friendliness 65/100
-
feature good for agent P2 size: 3
Difficulty 1/5 1-3 hours Newbie friendliness 68/100
All issues in plotly/plotly.js
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 65/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
docToolchain/docToolchain#1705 ·
-
Timezone select lists one option per character; duplicate "Failed" reason; shared tracker popover id Openbug
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
nightscout/nocturne#1414 ·
-
bug v2
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
modelcontextprotocol/inspector#2458 · 1 comment ·
-
Mend: dependency security vulnerability status: needs triage 🕵️♀️
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
carbon-design-system/ibm-products#9907 ·