Skip to content

Conversation

@kerwin612
Copy link
Contributor

Important

  1. Make sure you have read our contribution guidelines
  2. Ensure there is an associated issue and you have been assigned to it
  3. Use the correct syntax to link this PR: Fixes #<issue number>.

Summary

Changed default needsDelay from false to true because:

  • Most tooltips benefit from hover delay to allow cursor movement to content
  • Prevents unintended tooltip disappearance during mouse transition
  • Aligns with modern UI tooltip behavior expectations
  • Reduces need for developers to manually enable this feature in each implementation

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

Before After
... ...

Checklist

  • This change requires a documentation update, included: Dify Document
  • I understand that this PR may be closed in case there was no previous discussion or issues. (This doesn't apply to typos!)
  • I've added a test for each change that was introduced, and I tried as much as possible to make a single atomic change.
  • I've updated the documentation accordingly.
  • I ran dev/reformat(backend) and cd web && npx lint-staged(frontend) to appease the lint gods

@dosubot dosubot bot added size:XS This PR changes 0-9 lines, ignoring generated files. 💪 enhancement New feature or request size:S This PR changes 10-29 lines, ignoring generated files. and removed size:XS This PR changes 0-9 lines, ignoring generated files. labels Jun 23, 2025
Copy link
Contributor

Copilot AI left a 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 needsDelay default to true in the base Tooltip component
  • Changed hide delay from 500ms to 300ms
  • Removed redundant needsDelay props 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} />)

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Jul 16, 2025
@crazywoola crazywoola merged commit 229b4d6 into langgenius:main Jul 16, 2025
5 checks passed
@kerwin612 kerwin612 deleted the patch-1 branch July 16, 2025 09:57
@dosubot dosubot bot mentioned this pull request Aug 1, 2025
5 tasks
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants