-
Notifications
You must be signed in to change notification settings - Fork 272
feat(encodable): implement axis functions for ChannelEncoder #247
Conversation
Codecov Report
@@ Coverage Diff @@
## master #247 +/- ##
=====================================
Coverage 100% 100%
=====================================
Files 147 148 +1
Lines 1619 1636 +17
Branches 427 434 +7
=====================================
+ Hits 1619 1636 +17
Continue to review full report at Codecov.
|
Deploy preview for superset-ui ready! Built with commit b647bab |
import { ChannelType, ChannelInput } from '../types/Channel'; | ||
import { PlainObject, Dataset } from '../types/Data'; | ||
import { ChannelDef } from '../types/ChannelDef'; | ||
import { Value } from '../types/VegaLite'; |
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.
Just change the imports order
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! couple small thoughts 🙌
} | ||
|
||
hasTitle() { | ||
return this.config.title !== ''; |
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.
I can't quite tell from the PR, can title
be undefined
or null
? could do !!this.config.title
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.
This is CompleteAxisConfig
which guarantees title
will be string
.
|
||
if (typeof values !== 'undefined') { | ||
return (values as ( | ||
| number |
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.
could make a separate type
(or re-use the config.values
type?)
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.
updated to use util inferElementTypeFromUnionOfArrayTypes
🏆 Enhancements