-
Notifications
You must be signed in to change notification settings - Fork 972
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Feature Anywhere] Fix visibleVisLayers ser/deser #3758
[Feature Anywhere] Fix visibleVisLayers ser/deser #3758
Conversation
Signed-off-by: Tyler Ohlsen <[email protected]>
Signed-off-by: Tyler Ohlsen <[email protected]>
Codecov Report
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more @@ Coverage Diff @@
## feature/feature-anywhere #3758 +/- ##
=========================================================
Coverage 66.50% 66.51%
=========================================================
Files 3225 3225
Lines 61980 61982 +2
Branches 9542 9543 +1
=========================================================
+ Hits 41221 41225 +4
+ Misses 18473 18471 -2
Partials 2286 2286
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 2 files with indirect coverage changes Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
Signed-off-by: Tyler Ohlsen <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice!
Description
The change to using a
Map
for persisting visibleVisLayer
s in the vega spec config had a bug where during the string serialization/deserialization (necessary for passing through the expression functions), theMap
obj could not be properly stringified which was leading to an emptyMap
when parsing in theVegaParser
. This was causing noVisLayer
s to be able to render.This fixes that by converting the
Map
=> array when serializing, and converting back to aMap
when deserializing in the parser.Note another option could have been using a basic JS obj
{}
for persisting this, but that would limit us in not being able to use theVisLayerTypes
enum as keys, and would need other conversion as well.Also hardens a helper method by handling a case where
events
is undefined or empty, + a regression test for that.Issues Resolved
[List any issues this PR will resolve]
Check List