highcharts / highcharts/controls

Feature idea: Deduplicate defaults vs overrides in export output

Open
#11 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
0
Forks
0
PR merge metrics
No merged PRs in 30d

Description

I guess this is a fairly big change and only really relevant if we decide to use Controls as the basis for a new drop in editor (i.e. aiming for clean, production-ready configs rather than test-friendly verbosity).

`plotOptions` vs `series[]` is just one example. More generally, the editor currently repeats options at the override level even when they are identical to values already defined at a default level.

Idea is to, on export, strip options whose values are identical to the resolved defaults from higher up in the config hierarchy.
Example: if `plotOptions.series.color` is set, don’t include `series[i].color `unless it actually overrides it — but the same logic should apply anywhere in the API where defaults and overrides exist.

We could also expose this as an export option: clean/minimal output vs verbose output, so we keep the current behavior where it’s useful.

Why bother: cleaner configs, clearer intent (what’s default vs overridden), smaller output, and much nicer diffs since only real overrides show up.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.