patternfly-react icon indicating copy to clipboard operation
patternfly-react copied to clipboard

Timestamp - a new Timestamp component

Open mcarrano opened this issue 3 years ago • 3 comments

Timestamp is a new component that will take a raw timestamp value and convert it into the desired display format.

Design: https://marvelapp.com/prototype/2cf6171g Core issue: https://github.com/patternfly/patternfly/issues/4801

mcarrano avatar Jul 21 '22 17:07 mcarrano

@mcarrano Had a couple of questions:

  1. Based on the conversation in https://github.com/patternfly/patternfly-design/issues/1131, should the timestamp utilize a tooltip or a popover (for now, in case it's something that may change down the line)?
  2. Is the intent that a tooltip/popover be provided by the consumer (similar to how ProgressStep only has a popoverRender prop) , or should we offer one option for rendering a tooltip/popover (that defaults to the UTC time) and another option for customizing that tooltip/popover content if a consumer wants something other than the UTC time rendered?

thatblindgeye avatar Aug 04 '22 16:08 thatblindgeye

For #1, I think this falls under the definituion of a "Definition tooltip" as described in the issue you reference. @mceledonia do you agree?

For #2, I'd be in favor of the second option, have a default to the UTC time with the ability to customize that if needed.

mcarrano avatar Aug 04 '22 20:08 mcarrano

@mcarrano I would agree, though I also think this is something we can label as an exception to those rules. The content of a timestamp will never be complex enough to require the formatting/flexibility of a popover and thus is better suited for a tooltip.

mceledonia avatar Aug 08 '22 13:08 mceledonia