Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

WPF - Allow ToolTip timer configuration#4389

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Draft
amaitland wants to merge1 commit intomaster
base:master
Choose a base branch
Loading
fromwpf/configuretooltiptimer

Conversation

@amaitland
Copy link
Member

@amaitlandamaitland commentedFeb 9, 2023
edited by coderabbitaibot
Loading

Related to issue#4048

Summary:
Allow programmatic configuration of ToolTip timer delay.

Changes:

  • Can set initial show delay in xaml via existing ToolTipService e.g. ToolTipService.InitialShowDelay="100"
  • If InitialShowDelay = 0 then no timer is used and ToolTip is immediately shown
  • Previous delay was 500ms, new delay is the .Net default (typically 1000ms)
  • ToolTipService.GetInitialShowDelay is currently only called inOnLoaded, setting the delay dynamically is not currently supported. Simplest option is to set the delay inxaml

How Has This Been Tested?

  • Manually via CefSharp.Wpf.Example

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Updated documentation

Checklist:

  • Tested the code(if applicable)
  • Commented my code
  • Changed the documentation(if applicable)
  • New files have a license disclaimer
  • The formatting is consistent with the project (project supports .editorconfig)

Summary by CodeRabbit

  • Bug Fixes
    • Improved tooltip display behavior for the ChromiumWebBrowser control, ensuring tooltips open and close more reliably based on content changes.
    • Tooltip appearance delay now respects user or system settings, providing a more consistent and expected user experience.

@amaitlandamaitland self-assigned thisFeb 9, 2023
@amaitland
Copy link
MemberAuthor

If InitialShowDelay = 0 then no timer is used and ToolTip is immediately shown

Related discussion at#4048 (comment)

There's still a few other cases that should be tested.

@AppVeyorBot
Copy link

- Can set initial show delay in xaml via existing ToolTipService e.g. ToolTipService.InitialShowDelay="100"- If InitialShowDelay = 0 then no timer is used and ToolTip is immediately shown- Previous delay was 500ms, new delay is the .Net default (typically 1000ms)Related to issue#4048
@amaitlandamaitlandforce-pushed thewpf/configuretooltiptimer branch frome1ed5ee toe34ce46CompareAugust 2, 2025 22:13
@coderabbitai
Copy link

coderabbitaibot commentedAug 2, 2025
edited
Loading

Walkthrough

This change refactors the tooltip handling logic in the ChromiumWebBrowser WPF control. It restructures the tooltip text change method to streamline early exits and timer management, and updates tooltip timer initialization to respect the configured initial show delay, only creating the timer if the delay is greater than zero.

Changes

Cohort / File(s)Change Summary
Tooltip Handling Logic
CefSharp.Wpf/ChromiumWebBrowser.cs
Refactored tooltip text change method for improved flow and timer management; updated tooltip timer initialization to use the configured initial show delay and conditional timer creation.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~8 minutes

Poem

A nibble of code, a timer's new tune,
Tooltips now wait for the right afternoon.
Delays are respected, the logic is neat,
Browsing with bunnies just can't be beat!
🐇✨

Note

⚡️ Unit Test Generation is now available in beta!

Learn morehere, or try it out under "Finishing Touches" below.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and betweenc579ddf ande34ce46.

📒 Files selected for processing (1)
  • CefSharp.Wpf/ChromiumWebBrowser.cs (2 hunks)
🔇 Additional comments (2)
CefSharp.Wpf/ChromiumWebBrowser.cs (2)

1683-1695:LGTM! Excellent refactoring of tooltip handling logic.

The restructuring improves efficiency by moving the early return check to the beginning and only retrieving the timer when needed. The immediate tooltip handling whentimer == null correctly implements the zero-delay feature mentioned in the PR objectives.


2156-2167:Perfect implementation of configurable tooltip timer delay.

This correctly implements the feature described in the PR objectives by:

  • Reading the configured delay fromToolTipService.GetInitialShowDelay(this)
  • Only creating the timer wheninitialShowDelay > 0, enabling immediate tooltip display when set to zero
  • Using the configured delay value instead of the previous hardcoded default

The implementation properly integrates with WPF's existing ToolTipService infrastructure.

✨ Finishing Touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branchwpf/configuretooltiptimer

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
🪧 Tips

Chat

There are 3 ways to chat withCodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag@coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag@coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on oursupport page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings togenerate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai generate unit tests to generate unit tests for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add@coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add@coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add@coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a.coderabbit.yaml file to the root of your repository.
  • Please see theconfiguration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation:# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit ourDocumentation for detailed information on how to use CodeRabbit.
  • Join ourDiscord Community to get help, request features, and share feedback.
  • Follow us onX/Twitter for updates and announcements.

@amaitland
Copy link
MemberAuthor

@coderabbitai review

coderabbitai[bot] reacted with eyes emoji

@coderabbitai
Copy link

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

1 similar comment
@coderabbitai
Copy link

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@AppVeyorBot
Copy link

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

Reviewers

No reviews

Assignees

@amaitlandamaitland

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

3 participants

@amaitland@AppVeyorBot

[8]ページ先頭

©2009-2025 Movatter.jp