Repository navigation
feat: expose compact absolute time in RelativeTime - #4259
tay1orjones wants to merge 5 commits into
Conversation
🦋 Changeset detectedLatest commit: a3a9e5d The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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
5.4.0 also ships other fixes: calendar-day "yesterday" and "tomorrow", tabular numerals, and relative text for past times under a minute. If a Keep the PR in draft. Don't hand-edit |
Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Updated in I couldn’t edit the PR description from this session. Replace the Integration paragraph with: “No consumer changes required. The compact preset requires |
Authors: Please fill out this form carefully and completely.
Reviewers: By approving this Pull Request you are approving the code change, as well as its deployment and mitigation plans.
Please read this description carefully. If you feel there is anything unclear or missing, please ask for updates.
What are you trying to accomplish?
Add an opt-in preset to
Primer::Beta::RelativeTime. When the element selects absolute output, it shows localized 12-hour time for today or a short date with its year for any other day. Relative and duration output stay unchanged.Screenshots
No screenshots attached. Verified preview text:
today at 3:04 PMandNov 2, 2026.Integration
No consumer changes required. Keep in draft:
5.3.1is still the latest release and does not support the preset. Before merge, verify the release that contains the feature, update the rootpackage.jsonandpackage-lock.json, remove the5.3.1test guards, and rerun the browser checks against that release.List the issues that this change affects.
Upstream dependency: compact absolute-time preset · implementation PR
Risk Assessment
What approach did you choose and why?
fetch_or_fallbackand emitabsolute-format="compact"only for the valid preset. Keep server fallback text,datetime, and title handling unchanged.prefix,format_style, and individual date/time display fields. Locale and display time zone still apply; the visible time zone is omitted.Anything you want to highlight for special attention from reviewers?
84ab6dc47882f5e487a46059a13b340076c33e06. With locked5.3.1, only the compact absolute-output system test skips.adfbb14caacd38914cfd5c52dac2c7a3996ac9ea. The new commit caps the initial timer at one hour without changing the attribute API or formatting. The wrapper tests did not use this newer commit.Accessibility
no_titlebehavior are unchanged.Merge checklist
Take a look at the What we look for in reviews section of the contributing guidelines for more information on how we review PRs.