Skip to content

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

Open
MyLeeJiEun wants to merge 1 commit into
linuxdeepin:masterfrom
MyLeeJiEun:fork-from-master-0903/bug-375629
Open

fix(loader): ignore applet min-height message while applet visible#504
MyLeeJiEun wants to merge 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

Keep quick-panel minimum-height updates from affecting the panel while its applet is visible.

Bug Fixes:

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

Enhancements:

  • Track the currently opened applet widget and monitor its visibility lifecycle.

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

@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

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: MyLeeJiEun

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

@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

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.

2 participants