-
Notifications
You must be signed in to change notification settings - Fork 18.9k
Improve Tooltip UX by enabling delay by default #21383
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
Merged
Merged
Conversation
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
…hanged to default true.
Contributor
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
This PR improves the tooltip user experience by enabling hover delay by default and reducing the delay duration.
- Set
needsDelaydefault totruein the baseTooltipcomponent - Changed hide delay from 500ms to 300ms
- Removed redundant
needsDelayprops from tooltip usages and updated one test
Reviewed Changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| web/app/signin/oneMoreStep.tsx | Removed explicit needsDelay prop |
| web/app/components/workflow/nodes/_base/components/prompt/editor.tsx | Removed explicit needsDelay prop |
| web/app/components/workflow/nodes/_base/components/agent-strategy-selector.tsx | Removed explicit needsDelay prop |
| web/app/components/plugins/plugin-detail-panel/tool-selector/tool-item.tsx | Removed explicit needsDelay prop |
| web/app/components/plugins/plugin-detail-panel/multiple-tool-selector/index.tsx | Removed explicit needsDelay prop |
| web/app/components/plugins/plugin-detail-panel/endpoint-list.tsx | Removed explicit needsDelay prop |
| web/app/components/header/account-setting/model-provider-page/provider-added-card/model-list-item.tsx | Removed explicit needsDelay prop |
| web/app/components/header/account-setting/model-provider-page/model-parameter-modal/status-indicators.tsx | Removed explicit needsDelay props |
| web/app/components/header/account-setting/members-page/index.tsx | Removed explicit needsDelay prop |
| web/app/components/datasets/documents/list.tsx | Removed explicit needsDelay prop |
| web/app/components/base/tooltip/index.tsx | Enabled default needsDelay, set default timeout to 300ms |
| web/app/components/base/tooltip/index.spec.tsx | Added needsDelay={false} in test to override default |
| web/app/components/app/configuration/prompt-value-panel/index.tsx | Removed explicit needsDelay prop |
| web/app/components/app/configuration/config/agent/agent-tools/index.tsx | Removed explicit needsDelay props |
| web/app/(commonLayout)/datasets/(datasetDetailLayout)/[datasetId]/layout-main.tsx | Removed explicit needsDelay prop |
Comments suppressed due to low confidence (1)
web/app/components/base/tooltip/index.spec.tsx:53
- Add a test case to verify the default delay behavior (i.e., without explicitly setting
needsDelay) to ensure the tooltip remains open for 300ms before closing.
const { container } = render(<Tooltip popupContent="Tooltip content" triggerClassName={triggerClassName} needsDelay={false} />)
crazywoola
approved these changes
Jul 16, 2025
douxc
pushed a commit
that referenced
this pull request
Jul 16, 2025
tutkun
pushed a commit
to tutkun/dify
that referenced
this pull request
Aug 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
💪 enhancement
New feature or request
lgtm
This PR has been approved by a maintainer
size:S
This PR changes 10-29 lines, ignoring generated files.
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.
Important
Fixes #<issue number>.Summary
Changed default needsDelay from false to true because:
For example: Users expect to be able to move their cursor from the trigger to the tooltip content (to copy text or interact with content) without the tooltip disappearing immediately - this change addresses that common use case.
Also reduced delay from 500ms to 300ms for better responsiveness while maintaining usability.
Screenshots
Checklist
dev/reformat(backend) andcd web && npx lint-staged(frontend) to appease the lint gods