Skip to content

fix(OverflowTooltip): Add missing showDelay and hideDelay prop support for OverflowTooltip - #4133

Closed
BillGeoghegan wants to merge 4 commits into
Workday:masterfrom
BillGeoghegan:adding-overflow-delay-props
Closed

fix(OverflowTooltip): Add missing showDelay and hideDelay prop support for OverflowTooltip#4133
BillGeoghegan wants to merge 4 commits into
Workday:masterfrom
BillGeoghegan:adding-overflow-delay-props

Conversation

@BillGeoghegan

@BillGeoghegan BillGeoghegan commented Aug 11, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes: #3614

  • Adds showDelay and hideDelay values for the OverflowTooltip. This was flagged as an oversight at the time, so I've categorised this as a fix.
  • Adds tests and example in Storybook.

Release Category

Components

Release Note

  • Adds ability to pass showDelay and hideDelay values for OverflowTooltip

Checklist

For the Reviewer

  • PR title is short and descriptive
  • PR summary describes the change (Fixes/Resolves linked correctly)
  • PR Release Notes describes additional information useful to call out in a release message or removed if not applicable
  • Breaking Changes provides useful information to upgrade to this code or removed if not applicable

Where Should the Reviewer Start?

  • The Ellipsis story update gives an example of these additional props.

Areas for Feedback? (optional)

  • Code
  • Documentation
  • Testing
  • Codemods

Testing Manually

  • I've updated the Ellipsis story to add hideDelay and showDelay values, so you can see it working there.

Screenshots or GIFs (if applicable)

  • N/A

Thank You Gif (optional)

Summary by CodeRabbit

New Features

  • Added configurable delays for showing and hiding overflow tooltips.
  • Added an example demonstrating a two-second delay before displaying an overflow tooltip.

Tests

  • Added coverage for delayed tooltip display and dismissal.

@BillGeoghegan
BillGeoghegan requested a review from a team as a code owner August 11, 2026 11:09
Copilot AI lite review requested due to automatic review settings August 11, 2026 11:09
@coderabbitai

coderabbitai Bot commented Aug 11, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

OverflowTooltip now supports configurable show and hide delays. Tests cover delayed display and hiding. The Ellipsis example demonstrates two-second tooltip delays.

Changes

OverflowTooltip delays

Layer / File(s) Summary
Delay API wiring
modules/react/tooltip/lib/OverflowTooltip.tsx
OverflowTooltipProps adds optional showDelay and hideDelay values. OverflowTooltip passes them to useTooltip.
Delay validation and example
modules/react/tooltip/spec/OverflowTooltip.spec.tsx, modules/react/tooltip/stories/examples/Ellipsis.tsx
Tests verify delayed tooltip display and hiding. The Ellipsis example configures two-second show and hide delays.

Estimated code review effort: 2 (Simple) | ~10 minutes

Suggested labels: ready for review

Suggested reviewers: williamjstanton

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed The changes satisfy issue #3614 by adding showDelay support to OverflowTooltip and include tests for the delay behavior.
Out of Scope Changes check ✅ Passed The implementation, tests, and Ellipsis example directly support OverflowTooltip delay configuration.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly and concisely identifies the addition of showDelay and hideDelay support to OverflowTooltip.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
modules/react/tooltip/spec/OverflowTooltip.spec.tsx (1)

27-34: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

Start this component spec with verifyComponent.

Call verifyComponent(OverflowTooltip, {}) from test-utils before the delay-specific tests. This component spec does not use the required baseline verification.

As per coding guidelines, element-component specs must start with verifyComponent(Component, {}) from test-utils.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@modules/react/tooltip/spec/OverflowTooltip.spec.tsx` around lines 27 - 34,
Start the OverflowTooltip spec with a baseline verifyComponent(OverflowTooltip,
{}) call from test-utils before the delay-specific tests, preserving the
existing markAsOverflowed helper and test cases.

Source: Coding guidelines

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@modules/react/tooltip/stories/examples/Ellipsis.tsx`:
- Around line 55-58: Update the Ellipsis example around OverflowTooltip so its
button text accurately reflects the configured delays: either describe only the
two-second show delay or set hideDelay to 2000 as well, keeping the example
configuration and displayed text consistent.

