-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix: standardize tooltip delays to 300ms (#5090) #5098
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- Created StandardTooltip component with consistent 300ms delay - Replaced all native HTML title attributes with StandardTooltip - Updated 40+ component files across the webview - Fixed all test files to work with StandardTooltip - Ensures consistent tooltip behavior throughout the application Note: VSCode activity bar tooltips cannot be customized due to platform limitations
|
We have finished reviewing your PR. We have found no vulnerabilities. Reply to this PR with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
Standardizes tooltip behavior by creating a single StandardTooltip wrapper with a fixed 300ms delay and replacing all inline title attributes across the codebase. Tests and mocks are updated to accommodate the new component.
- Introduces
StandardTooltipcomponent enforcing a 300ms delay. - Replaces native
titleattributes withStandardTooltipin UI, common, settings, marketplace, history, chat modules. - Updates test suites to mock or wrap the new tooltip implementation.
Reviewed Changes
Copilot reviewed 44 out of 44 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| webview-ui/src/components/ui/standard-tooltip.tsx | Defines StandardTooltip wrapper enforcing 300ms tooltip delay |
| webview-ui/src/components/ui/index.ts | Exports StandardTooltip for reuse |
| webview-ui/src/components/ui/select-dropdown.tsx | Replaces native title on dropdown triggers with StandardTooltip |
| webview-ui/src/components/common/IconButton.tsx | Removes inline title from icon buttons and wraps them in StandardTooltip |
| webview-ui/src/components/marketplace/components/MarketplaceItemCard.tsx | Switches from Radix Tooltip to StandardTooltip for install/remove controls |
Comments suppressed due to low confidence (1)
webview-ui/src/components/marketplace/components/tests/MarketplaceItemCard.spec.tsx:60
- This test suite doesn’t mock
StandardTooltip, so real tooltip logic may run and make tests brittle. Consider adding aStandardTooltipmock (e.g., returning its children) to stabilize these tests.
return render(<TooltipProvider delayDuration={300}>{ui}</TooltipProvider>)
- Set asChild={true} for StandardTooltip components in progress bar sections
- This prevents extra wrapper divs that were breaking the flex layout
- Progress bar now displays correctly with proper width calculations
- Add aria-label to IconButton for accessibility - Extract STANDARD_TOOLTIP_DELAY as a constant - Move TooltipProvider to app level for better performance - Enhance StandardTooltip documentation with examples - Update all test files to use custom test utils with TooltipProvider
- Add collisionPadding and avoidCollisions props to TooltipContent - This ensures tooltips automatically reposition when they would overflow the container
- Move collisionPadding and avoidCollisions to base TooltipContent component - This ensures all tooltips in the app respect viewport boundaries - Remove duplicate props from StandardTooltip
- Remove overflow-hidden class from TooltipContent that prevented wrapping - Add max-w-[300px] and break-words classes for proper text wrapping - Add optional maxWidth prop to StandardTooltip for customization - Add comprehensive tests for tooltip behavior Addresses feedback from PR #5098 where tooltips were extending beyond the plugin viewport boundaries when content was too wide.
- Remove TooltipProvider from StandardTooltip component (performance) - Fix nested tooltips in ContextWindowProgress by consolidating into single tooltip - Verify IconButton already has aria-label attribute (accessibility)
|
Created PR #5101 to address the tooltip overflow issue. The fix enables text wrapping by removing the |
- Remove overflow-hidden class from TooltipContent that prevented wrapping - Add max-w-[300px] and break-words classes for proper text wrapping - Add optional maxWidth prop to StandardTooltip for customization - Add comprehensive tests for tooltip behavior Addresses feedback from PR #5098 where tooltips were extending beyond the plugin viewport boundaries when content was too wide.
|
Added tooltip overflow fix to this PR. The changes include:
Tooltips now wrap text within a 300px maximum width by default instead of extending beyond the plugin viewport. |
- Check for empty strings and whitespace-only content - Prevents rendering tooltips with no meaningful content - Addresses edge case where content could be an empty string
daniel-lxs
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good!
…flict The StandardTooltip component was incorrectly wrapping the PopoverTrigger, which prevented the popover from opening. This was introduced in PR #5098 when standardizing tooltip delays. The fix moves StandardTooltip inside PopoverTrigger (with asChild prop) so that PopoverTrigger can properly control its child element while still providing tooltip functionality. This pattern is consistent with other components like ShareButton.
Co-authored-by: Daniel Riccio <[email protected]>

Description
Fixes #5090
https://github.com/user-attachments/assets/d67c82b6-0674-4955-87d6-883069ce3844

This PR standardizes all tooltip delays across the Roo Code webview to use a consistent 300ms delay, replacing the inconsistent delays that ranged from instant (0ms) to over 2 seconds.
Changes Made
StandardTooltipcomponent that wraps Radix UI's Tooltip with a fixed 300ms delaytitleattributes withStandardTooltipacross 40+ component filesStandardTooltipfrom the UI components index for easy importingTesting
Verification of Acceptance Criteria
Known Limitation
The VSCode activity bar icon tooltip ("Roo Code" when hovering over the extension icon) cannot be customized as it's controlled by VSCode's native UI through the extension manifest. This is a platform limitation that affects all VSCode extensions.
Checklist
Screenshots/Demo
All tooltips now consistently appear after 300ms hover delay instead of the previous inconsistent behavior.
Important
Standardizes tooltip delays to 300ms across the application by introducing a
StandardTooltipcomponent, replacing nativetitleattributes, and updating tests accordingly.StandardTooltipcomponent with a fixed 300ms delay, replacing native HTMLtitleattributes in over 40 component files.StandardTooltipintooltip.spec.tsx.StandardTooltipfrom the UI components index for easy importing.This description was created by
for 7f3a55a. You can customize this summary. It will automatically update as commits are pushed.