Skip to content

fix(loader): ignore applet min-height message while applet visible - #504

Merged
deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fork-from-master-0903/bug-375629
Sep 10, 2026
Merged

deepin-bot[bot] merged 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fork-from-master-0903/bug-375629

Conversation

@MyLeeJiEun

@MyLeeJiEun MyLeeJiEun commented Sep 3, 2026 •

Copy link
Copy Markdown
Contributor
  1. Track the opened applet widget via PluginItem::appletOpened signal
  2. Ignore MSG_SET_APPLET_MIN_HEIGHT while applet is showing to avoid panel height jumps on plugin changes
  3. Flush the pending message on applet Show, dropping stale values set while hidden

Log: Quick panel ignores min-height updates while displayed
PMS: BUG-375629

fix(loader): 快捷面板展示时不响应最小高度消息

  1. 通过 PluginItem::appletOpened 信号跟踪已打开的 applet 控件
  2. 快捷面板展示期间不响应 MSG_SET_APPLET_MIN_HEIGHT,避免插件增删导致面板高度跳变
  3. 在 applet Show 时投递暂存消息,隐藏期间设置的旧值直接作废

Log: 快捷面板展示期间不响应最小高度消息
PMS: BUG-375629

Summary by Sourcery

Stabilize panel sizing by deferring applet minimum-height updates while the applet is displayed.

Bug Fixes:

  • Prevent applet minimum-height updates from causing panel height jumps while the applet is visible.
  • Discard stale hidden-state height updates and apply the latest pending update when the applet is shown.

Enhancements:

  • Track the currently opened applet widget to coordinate visibility-dependent height handling.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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

You can request another review in 4 days and 6 hours by commenting @sourcery-ai review. Upgrade to get a review now.

@deepin-ci-robot

Copy link
Copy Markdown

Hi @MyLeeJiEun. Thanks for your PR.

I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Details

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@sourcery-ai

sourcery-ai Bot commented Sep 3, 2026

Copy link
Copy Markdown

Reviewer's Guide

The loader now tracks the active applet widget and suppresses minimum-height messages while it is visible, using event-filter-based Show handling to apply only the latest deferred update and prevent panel height jumps during plugin changes.

Sequence diagram for deferred applet minimum-height updates

sequenceDiagram
    participant PluginItem
    participant WidgetPlugin
    participant Applet as AppletWidget
    participant Interface as PluginsItemInterfaceV2

    PluginItem->>WidgetPlugin: appletOpened(applet)
    WidgetPlugin->>Applet: installEventFilter(this)
    Interface->>WidgetPlugin: eventMessage(message)
    WidgetPlugin->>WidgetPlugin: onDockEventMessageArrived(message)
    alt MSG_SET_APPLET_MIN_HEIGHT and applet is visible
        WidgetPlugin->>WidgetPlugin: Store latest pending message
    else Other message or applet is hidden
        WidgetPlugin->>Interface: message(message)
    end
    Applet-->>WidgetPlugin: QEvent::Show
    WidgetPlugin->>WidgetPlugin: eventFilter(watched, event)
    WidgetPlugin->>Interface: message(pending message)
Loading

File-Level Changes

Change Details Files
Track the currently opened applet and use its visibility to defer unstable minimum-height updates.
  • Emit the opened applet widget from PluginItem when creating the popup.
  • Store the applet with a QPointer and install an event filter, replacing the previous tracked widget when necessary.
  • Defer MSG_SET_APPLET_MIN_HEIGHT messages while the applet is visible, retaining only the latest message.
  • Flush the deferred message on the applet's Show event and discard stale pending values when processing updates while hidden.
src/loader/pluginitem.cpp
src/loader/pluginitem.h
src/loader/widgetplugin.cpp
src/loader/widgetplugin.h

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

@MyLeeJiEun
MyLeeJiEun force-pushed the fork-from-master-0903/bug-375629 branch from c1fc107 to cb80f28 Compare September 4, 2026 08:05
mhduiy
mhduiy previously approved these changes Sep 10, 2026
@mhduiy
mhduiy requested a review from 18202781743 September 10, 2026 09:41
@18202781743

Copy link
Copy Markdown
Contributor

https://github.com/linuxdeepin/dde-shell/blob/2d04aec84ff08640950fb5cbb5230176448cc8c3/panels/dock/tray/quickpanel/QuickPanelPage.qml#L45 是不是可以从dde-shell里着手呀,因为高度变化了,让整个window高度变化了,

18202781743
18202781743 previously approved these changes Sep 10, 2026
1. Track the opened applet widget via PluginItem::appletOpened signal
2. Ignore MSG_SET_APPLET_MIN_HEIGHT while applet is showing to avoid panel height jumps on plugin changes
3. Flush the pending message on applet Show, dropping stale values set while hidden

Log: Quick panel ignores min-height updates while displayed
PMS: BUG-375629

fix(loader): 快捷面板展示时不响应最小高度消息

1. 通过 PluginItem::appletOpened 信号跟踪已打开的 applet 控件
2. 快捷面板展示期间不响应 MSG_SET_APPLET_MIN_HEIGHT,避免插件增删导致面板高度跳变
3. 在 applet Show 时投递暂存消息,隐藏期间设置的旧值直接作废

Log: 快捷面板展示期间不响应最小高度消息
PMS: BUG-375629
@MyLeeJiEun
MyLeeJiEun dismissed stale reviews from 18202781743 and mhduiy via 48b74f5 September 10, 2026 11:28
@MyLeeJiEun
MyLeeJiEun force-pushed the fork-from-master-0903/bug-375629 branch from cb80f28 to 48b74f5 Compare September 10, 2026 11:28
@MyLeeJiEun

Copy link
Copy Markdown
Contributor Author

/merge

@deepin-bot

deepin-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

This pr cannot be merged! (status: blocked)

@MyLeeJiEun

Copy link
Copy Markdown
Contributor Author

/forcemerge

@deepin-bot

deepin-bot Bot commented Sep 10, 2026

Copy link
Copy Markdown

This pr force merged! (status: blocked)

@deepin-bot
deepin-bot Bot merged commit 3bf56a6 into linuxdeepin:master Sep 10, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants