villebro commented on code in PR #30593:
URL: https://github.com/apache/superset/pull/30593#discussion_r1801491959


##########
superset-frontend/src/setup/setupFormatters.ts:
##########
@@ -78,6 +79,7 @@ export default function setupFormatters(
       'DURATION_SUB',
       createDurationFormatter({ formatSubMilliseconds: true }),
     )
+    .registerValue('TIME_DURATION', createTimeDurationFormatter())

Review Comment:
   @gerbermichi as `pretty-ms` already supports colon notation, has good test 
coverage, and lots of customization options, I suggest looking into how this 
could be implemented with that library. Did you try adding 
`secondsDecimalDigits: 0` to remove the seconds? See the unit tests for some 
typical use cases: 
https://github.com/sindresorhus/pretty-ms/blob/d00183f8a040315005452f6f6dec30c581b258a2/test.js#L312-L380
 If `pretty-ms` still doesn't support what you're looking for, I suggest 
opening a PR on that repo, as that will also benefit the general OSS community.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to