[fix] Hexbin layer color aggregation incorrect on load #2415
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.
PR Description
Fixes loading cycle layer validation in vis state mergers by moving
validateSavedVisualChannels()
to be done afternewLayer.validateVisConfig()
andnewLayer.updateLayerConfig()
.Specifically, I found that when loading a Hexbin layer with a saved config color aggregation mode of
count unique
, the visual channel color aggregation would be incorrectly validated and set with options that do not work together, first without enough of the saved config included to help it understand which field type, color scale, and aggregation mode should be used, despite the saved config information being correct from the previous session. This change does the visual channel validation after all saved config information is mixed into thenewLayer
.Improves aggregation dropdown UI to use more human-friendly options to display to the user.
Bonus: Improves displayed instruction text above the layer configurator aggregation type selector UI, so that it uses the selected field's
displayName
instead of rawname
.