---

Nitpick comments:
In `@modules/react/tooltip/spec/OverflowTooltip.spec.tsx`:
- Around line 27-34: Start the OverflowTooltip spec with a baseline
verifyComponent(OverflowTooltip, {}) call from test-utils before the
delay-specific tests, preserving the existing markAsOverflowed helper and test
cases.
🪄 Autofix

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 6570f60c-b777-4a96-a945-18865d91c033

📥 Commits

Reviewing files that changed from the base of the PR and between 66fbb19 and 2721bf5.

📒 Files selected for processing (3)
  • modules/react/tooltip/lib/OverflowTooltip.tsx
  • modules/react/tooltip/spec/OverflowTooltip.spec.tsx
  • modules/react/tooltip/stories/examples/Ellipsis.tsx

Comment thread modules/react/tooltip/stories/examples/Ellipsis.tsx Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes an API gap in OverflowTooltip by adding support for showDelay and hideDelay, aligning it with the underlying tooltip timing behavior used elsewhere in the tooltip package.

Changes:

  • Added showDelay and hideDelay props to OverflowTooltip and wired them through to useTooltip.
  • Added unit tests verifying delayed show and delayed hide behavior for OverflowTooltip.
  • Updated the Ellipsis Storybook example to demonstrate delayed tooltip behavior.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.

File Description
modules/react/tooltip/lib/OverflowTooltip.tsx Adds showDelay/hideDelay props and passes them to useTooltip.
modules/react/tooltip/spec/OverflowTooltip.spec.tsx Adds fake-timer tests asserting show/hide delay behavior for OverflowTooltip.
modules/react/tooltip/stories/examples/Ellipsis.tsx Adds a Storybook example demonstrating delayed tooltip display.

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment on lines +55 to +59
<OverflowTooltip showDelay={2000}>
<SecondaryButton cs={{maxWidth: px2rem(200)}}>
2 second delay on show and hide content
</SecondaryButton>
</OverflowTooltip>
Copilot AI review requested due to automatic review settings August 11, 2026 11:16

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@BillGeoghegan BillGeoghegan changed the title fix(OverflowTooltip): Add missing showDelay and hideDelay prop support for Tooltip fix(OverflowTooltip): Add missing showDelay and hideDelay prop support for OverflowTooltip Aug 12, 2026
@BillGeoghegan
BillGeoghegan marked this pull request as draft August 12, 2026 09:28
@BillGeoghegan
BillGeoghegan marked this pull request as ready for review August 12, 2026 09:28
@mannycarrera4

Copy link
Copy Markdown
Contributor

Can you open this back up against our support branch since it existed in v15, please!

@cypress

cypress Bot commented Aug 12, 2026

Copy link
Copy Markdown

Workday/canvas-kit    Run #11490

Run Properties:  status check passed Passed #11490  •  git commit e3b22b0caa ℹ️: Merge ec235e746e1426ea31aea996fa9c963ae9544eda into 66fbb19d5308fd96929a6bcad407...
Project Workday/canvas-kit
Branch Review adding-overflow-delay-props
Run status status check passed Passed #11490
Run duration 02m 25s
Commit git commit e3b22b0caa ℹ️: Merge ec235e746e1426ea31aea996fa9c963ae9544eda into 66fbb19d5308fd96929a6bcad407...
Committer Bill Geoghegan
View all properties for this run ↗︎

Test results
Tests that failed  Failures 0
Tests that were flaky  Flaky 0
Tests that did not run due to a developer annotating a test with .skip  Pending 17
Tests that did not run due to a failure in a mocha hook  Skipped 0
Tests that passed  Passing 812
View all changes introduced in this branch ↗︎
UI Coverage  19.65%
  Untested elements 1523  
  Tested elements 370  
Accessibility  99.47%
  Failed rules  5 critical   5 serious   0 moderate   2 minor
  Failed elements 72  

@BillGeoghegan

Copy link
Copy Markdown
Contributor Author

Closing and reopening against support branch, my bad.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OverflowTooltip should extend showDelay prop.

3 participants