Skip to content

Timestamp: multi-timezone/multi-format tooltip entries #427

Description

@czarandy

Feature

Timestamp's tooltip today is a single absolute string, shown only while the visible text is relative (src/components/Timestamp/Timestamp.tsx:102-106,122; one fixed formatAbsolute(instant, 'dateTime', timeZone, true) in Timestamp.utils.ts:233).

Add a tooltipEntries prop: an array of entries, each with optional timezoneID (IANA id), format, and label, rendered as rows in the hover tooltip — e.g. local time, UTC, and a teammate's zone side by side.

The plumbing already exists: formatAbsolute(instant, format, timeZone, isTimezoneShown) (Timestamp.utils.ts:122) accepts an arbitrary time zone. All date handling stays on Temporal per repo convention.

Notes

  • When tooltipEntries is provided, the tooltip should probably show for absolute-format timestamps too (today it's relative-only) — the entries are the reason to hover.
  • Defaults unchanged when the prop is omitted.
  • Tests for zone/format/label rendering; Storybook example with 2–3 zones.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requestmediumApproximately medium amount of work

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions