Skip to content

refactor(dock): centralize tooltip timing - #1899

Merged
wjyrich merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix/task-399397-tooltip-master
Nov 30, 2026
Merged

wjyrich merged 1 commit into
linuxdeepin:masterfrom
wjyrich:fix/task-399397-tooltip-master

Conversation

@wjyrich

@wjyrich wjyrich commented Nov 30, 2026 •

Copy link
Copy Markdown
Contributor

统一任务栏提示的显示计时,所有平台均为 300 毫秒。移除任务栏项目各自的显示计时器,指针离开或提示关闭时取消待显示请求。tray-loader 已经计时的提示跳过公共延时。

验证:构建通过,公共提示计时器的 11 项离屏测试通过。

PMS: TASK-399397

Summary by Sourcery

Centralize dock tooltip timing while preserving producer-managed delays and consistently cancelling pending tooltip requests.

Bug Fixes:

  • Ensure pending tooltip displays are cancelled when the pointer leaves, the tooltip closes, or the associated item becomes visible/inactive.

Enhancements:

  • Centralize dock tooltip display timing at 300 milliseconds through PanelToolTip.
  • Remove per-item tooltip timers and route dock, task manager, and tray tooltip behavior through the shared timing logic.
  • Allow tray and card tooltips with producer-side delays to bypass the shared delay while preserving their existing behavior.
  • Adjust task preview timing to maintain the intended separation between tooltip and preview display.

@sourcery-ai

sourcery-ai Bot commented Nov 30, 2026

Copy link
Copy Markdown

Sorry @wjyrich, you've used your own review budget of 250,000 diff characters for the last 7 days.

You can request another review in 1 hour and 12 minutes by commenting @sourcery-ai review. Upgrade to get a review now.

@deepin-ci-robot

deepin-ci-robot commented Nov 30, 2026 •

Copy link
Copy Markdown

⚠️ OBS CI 构建警告日志 (Commit: 0b3f1c52)

提示:以下为 OBS CI 构建中 Lintian 检测到的警告信息,默认折叠,点击展开查看详情。完整日志请参阅对应构建状态链接。

deepin_develop / x86_64 (Lintian 警告: 15 条)
[  402s] W: dde-shell: desktop-command-not-in-package bin/false [usr/share/applications/org.deepin.dde-shell.desktop]
[  402s] N: 
[  402s] N:   The desktop entry specifies a Command that does not match any of the
[  402s] N:   executables shipped in the package.
[  402s] N:   
[  402s] N:   This condition is often caused by a typo, or the desktop file was not
[  402s] N:   updated after the installed path of the executable was modified.
[  402s] N:   
[  402s] N:   Packages should ship executables that are used as commands in desktop
[  402s] N:   files.
[  402s] N: 
[  402s] N:   Visibility: warning
[  402s] N:   Show-Always: no
[  402s] N:   Check: menu-format
[  402s] N: 
[  402s] N:
[  402s] W: dde-shell: link-to-shared-library-in-wrong-package usr/lib/x86_64-linux-gnu/libds-notification-shared.so.2.0.61 [usr/lib/x86_64-linux-gnu/libds-notification-shared.so]
[  402s] N: 
[  402s] N:   Although this package is not a "-dev" package, it installs a
[  402s] N:   "libsomething.so" symbolic link referencing the corresponding shared
[  402s] N:   library. When the link doesn't include the version number, it is used by
[  402s] N:   the linker when other programs are built against this shared library.
[  402s] N:   
[  402s] N:   Shared libraries are supposed to place such symbolic links in their
[  402s] N:   respective "-dev" packages, so it is a bug to include it with the main
[  402s] N:   library package.
[  402s] N:   
[  402s] N:   However, if this is a small package which includes the runtime and the
[  402s] N:   development libraries, this is not a bug. In the latter case, please
[  402s] N:   override this warning.
[  402s] N: 
[  402s] N:   Please refer to Development files (Section 8.4) in the Debian Policy
[  402s] N:   Manual for details.
[  402s] N: 
[  402s] N:   Visibility: warning
[  402s] N:   Show-Always: no
[  402s] N:   Check: libraries/shared/links
[  402s] N:   Renamed from: non-dev-pkg-with-shlib-symlink
[  402s] N: 
[  402s] N:
[  402s] W: dde-shell: no-manual-page [usr/bin/dde-shell]
[  402s] N: 
[  402s] N:   Each binary in /usr/bin, /usr/sbin, /bin, /sbin or /usr/games should have
[  402s] N:   a manual page
[  402s] N:   
[  402s] N:   Note that though the man program has the capability to check for several
[  402s] N:   program names in the NAMES section, each of these programs should have its
[  402s] N:   own manual page (a symbolic link to the appropriate manual page is
[  402s] N:   sufficient) because other manual page viewers such as xman or tkman don't
[  402s] N:   support this.
[  402s] N:   
[  402s] N:   If the name of the manual page differs from the binary by case, man may be
[  402s] N:   able to find it anyway; however, it is still best practice to match the
[  402s] N:   exact capitalization of the executable in the manual page.
[  402s] N:   
[  402s] N:   If the manual pages are provided by another package on which this package
[  402s] N:   depends, Lintian may not be able to determine that manual pages are
[  402s] N:   available. In this case, after confirming that all binaries do have manual
[  402s] N:   pages after this package and its dependencies are installed, please add a
[  402s] N:   Lintian override.
[  402s] N: 
[  402s] N:   Please refer to Manual pages (Section 12.1) in the Debian Policy Manual
[  402s] N:   for details.
[  402s] N: 
[  402s] N:   Visibility: warning
[  402s] N:   Show-Always: no
[  402s] N:   Check: documentation/manual
[  402s] N:   Renamed from: binary-without-manpage
[  402s] N: 
[  402s] N:
[  402s] W: dde-shell source: no-nmu-in-changelog [debian/changelog:1]
[  402s] N: 
[  402s] N:   When you NMU a package, that fact should be mentioned on the first line in
[  402s] N:   the changelog entry. Use the words "NMU" or "Non-maintainer upload" (case
[  402s] N:   insensitive).
[  402s] N:   
[  402s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  402s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  402s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  402s] N:   package (not intended for Debian), you can suppress this warning by
[  402s] N:   putting "local" in the version number or "local package" on the first line
[  402s] N:   of the changelog entry.
[  402s] N: 
[  402s] N:   Please refer to Using the DELAYED/ queue (Section 5.11.3) in the Debian
[  402s] N:   Developer's Reference for details.
[  402s] N: 
[  402s] N:   Visibility: warning
[  402s] N:   Show-Always: no
[  402s] N:   Check: nmu
[  402s] N:   Renamed from: changelog-should-mention-nmu
[  402s] N: 
[  402s] N:
[  402s] W: dde-shell: package-name-doesnt-match-sonames libds-notification-shared2
[  402s] N: 
[  402s] N:   The package name of a library package should usually reflect the soname of
[  402s] N:   the included library. The package name can determined from the library
[  402s] N:   file name with the following code snippet:
[  402s] N:   
[  402s] N:    $ objdump -p /path/to/libfoo-bar.so.1.2.3 | sed -n -e's/^[[:space:]]*SONAME[[:space:]]*//p' | \
[  402s] N:        sed -r -e's/([0-9])\.so\./\1-/; s/\.so(\.|$)//; y/_/-/; s/(.*)/\L&/'
[  402s] N: 
[  402s] N:   Visibility: warning
[  402s] N:   Show-Always: no
[  402s] N:   Check: libraries/shared/soname
[  402s] N: 
[  402s] N:
[  402s] W: libdde-shell: package-name-doesnt-match-sonames libdde-shell1
[  402s] N:
[  402s] W: libdde-shell-dock: package-name-doesnt-match-sonames libdde-shell-dock1
[  402s] N:
[  402s] W: dde-shell source: source-nmu-has-incorrect-version-number 2.0.61+u059 [debian/changelog:1]
[  402s] N: 
[  402s] N:   A source NMU should have a Debian revision of "-x.x" (or "+nmuX" for a
[  402s] N:   native package). This is to prevent stealing version numbers from the
[  402s] N:   maintainer.
[  402s] N:   
[  402s] N:   Maybe you didn't intend this upload to be a NMU, in that case, please
[  402s] N:   double-check that the most recent entry in the changelog is byte-for-byte
[  402s] N:   identical to the maintainer or one of the uploaders. If this is a local
[  402s] N:   package (not intended for Debian), you can suppress this warning by
[  402s] N:   putting "local" in the version number or "local package" on the first line
[  402s] N:   of the changelog entry.
[  402s] N: 
[  402s] N:   Please refer to NMUs and debian/changelog (Section 5.11.2) in the Debian
[  402s] N:   Developer's Reference for details.
[  402s] N: 
[  402s] N:   Visibility: warning
[  402s] N:   Show-Always: no
[  402s] N:   Check: nmu
[  402s] N: 
[  402s] N:
[  402s] W: dde-shell: unknown-section DDE
[  402s] N: 
[  402s] N:   The "Section:" field in this package's control file is not one of the
[  402s] N:   sections in use on the ftp archive. Valid sections are currently admin,
[  402s] N:   comm, cli-mono, database, debug, devel, doc, editors, electronics,
[  402s] N:   embedded, fonts, games, gnome, gnu-r, gnustep, graphics, hamradio,
[  402s] N:   haskell, httpd, interpreters, java, javascript, kde, libdevel, libs, lisp,
[  402s] N:   localization, kernel, mail, math, misc, net, news, ocaml, oldlibs,
[  402s] N:   otherosfs, perl, php, python, ruby, rust, science, shells, sound, tex,
[  402s] N:   text, utils, vcs, video, web, x11, xfce, zope.
[  402s] N:   
[  402s] N:   The section name should be preceded by either "contrib/", "non-free/" or
[  402s] N:   "non-free-firmware/" if the package is in the according archive area.
[  402s] N: 
[  402s] N:   Please refer to Sections (Section 2.4) in the Debian Policy Manual for
[  402s] N:   details.
[  402s] N: 
[  402s] N:   Visibility: warning
[  402s] N:   Show-Always: no
[  402s] N:   Check: fields/section
[  402s] N: 
[  402s] N:
[  402s] W: dde-shell-example: unknown-section DDE
[  402s] N:
[  402s] W: libdde-shell: unknown-section DDE
[  402s] N:
[  402s] W: libdde-shell-dev: unknown-section DDE
[  402s] N:
[  402s] W: libdde-shell-dock: unknown-section DDE
[  402s] N:
[  402s] W: libdde-shell-dock-dev: unknown-section DDE
[  402s] Warning: mkbaselibs missing in build root, skipping baselibs

