-
Notifications
You must be signed in to change notification settings - Fork 272
Conversation
bfff978
to
7a73161
Compare
7a73161
to
8287ef4
Compare
Are we sure there are no truthy evaluation of what comes out of this function in the Superset codebase? Wouldn't it be safer to either return either |
My understanding of what @mistercrunch means is when people do sth like formatTime(time, 'formatString') || 'custom label when null or undefined' This will work if the |
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.
overall looks good to me. had one thought about .ts
+ .js
test files vs @ts-ignore
.
I also generally think that the coercion of null
to a string is okay. I think it's messy/not strict enough to have instances of timeFormatter(blah) || 'fallback blah'
, devs should check blah
themselves IMO. This could be easily changed to (blah && timeFormatter(blah)) || 'fallback'
.
@xtinec might still have some thoughts.
packages/superset-ui-time-format/test/factories/createD3TimeFormatter.test.js
Show resolved
Hide resolved
8287ef4
to
41c27e3
Compare
Squashed commits: [23ad0d6] feat: working box plot [a7ed565] fix: typings [57a62b7] feat: clarify horizontal/vertical mode [6312737] fix: typings [2734de3] feat: box plot types [cb3c239] fix: typings [7e2dcda] feat: add box plot
🏆 Enhancements
@superset-ui/time-format
to TypeScript💔 Breaking Changes
string
. This is different from previous behavior.null
null
'null'
undefined
undefined
'undefined'
NaN
NaN
'NaN'