Repository navigation
feat: add an opt-in compact absolute-time preset - #405
tay1orjones wants to merge 5 commits into
Conversation
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
|
@copilot address the outstanding review feedback |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Addressed in |
|
@copilot address the outstanding review feedback |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Applied in |
There was a problem hiding this comment.
🔵 Needs a closer look
Human judgment is needed to assess the significance of unnecessary timer ticks that update every element in the shared observer while datetime text remains unchanged.
No open issues 🎉
1 resolved since last review
Review effort: Max

<relative-time>can now show compact absolute timestamps in width-constrained layouts. The preset changes presentation, not how the element selects absolute, relative, or duration output.absolute-format="compact"orelement.absoluteFormat = 'compact'. The preset applies after the user preference, threshold, orformat="datetime"selects absolute output. Omitted, empty, unknown, and removed values keep the existing presentation. Setting the property toundefinedremoves the attribute.today at 3:04 PM. Japanese and Chinese locale families, and patterns without a safe connector, join localized today and time with a space. Other days show a localized date with the year and no time, such asNov 2, 2026. Display-field overrides affect compact text only;datetime, full and custom titles, andno-titleare unchanged.Verification: Lint, build, all 693 Chromium tests, and a local install of the packed JavaScript, TypeScript declarations, and custom-element manifest passed.
Downstream handoff
PR #405 · Tested commit
2d5502b110c5ad2ce4e9af2668e43dd3a316c4bcIn the element checkout:
In the wrapper checkout:
The package contains JavaScript at
dist/index.jsanddist/bundle.js, declarations atdist/index.d.tsanddist/relative-time-element.d.ts, and metadata atcustom-elements.json. No known blockers; no release or hosted tarball is needed.