@wjyrich
wjyrich force-pushed the fix/task-399397-tooltip-master branch 2 times, most recently from 9ba8dd5 to 305335e Compare November 30, 2026 05:18
@sourcery-ai

sourcery-ai Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

API

Add a shared tooltip delay and show operation to PanelToolTip, cancelling pending displays when the tooltip closes.

  • frame/qml/PanelToolTip.qml L51-63, L107-112 (+2 small edits)

Uses of the API

Use the shared tooltip delay for dock items while retaining tray-loader timing, and adjust tooltip positioning and preview behavior at each caller.

  • panels/dock/cardleft/package/CardLeftDockArea.qml L429-430
  • panels/dock/multitaskview/package/multitaskview.qml L37 (removed lines), L61-63, L65 (removed lines)
  • panels/dock/taskmanager/package/AppItem.qml L562-567 (+6 small edits)
  • panels/dock/taskmanager/package/TaskOverflowButton.qml L122-216 (4 small edits)
  • panels/dock/tray/SurfacePopup.qml L24-25
  • panels/dock/tray/TrayItemSurfacePopup.qml L131-132
  • panels/dock/tray/package/ActionShowStashDelegate.qml L111-133 (4 small edits)
  • panels/dock/tray/package/ActionToggleCollapseDelegate.qml L63 (removed lines), L66-68, L70 (removed lines)

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

1. Use a 300 ms tooltip delay on all platforms.
2. Remove local show timers from Dock items.
3. Bypass the delay for tooltips timed by tray-loader.

Log: Centralize Dock tooltip timing in PanelToolTip.
Influence: Dock tooltips share a consistent delay.

refactor(dock): 统一任务栏提示计时

1. 所有平台统一使用 300 毫秒的提示延时。
2. 移除任务栏项目各自的显示计时器。
3. 已由 tray-loader 计时的提示跳过这层延时。

Log: 在 PanelToolTip 中统一任务栏提示计时。
Influence: 任务栏提示采用一致的延时。
PMS: TASK-399397
@wjyrich
wjyrich force-pushed the fix/task-399397-tooltip-master branch from 305335e to 0b3f1c5 Compare November 30, 2026 05:33
@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: 18202781743, wjyrich

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@wjyrich
wjyrich merged commit da3e73a into linuxdeepin:master Nov 30, 2026
11 of 13 checks passed
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.

3 participants