fix: change static legend's hide property to show #21648
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.
In support of influxdata/ui#1666
On the backend, static legend's properties must always be tracked. For
hide
there are really 3 states: true, false, or not set.This is different than on the frontend, where Giraffe sees a lack of a "static legend" object to mean that static legend is not desired. And static legend's hide property is for convenience; it is a way to temporarily hide the static legend without removing (and later rebuilding) the entire object. Thus it is the static legend object itself that is analogous to the backend's
hide
property -- and has 3 states: staticLegend.hide is true, staticLegend.hide is false, or the lack of staticLegend.Thus, on the backend we should change
hide
toshow
to accurately reflect "not set" to be the same as false.