Skip to content

feat(tooltip): add pf-v6-tooltip element#3141

Draft
bennypowers wants to merge 3 commits into
staging/pfv6from
feat/tooltip/v6
Draft

feat(tooltip): add pf-v6-tooltip element#3141
bennypowers wants to merge 3 commits into
staging/pfv6from
feat/tooltip/v6

Conversation

@bennypowers
Copy link
Copy Markdown
Member

Summary

  • New pf-v6-tooltip element ported from v5 with v6 design tokens
  • FloatingDOMController with arrow element positioning
  • Cancellable TooltipShowEvent/TooltipHideEvent with reason enum for selective trigger prevention
  • trigger attribute (IDREF) and property (Element ref) for external trigger elements
  • entry-delay/exit-delay (default 300ms), alignment (start/end/left/right), position, no-flip, flip-behavior
  • light-dark() CSS fallbacks for correct inverse color scheme
  • ariaDescribedByElements wiring between trigger and tooltip content
  • 9 demos: basic, placement, trigger-ref, trigger-element, slotted-content, dynamic-content, left-aligned, color-scheme, options playground
  • 17 unit tests

Test plan

  • Verify tooltip shows on hover and focus in all demos
  • Verify tooltip hides on mouseleave, focusout, and Escape
  • Verify light-dark color scheme inversion in color-scheme demo
  • Verify external trigger via IDREF (trigger-ref) and Element ref (trigger-element)
  • Verify alignment attribute changes text-align
  • Verify entry-delay/exit-delay in options playground
  • Verify no-flip disables repositioning
  • Run /review-a11y, /review-api, /review-demos
  • Visual parity with patternfly.org tooltip

Closes #3048

@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented May 11, 2026

⚠️ No Changeset found

Latest commit: 683110f

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

✅ Commitlint tests passed!

More Info
{
  "valid": true,
  "errors": [],
  "warnings": [],
  "input": "feat(tooltip): add pf-v6-tooltip element"
}

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 11, 2026

Deploy Preview for patternfly-elements ready!

Name Link
🔨 Latest commit e2fceca
😎 Deploy Preview https://deploy-preview-3141--patternfly-elements.netlify.app/

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions github-actions Bot added the AT passed Automated testing has passed label May 11, 2026
@github-actions
Copy link
Copy Markdown
Contributor

SSR Test Run for 4e4a328: Report

Port tooltip to v6 design tokens and patterns.

- FloatingDOMController with arrow element positioning
- Cancellable TooltipShowEvent/TooltipHideEvent with reason enum
- `trigger` attribute (IDREF) and property (Element ref)
- `entry-delay`/`exit-delay` attributes (default 300ms)
- `alignment` attribute (start/end/left/right)
- `position`, `no-flip`, `flip-behavior` carried from v5
- `light-dark()` CSS fallbacks for inverse color scheme
- `ariaDescribedByElements` wiring on show/hide
- Escape key dismissal
- 9 demos including playground, color-scheme, and element-ref trigger
- 17 unit tests covering API, a11y, events, and cancellation

Closes #3048

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replaced by pf-v6-tooltip.

Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Assisted-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions
Copy link
Copy Markdown
Contributor

SSR Test Run for e2fceca: Report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

AT passed Automated testing has passed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant