Skip to content
SprecherEast
Issue 432

enhancement: DateTime and MetaList, shared dates and fact lists

Back to our plan
Done
enhancementfrontendstylingpriority: high

Problem

  • Dates: six places write <time> and a format helper by hand, and they set dateTime two different ways. The post card and the post hero pass the raw timestamp, while the event code uses toDateTimeAttr (D8).
  • Facts: "label and value" and "icon and value" lists are built by hand in four different ways: the event card's time and place rows, the footer's contact rows, the post and event heroes' facts, and the account page's profile.

Goal

Add DateTime and MetaList to src/platform/ui/, as specified in docs/ui/component-set.md.

  • DateTime: value (an ISO string) and format (short or long). It renders a <time> whose dateTime is always built with toDateTimeAttr. Day-only values are formatted in UTC and other values in the site time zone, through the existing helpers.
  • MetaList: items ({ icon?, label?, value }[]) and variant:
    • inline: a wrapping row, "Label: value"
    • stacked: one item per line
    • on-image: a row on a photo, with each label above its value
    • It renders a <dl> when the items have labels and a <ul> otherwise. Icons are decorative.

Acceptance criteria

  • Not done: Both components are built, with tests and axe.
  • Not done: These use them: the post card, the event cards, the event and post heroes, the footer contact rows and the account profile. No hand-written <time> remains.
  • Not done: Visual QA at 6 widths in light and dark.

Native first: Intl.DateTimeFormat does the formatting, inside the existing helpers. No library is needed.


Generated by Claude Code, opens in a new tab

See it on GitHub, opens in a new tab