Page MenuHomeElementl

[dagit] TimeElapsed cleanup

Authored by dish on Dec 21 2020, 6:55 PM.



Some cleanup of TimeElapsed and the elapsed time string formatting.

  • Convert TimeElapsed to an SFC with effects.
  • Use Group and tabular number formatting.
  • Create a handful of stories for it
  • Change formatElapsedTime:
    • If the elapsed time is only milliseconds, render XXXms
    • Otherwise, always show hh:mm:ss. This is because it's confusing to see mm:ss sometimes and hh:mm:ss other times. For instance, 00:54 could mean 54 minutes or 54 seconds, and a user would just have to know our convention in order to understand it. This change consistently makes it 0:00:54.
Test Plan

View storybook stories and Runs root. Verify proper rendering of static elapsed time and upward-counting elapsed time.

Diff Detail

R1 dagster
Lint Not Applicable
Tests Not Applicable

Event Timeline

dish requested review of this revision.Dec 21 2020, 7:00 PM

This looks great to me! Cool use of tabular-nums in here too, I forgot that was a thing!

This revision is now accepted and ready to land.Dec 23 2020, 9:33 PM
This revision was automatically updated to reflect the committed changes.