Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Sep 30, 2025

  1. Added "Clean All" button to NotifyViewDelegate component for clearing
    all notifications
  2. Restructured OverlapNotify component to use onRemove signal instead
    of inline clearButton
  3. Added notifyContent property alias to OverlapNotify for external
    access
  4. Updated translation context from "OverlapNotify" to
    "NotifyViewDelegate" across all language files
  5. Standardized XML formatting in translation files with proper encoding
    and line breaks

Log: Added "Clean All" button to notification center for batch
notification removal

Influence:

  1. Test the "Clean All" button functionality in notification center
  2. Verify that clicking the button removes all notifications properly
  3. Check translation display for "Clean All" text in different languages
  4. Test notification removal animation and behavior
  5. Verify that individual notification dismissal still works correctly
  6. Test with multiple notification scenarios (single, grouped,
    overlapping)

feat: 在通知中心添加清除全部按钮

  1. 在 NotifyViewDelegate 组件中添加"清除全部"按钮用于清理所有通知
  2. 重构 OverlapNotify 组件,使用 onRemove 信号替代内联 clearButton
  3. 添加 notifyContent 属性别名以便外部访问
  4. 在所有语言文件中将翻译上下文从"OverlapNotify"更新
    为"NotifyViewDelegate"
  5. 统一翻译文件的 XML 格式,包含正确的编码和换行符

Log: 新增通知中心"清除全部"按钮,支持批量删除通知

Influence:

  1. 测试通知中心"清除全部"按钮功能
  2. 验证点击按钮后所有通知是否正确移除
  3. 检查不同语言环境下"清除全部"文本的翻译显示
  4. 测试通知移除动画和行为
  5. 验证单个通知的关闭功能是否仍然正常工作
  6. 测试多种通知场景(单个、分组、重叠)

PMS: BUG-336149

Summary by Sourcery

Add a bulk "Clean All" button to the notification center and refactor notification components to streamline removal logic

New Features:

  • Add "Clean All" button to NotifyViewDelegate component for batch removal of notifications

Enhancements:

  • Refactor OverlapNotify to use an onRemove signal and expose notifyContent via a property alias
  • Update translation contexts from OverlapNotify to NotifyViewDelegate and standardize XML formatting across TS files

1. Added "Clean All" button to NotifyViewDelegate component for clearing
all notifications
2. Restructured OverlapNotify component to use onRemove signal instead
of inline clearButton
3. Added notifyContent property alias to OverlapNotify for external
access
4. Updated translation context from "OverlapNotify" to
"NotifyViewDelegate" across all language files
5. Standardized XML formatting in translation files with proper encoding
and line breaks

Log: Added "Clean All" button to notification center for batch
notification removal

Influence:
1. Test the "Clean All" button functionality in notification center
2. Verify that clicking the button removes all notifications properly
3. Check translation display for "Clean All" text in different languages
4. Test notification removal animation and behavior
5. Verify that individual notification dismissal still works correctly
6. Test with multiple notification scenarios (single, grouped,
overlapping)

feat: 在通知中心添加清除全部按钮

1. 在 NotifyViewDelegate 组件中添加"清除全部"按钮用于清理所有通知
2. 重构 OverlapNotify 组件,使用 onRemove 信号替代内联 clearButton
3. 添加 notifyContent 属性别名以便外部访问
4. 在所有语言文件中将翻译上下文从"OverlapNotify"更新
为"NotifyViewDelegate"
5. 统一翻译文件的 XML 格式,包含正确的编码和换行符

Log: 新增通知中心"清除全部"按钮,支持批量删除通知

Influence:
1. 测试通知中心"清除全部"按钮功能
2. 验证点击按钮后所有通知是否正确移除
3. 检查不同语言环境下"清除全部"文本的翻译显示
4. 测试通知移除动画和行为
5. 验证单个通知的关闭功能是否仍然正常工作
6. 测试多种通知场景(单个、分组、重叠)

PMS: BUG-336149
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 there - 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.

@sourcery-ai
Copy link

sourcery-ai bot commented Sep 30, 2025

Reviewer's Guide

This PR implements a “Clean All” batch removal feature by adding a clear button in the NotifyViewDelegate component, refactors the OverlapNotify component to emit an onRemove signal (with a new notifyContent alias) instead of an inline button, and standardizes translation contexts and XML formatting across all TS files.

Sequence diagram for batch notification removal via 'Clean All' button

sequenceDiagram
    actor User
    participant NotifyViewDelegate
    participant notifyContent
    User->>NotifyViewDelegate: Clicks 'Clean All' button
    NotifyViewDelegate->>notifyContent: clearButton.onClicked()
    notifyContent->>notifyContent: remove()
    notifyContent->>NotifyViewDelegate: Notifies removal complete
    NotifyViewDelegate->>User: Updates UI (notifications cleared)
Loading

Class diagram for NotifyViewDelegate and OverlapNotify changes

classDiagram
    class NotifyViewDelegate {
        +clearButton: AnimationSettingButton
        +notifyContent: alias
    }
    class OverlapNotify {
        +onRemove: signal
        +notifyContent: alias
    }
    NotifyViewDelegate "1" -- "1" OverlapNotify: uses
    OverlapNotify <|-- notifyContent: alias
    NotifyViewDelegate <|-- notifyContent: alias
Loading

File-Level Changes

Change Details Files
Added “Clean All” button in NotifyViewDelegate for batch notification removal
  • Injected a clearButton element under notifyContent in NotifyViewDelegate.qml
  • Configured icon, qsTr("Clean All") text and onClicked handler to invoke notifyContent.remove()
panels/notification/center/NotifyViewDelegate.qml
Refactored OverlapNotify to use onRemove signal and expose notifyContent
  • Added property alias notifyContent to OverlapNotify for external access
  • Removed inline clearButton and wired onRemove signal to set removing state via removedCallback
panels/notification/center/OverlapNotify.qml
Updated translation contexts and standardized XML formatting in TS files
  • Added XML encoding declaration and proper line breaks in all translation files
  • Renamed tags from OverlapNotify to NotifyViewDelegate
  • Marked existing entries as type="unfinished"
panels/notification/center/translations/*.ts

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

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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

@18202781743
Copy link
Contributor Author

/forcemerge

@deepin-bot
Copy link

deepin-bot bot commented Sep 30, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit fee593a into linuxdeepin:master Sep 30, 2025
6 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