Skip to content

Conversation

@18202781743
Copy link
Contributor

@18202781743 18202781743 commented Mar 27, 2025

Increase window's width to prevent shadows from being clipped.

pms: BUG-304379 BUG-300509

Summary by Sourcery

Improve notification panel visual appearance and prevent shadow clipping by adjusting window dimensions and shadow properties

Bug Fixes:

  • Increase notification window width to prevent shadow clipping
  • Adjust notification item shadow and positioning to improve visual clarity

Enhancements:

  • Modify notification item background and positioning for better visual presentation
  • Update color opacity for notification elements

Increase window's width to prevent shadows from being clipped.

pms: BUG-304379 BUG-300509
@sourcery-ai
Copy link

sourcery-ai bot commented Mar 27, 2025

Reviewer's Guide by Sourcery

This pull request addresses shadow clipping issues in the notification bubble by increasing the window width and adjusting margins. It also modifies the crystal color values to use a solid color and adjusts the shadow offset for the notification background.

Updated class diagram for NotifyItemBackground

classDiagram
  class NotifyItemBackground {
    -shadowOffsetY: int
  }
  note for NotifyItemBackground "shadowOffsetY changed from 6 to 8"
Loading

Updated class diagram for Window in main.qml

classDiagram
  class Window {
    -width: int
  }
  note for Window "width changed from 380 to 390"
Loading

File-Level Changes

Change Details Files
Increased the width of the notification window to prevent shadow clipping.
  • Increased the width of the Window from 380 to 390.
  • Adjusted the margins of bubbleView within the Window.
  • Adjusted the margins of the notification center Window.
panels/notification/bubble/package/main.qml
panels/notification/center/package/main.qml
Modified the crystal color values in Palette to use a solid color instead of a semi-transparent one.
  • Changed the crystal color's alpha value from 0.5 to 1.0 for both normal and normalDark palettes.
  • Commented out the original crystal color definitions.
panels/notification/plugin/NotifyItemContent.qml
panels/notification/plugin/SettingActionButton.qml
Adjusted the shadow offset of the BoxShadow component.
  • Increased the shadowOffsetY from 6 to 8.
panels/notification/plugin/NotifyItemBackground.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!
  • Generate a plan of action for an issue: Comment @sourcery-ai plan on
    an issue to generate a plan of action for it.

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

deepin pr auto review

代码审查意见:

  1. main.qml文件中,宽度从380修改为390,需要确认是否有特定的设计需求或布局要求,以确保修改后的宽度符合设计规范。

  2. main.qml文件中,bubbleView的高度计算公式Math.max(10, bubbleView.height + bubbleView.anchors.topMargin + bubbleView.anchors.bottomMargin)可能需要考虑bubbleViewheight属性是否已经包含topMarginbottomMargin,以避免重复计算。

  3. main.qml文件中,spacing属性被移除,需要确认这是否是有意为之,以及是否有其他组件需要调整以适应这一变化。

  4. NotifyItemBackground.qml文件中,shadowOffsetY从6修改为8,需要确认这一改动是否符合阴影效果的设计要求。

  5. NotifyItemContent.qmlSettingActionButton.qml文件中,RGBA颜色值从0.5修改为1.0,这可能会影响组件的透明度。需要确认这一改动是否符合设计规范,并确保不会影响用户体验。

  6. NotifyItemContent.qmlSettingActionButton.qml文件中,注释掉的RGBA颜色值被恢复,但未移除注释。建议移除注释,或者如果这些值未来可能会被使用,应该明确标记这些值的使用场景。

  7. NotifyItemContent.qmlSettingActionButton.qml文件中,TODO注释应该提供更多的上下文信息,以便其他开发者理解这些值的修改原因和预期效果。

  8. center/package/main.qml文件中,margins属性从10修改为20,需要确认这一改动是否符合设计规范,并确保布局不会因为边距的增加而出现问题。

总体来说,这些改动看起来是为了调整UI组件的布局和视觉效果,但需要确保这些改动不会影响现有的功能和用户体验。建议在合并这些改动之前进行充分的测试,并确保所有相关组件和样式都得到了适当的调整。

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 @18202781743 - I've reviewed your changes - here's some feedback:

Overall Comments:

  • The changes to NotifyItemContent.qml and SettingActionButton.qml include commented-out code; please remove this before merging.
  • The change to NotifyItemBackground.qml increases shadowOffsetY; consider if this value should be a named constant.
Here's what I looked at during the review
  • 🟢 General issues: all looks good
  • 🟢 Security: all looks good
  • 🟢 Testing: all looks good
  • 🟢 Complexity: all looks good
  • 🟢 Documentation: all looks good

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.

@deepin-ci-robot
Copy link

[APPROVALNOTIFIER] This PR is NOT APPROVED

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

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 Mar 27, 2025

This pr force merged! (status: blocked)

@deepin-bot deepin-bot bot merged commit cdf6ea9 into linuxdeepin:master Mar 27, 2025
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