innovark37 commented on PR #39330: URL: https://github.com/apache/superset/pull/39330#issuecomment-4485449374
@rusackas Thanks for the follow-up review. I addressed the remaining actionable items: - Added an `UPDATING.md` entry under `Next` documenting the `DURATION` behavior change. It now explicitly calls out that `DURATION` uses `Intl.DurationFormat`, omits sub-second fields by default, and that values like `10500ms` now render as `10s` instead of `10.5s`. It also notes that custom duration formatters can opt into sub-second precision with `formatSubMilliseconds`. - I double-checked the `formatDuration` implementation: it already uses `slice(0, 2)`, so the old `pretty-ms` `unitCount: 2` behavior is preserved. I added a regression test for `1d 2h 3m 4s` to make this explicit; `formatDuration` asserts that it returns only `1d 2h`. - Added an explicit locale fallback in `formatDuration`. It already accepted an optional locale, but now defaults to `en` so early renders or calls before Redux locale is populated produce stable output. - Double-checked locale normalization. The current code uses `locale?.replace(/_/g, '-')`, and there is a regression test for `zh_Hans_CN` to verify locales with multiple underscores normalize to a valid `zh` locale instead of falling back to `en`. - Fixed the pre-commit failure by applying Prettier formatting to `superset-frontend/package-lock.json`. - Added a focused preamble test covering the locale path that feeds `setupFormatters`. It verifies both passing the bootstrap locale through and falling back to `en` when the bootstrap locale is missing. For the `sharded-jest` timeout: I investigated the failing `AlertReportModal test`. It does not touch the duration formatter changes in this PR, and I ran the failing test locally; it passed. This looks like a timeout rather than a regression from this PR, so I did not change that unrelated test and need to rerun CI. -- 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]
