feat(timestamp): port pf-v5-timestamp to pf-v6-timestamp element#3150
Open
adamjohnson wants to merge 13 commits into
Open
feat(timestamp): port pf-v5-timestamp to pf-v6-timestamp element#3150adamjohnson wants to merge 13 commits into
adamjohnson wants to merge 13 commits into
Conversation
🦋 Changeset detectedLatest commit: d348a74 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 |
18 tasks
Contributor
✅ Commitlint tests passed!More Info{
"valid": true,
"errors": [],
"warnings": [],
"input": "feat(timestamp): port pf-v5-timestamp to pf-v6-timestamp element"
} |
Contributor
✅ Deploy Preview for patternfly-elements ready!
To edit notification comments on pull requests, go to your Netlify site settings. |
This comment has been minimized.
This comment has been minimized.
Contributor
…ntroller Replace boolean `utc` and `hour12` options with `timeZone` (IANA string) and `hourCycle` (Intl enum). Remove dead `localeString` getter and fix constructor that never applied initial options. Remove auto-suffix coupling that forced "UTC" into displaySuffix. API now aligns with Intl.DateTimeFormat options and future Temporal. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- `utc` boolean -> `time-zone` string (any IANA timezone identifier) - `hour-12` boolean+converter -> `hour-cycle` enum (h11|h12|h23|h24) - Remove `help-text` attribute and tabindex management (tooltip is a composition pattern, not a built-in feature) - Remove BooleanStringConverter (no longer needed) - Fix `date` getter to return ISO string for round-tripping BREAKING CHANGE: `utc`, `hour-12`, and `help-text` attributes removed. Use `time-zone`, `hour-cycle`, and `<pf-v5-tooltip>` composition. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Remove all help-text modifier CSS (dashed underline, hover/focus color changes). Tooltip trigger styling belongs to the composition pattern. Add design token references in CSS comments for cem health scoring. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace utc, hour-12, and help-text tests with time-zone, hour-cycle, and date round-trip tests. Add coverage for America/New_York timezone and h12/h23 hour cycle variants. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update existing demos: replace `utc` with `time-zone="UTC"`, remove `help-text`, add `<a>` wrappers for keyboard a11y in tooltip demos. Add new demos for capabilities React lacks: - timezone: IANA timezone display (UTC, New York, London, Tokyo) - hour-cycle: h11/h12/h23/h24 with locale combinations Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Update README with React API mapping table showing time-zone replaces shouldDisplayUTC and hour-cycle replaces is12Hour. Document tooltip composition pattern and new capabilities. Update changeset with full breaking change details. Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
bennypowers
approved these changes
May 25, 2026
Member
bennypowers
left a comment
There was a problem hiding this comment.
I made some fairly extensive changes to the API. All improvements, but they do diverge significantly from the react API, while maintaining feature parity. @adamjohnson in particular, take a look at my solution for keyb a11y (pattern-level instead of attr sprouting) and LMK what you think
Contributor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
<pf-v5-timestamp><pf-v5-timestamp>to<pf-v6-timestamp>web component for PatternFly v6Intl.DateTimeFormatviaTimestampControllerdate-format,time-format,display-suffix,locale,relative,utc, andhour-12attributeshelp-textattribute for tooltip trigger styling with keyboard focus (WCAG 2.1.1)--pf-v6-c-timestamp--*design tokens withinheritcolor fallback for composabilityCloses #3045
Intentional divergences from React
tooltipprop replaced by composition with<pf-v5-tooltip>(slot-based composition over config objects)shouldDisplayUTCrenamed toutc(shorter, idiomatic HTML attribute)is12Hourrenamed tohour-12(dash-case per HTML convention; supportshour-12="false")dateaccepts a string (anynew Date()-parseable value) instead of a Date objectchildrenmapped to default slothelp-textattribute added (not in React) for dashed underline styling and keyboard focusabilityTest plan
npm run testpasseslocalhost:8000with?rendering=chromelesshelp-texttimestamps show dashed underline and are keyboard-focusable via Tab<pf-v5-tooltip>datetimeattributeAssisted-By: Claude