Skip to content

Conversation

@deepin-ci-robot
Copy link
Contributor

@deepin-ci-robot deepin-ci-robot commented Jul 15, 2025

Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#504

Summary by Sourcery

Sync QML components from linuxdeepin/dtkdeclarative by integrating FloatingPanel for alert tooltips and enriching style palettes.

Enhancements:

  • Replace custom BoxShadow and Rectangle background in AlertToolTip.qml with FloatingPanel component
  • Remove obsolete connector shadow and background items from AlertToolTip.qml
  • Adjust opacity values for background and normalDark palette entries in FlowStyle.qml
  • Add new palette roles dropShadow, outsideBorder, and insideBorder in FlowStyle.qml
  • Enable inside border loader unconditionally in FloatingPanel.qml

Synchronize source files from linuxdeepin/dtkdeclarative.

Source-pull-request: linuxdeepin/dtkdeclarative#504
@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

@deepin-ci-robot
Copy link
Contributor Author

deepin pr auto review

代码审查意见:

  1. 代码重构:

    • AlertToolTip.qml文件中,将原来的ItemRectangle组合替换为FloatingPanel,简化了背景的实现。这是一个好的重构,因为它减少了代码的复杂性和重复。
  2. 性能优化:

    • FloatingPanel.qml文件中,Loader组件的active属性现在只依赖于control.insideBorderColor,这可能会减少不必要的渲染。这是一个性能优化的改进。
  3. 代码可读性:

    • FlowStyle.qml文件中,新增的dropShadowoutsideBorderinsideBorder属性使得D.Palette更加模块化和可维护。但是,这些属性的定义应该有相应的注释说明其用途和作用,以提高代码的可读性。
  4. 颜色透明度:

    • FlowStyle.qml文件中,normalnormalDark属性的透明度值从0.6变更为0.5,这可能会影响界面的视觉效果。需要确认这一变更是否符合设计要求。
  5. 潜在问题:

    • AlertToolTip.qml文件中,移除了BoxShadowRectangle的组合,这可能会影响工具提示的阴影效果。需要确认这一变更是否符合设计要求,并确保没有其他组件依赖于这些被移除的元素。
  6. 代码一致性:

    • FlowStyle.qml文件中,新增的dropShadowoutsideBorderinsideBorder属性与现有的D.Palette属性命名风格不一致,建议统一命名风格以提高代码的一致性。

总体来说,这些更改提高了代码的简洁性和可维护性,但需要注意确保视觉效果和功能的一致性。

@sourcery-ai
Copy link

sourcery-ai bot commented Jul 15, 2025

Reviewer's Guide

Upstream synchronization replaces custom tooltip styling in AlertToolTip.qml with a reusable FloatingPanel component, refines FlowStyle palette with updated opacity and new dropShadow/insideBorder/outsideBorder colors, and simplifies Loader activation logic in FloatingPanel.qml.

Class diagram for AlertToolTip background refactor

classDiagram
    class AlertToolTip {
        background: FloatingPanel
    }
    class FloatingPanel {
        backgroundColor
        insideBorderColor
        outsideBorderColor
    }
    AlertToolTip --> FloatingPanel : uses
    %% Previously:
    class BoxShadow {
        shadowBlur
        shadowOffsetY
        shadowColor
        cornerRadius
    }
    class Rectangle {
        backgroundColor
        borderColor
        color
        border.color
        radius
    }
    %% Old composition (removed):
    %% AlertToolTip --> BoxShadow : used
    %% AlertToolTip --> Rectangle : used
    %% BoxShadow o-- Rectangle : contains
    %% Now replaced by FloatingPanel
Loading

Class diagram for updated FlowStyle palette properties

classDiagram
    class FlowStyle {
        background: D.Palette
        connecterdropShadow: D.Palette
        dropShadow: D.Palette
        outsideBorder: D.Palette
        insideBorder: D.Palette
    }
    class D.Palette {
        normal
        normalDark
    }
    FlowStyle --> D.Palette : uses
Loading

Class diagram for FloatingPanel Loader activation logic change

classDiagram
    class FloatingPanel {
        insideBorderColor
        Loader.active
    }
    class Loader {
        active
        sourceComponent: InsideBoxBorder
    }
    FloatingPanel o-- Loader : contains
Loading

File-Level Changes

Change Details Files
Abstract tooltip background and shadow in AlertToolTip to FloatingPanel
  • Removed manual BoxShadow and Rectangle background implementation
  • Replaced background property with FloatingPanel usage
  • Removed connector shadow block
qt6/src/qml/AlertToolTip.qml
Update and extend FlowStyle palette definitions
  • Adjusted background palette alpha values from 0.6 to 0.5
  • Added dropShadow palette entries
  • Added outsideBorder and insideBorder palette entries
qt6/src/qml/FlowStyle.qml
Simplify Loader activation in FloatingPanel
  • Removed theme check from Loader.active condition
  • Now activates solely based on insideBorderColor presence
qt6/src/qml/FloatingPanel.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

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!


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.

@18202781743 18202781743 merged commit 7a69942 into master Jul 15, 2025
14 of 15 checks passed
@18202781743 18202781743 deleted the sync-pr-504-nosync branch July 15, 2025 11:37
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