Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Dec 7, 2024

Using OverlapIndicator to display overlap for notification.
Drop NotifyItemBackground's blur(it can't work), and adjust it's
opacity to from 0.7 to 1.
Drop blur of NotificationCenter.
Drop window's blur, and window is transparent.

pms: BUG-284903

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

Using OverlapIndicator to display overlap for notification.
Drop NotifyItemBackground's blur(it can't work), and adjust it's
opacity to from 0.7 to 1.
Drop blur of NotificationCenter.
Drop window's blur, and window is transparent.

pms: BUG-284903
@deepin-ci-robot
Copy link

deepin pr auto review

代码审查意见:

  1. 代码重构

    • Bubble.qml文件中,Loader组件的id属性被移到了组件定义的外部,这可能会导致id冲突或无法正确引用组件。建议保持id属性在组件定义内部。
    • NormalBubble.qmlOverlayBubble.qml文件中,NormalBubble组件的id属性被移到了组件定义的外部,这同样可能会导致id冲突或无法正确引用组件。建议保持id属性在组件定义内部。
    • NotifyAction.qml文件中,Loader组件用于显示焦点框,但Loaderactive属性被设置为actionButton.activeFocus,这可能会导致焦点框在不需要时显示。建议使用FocusScopeFocusScopeItem来管理焦点。
  2. 性能优化

    • NotifyItemContent.qml文件中,Loader组件用于显示操作按钮,但Loaderactive属性被设置为!root.strongInteractive && root.actions.length > 0 && root.hovered,这意味着只有在特定条件下才会显示操作按钮。这可能会导致不必要的渲染和性能开销。建议使用SwitchLoadervisible属性来控制组件的可见性,而不是active属性。
  3. 代码可读性

    • NotifyItemBackground.qml文件中,Loader组件用于显示阴影和边框,但Loaderactive属性被设置为control.dropShadowColorcontrol.insideBorderColorcontrol.outsideBorderColor,这可能会导致代码难以理解和维护。建议使用SwitchLoadervisible属性来控制组件的可见性,而不是active属性。
  4. 安全

    • NotifyItemContent.qml文件中,onActionInvoked函数直接调用Applet.invokeAction,这可能会导致安全风险。建议在调用之前进行参数验证和权限检查。
  5. 注释和文档

    • OverlapIndicator.qml文件中,OverlapIndicator组件的revert属性没有注释说明其用途,这可能会使其他开发者难以理解其作用。建议添加注释来解释revert属性的作用。

总体来说,代码重构和性能优化是当前代码中需要重点关注的方面。同时,保持代码的可读性和安全性也是非常重要的。

@18202781743
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Dec 7, 2024

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit f996c8d into linuxdeepin:master Dec 7, 2024
7 of 10 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