fix(explore): handle null control sections #20142
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
BEFORE/AFTER SCREENSHOTS OR ANIMATED GIF
The recent PR #20097 added explicit support for
null
-valued control panel sections. However, due to lacking TS coverage and type declarations in the codebase, these weren't always being checked properly. This caused Explore to fail to render when opening a Mixted timeseries chart with theGENERIC_CHART_AXES
feature flag disabled.This PR adds some missing types and filtering using the new type guard introduced in the aforementioned PR to ensure null sections are always skipped. A null value is also added to a control panel section fixture to make sure it doesn't break the utils.
Tip: enable "Hide whitespace" when reviewing the diff:
Note that this regression uncovered a pretty serious mistyping of the chart control panel config registry, but fixing it is beyond the scope of this PR.
TESTING INSTRUCTIONS
GENERIC_CHART_AXES
feature flagADDITIONAL INFORMATION