Skip to content

Conversation

@deepin-ci-robot
Copy link
Contributor

@deepin-ci-robot deepin-ci-robot commented Jun 18, 2025

Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#495

Summary by Sourcery

Synchronize blur-related updates from upstream, exposing and controlling blur validity in floating panels and menus

Bug Fixes:

  • Temporarily disable blur in Menu.qml to workaround pms:BUG 300055

Enhancements:

  • Add enableBlur property alias in FloatingPanel.qml to toggle blur
  • Convert InWindowBlur.qml’s valid property to an alias for blitterEnabled
  • Require blur.valid for FloatingPanel loader activation to ensure blur is enabled

Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#495
@deepin-ci-robot
Copy link
Contributor Author

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-ci-robot

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

@sourcery-ai
Copy link

sourcery-ai bot commented Jun 18, 2025

Reviewer's Guide

This PR synchronizes blur enablement across QML components by exposing an enableBlur alias on FloatingPanel, updating its Loader activation to check blur validity, refactoring InWindowBlur.valid to a property alias, and temporarily disabling blur in Menu.qml to work around a known bug.

Class diagram for updated blur handling in QML components

classDiagram
    class FloatingPanel {
        int blurRadius
        real blurMultiplier
        alias enableBlur (blur.valid)
    }
    class InWindowBlur {
        alias multiplier (blur.blurMultiplier)
        alias content (blur)
        alias data (blitter.data)
        alias valid (blitter.blitterEnabled)
    }
    class Menu {
        enableBlur = false // temporarily disables blur
    }
    FloatingPanel --> InWindowBlur : background
    InWindowBlur --> D.BackdropBlitter : blitter
    Menu --> FloatingPanel : uses
Loading

File-Level Changes

Change Details Files
Expose blur control externally and restrict loader activation based on blur validity
  • Added 'enableBlur' alias to FloatingPanel to map to blur.valid
  • Updated Loader.active to require blur.valid in addition to existing conditions
qt6/src/qml/FloatingPanel.qml
Refactor InWindowBlur.valid to alias underlying blitterEnabled property
  • Replaced readonly property 'valid' with a direct property alias to blitter.blitterEnabled
qt6/src/qml/overridable/InWindowBlur.qml
Temporarily disable blur in menu as a workaround for BUG 300055
  • Set enableBlur to false in Menu.qml with a TODO comment referencing the bug
qt6/src/qml/Menu.qml

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

@deepin-ci-robot
Copy link
Contributor Author

deepin pr auto review

代码审查意见:

  1. FloatingPanel.qml 文件中,新增的 enableBlur 属性别名可能需要更多的注释说明其用途和影响,以便其他开发者理解其作用。

  2. Menu.qml 文件中,注释 enableBlur: false 后面添加了 TODOBUG 标记,建议将 TODOBUG 标记移到代码注释中,以便更好地跟踪待办事项和问题。

  3. InWindowBlur.qml 文件中,将 readonly 属性 valid 修改为 property alias,这可能会影响其他使用 valid 属性的代码部分。需要确认这一改动是否与整个项目的其他部分兼容,并且是否有必要进行这样的修改。

  4. 代码中没有明显的语法错误或逻辑错误,但建议在修改属性类型时,确保所有相关的代码都已经更新以适应这一变化。

  5. 对于 TODOBUG 标记,建议在代码中添加更多的上下文信息,以便其他开发者更好地理解需要解决的问题和待办事项。

  6. 代码风格和格式保持一致,没有发现明显的格式问题。

  7. 没有发现性能或安全相关的问题,但建议在未来的开发中,持续关注性能优化和安全漏洞。

总体来说,代码的改动看起来是合理的,但需要注意与现有代码的兼容性,并确保所有相关的文档和注释都已更新。

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

Hey @deepin-ci-robot - I've reviewed your changes and they look great!

Prompt for AI Agents
Please address the comments from this code review:
## Individual Comments

### Comment 1
<location> `qt6/src/qml/FloatingPanel.qml:44` </location>
<code_context>

         Loader {
             anchors.fill: parent
-            active: Window.window && Window.window.color.a < 1
+            active: Window.window && Window.window.color.a < 1 && blur.valid
             sourceComponent: D.ItemViewport {
                 anchors.fill: parent
</code_context>

<issue_to_address>
Adding 'blur.valid' to the Loader's 'active' condition may prevent fallback rendering.

Requiring 'blur.valid' may cause the Loader to remain inactive when blur is unavailable, leading to missing UI elements. If you want to show a fallback when blur is invalid, handle that case separately.
</issue_to_address>

Sourcery is free for open source - if you like our reviews please consider sharing them ✨
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.

Comment on lines -44 to 45
anchors.fill: parent
active: Window.window && Window.window.color.a < 1
active: Window.window && Window.window.color.a < 1 && blur.valid
sourceComponent: D.ItemViewport {
Copy link

Choose a reason for hiding this comment

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

issue (bug_risk): Adding 'blur.valid' to the Loader's 'active' condition may prevent fallback rendering.

Requiring 'blur.valid' may cause the Loader to remain inactive when blur is unavailable, leading to missing UI elements. If you want to show a fallback when blur is invalid, handle that case separately.

@18202781743 18202781743 merged commit aa66caa into master Jun 18, 2025
9 of 12 checks passed
@18202781743 18202781743 deleted the sync-pr-495-nosync branch June 18, 2025 09:53
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