-
Notifications
You must be signed in to change notification settings - Fork 55
feat: add empty state for notification center #1191
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Reviewer's GuideIntroduces a reusable DropShadowText component and viewCount tracking to render a new “No recent notifications” empty state in the notification center, refactors header styling to use the shared component, and updates all translation files with the new message. Class diagram for DropShadowText and notification viewCount changesclassDiagram
class DropShadowText {
+color: rgba(1,1,1,1)
+layer.enabled: true
+layer.effect: DropShadow
}
class NotifyHeaderTitleText {
<<refactored>>
-Text (was base)
+DropShadowText (now base)
+tFont: font
}
class NotifyView {
+viewCount: int (readonly)
}
class NotifyStaging {
+viewCount: int (readonly)
}
class NotifyCenter {
+stagingViewCount: int
}
NotifyHeaderTitleText --|> DropShadowText
NotifyCenter o-- NotifyView
NotifyCenter o-- NotifyStaging
NotifyView <.. DropShadowText : uses for empty state message
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this 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:
- Abstract the empty-state display logic into the model (for example a single
isEmptyorhasNotificationsproperty) rather than manually trackingstagingViewCountandviewCountin the view hierarchy. - Consider renaming
stagingViewCountto a more descriptive name likeinitialNotificationCountto clarify its role in controlling the empty state. - Several translations for the new “No recent notifications” context are marked as
unfinished; please provide placeholder translations or coordinate with localization to ensure the message is visible in all languages.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Abstract the empty-state display logic into the model (for example a single `isEmpty` or `hasNotifications` property) rather than manually tracking `stagingViewCount` and `viewCount` in the view hierarchy.
- Consider renaming `stagingViewCount` to a more descriptive name like `initialNotificationCount` to clarify its role in controlling the empty state.
- Several translations for the new “No recent notifications” context are marked as `unfinished`; please provide placeholder translations or coordinate with localization to ensure the message is visible in all languages.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: 18202781743, yixinshark, zccrs The full list of commands accepted by this bot can be found here. DetailsNeeds approval from an approver in each of these files:Approvers can indicate their approval by writing |
1. Added "No recent notifications" message when notification center is empty 2. Created reusable DropShadowText component for consistent text styling 3. Added viewCount properties to track notification counts 4. Updated translation files for new empty state message 5. Improved header text styling by using DropShadowText component The changes provide better user feedback when there are no notifications and improve text consistency across the notification center. The empty state message helps users understand the current state of the application. feat: 为通知中心添加空状态提示 1. 当通知中心为空时添加"没有最近的通知"提示信息 2. 创建可复用的DropShadowText组件实现统一文本样式 3. 添加viewCount属性来跟踪通知数量 4. 更新翻译文件支持新的空状态提示 5. 使用DropShadowText组件改进标题文本样式 这些改动在通知中心为空时提供了更好的用户反馈,并改进了整个通知中心的文本 一致性。空状态提示帮助用户理解应用的当前状态。 Issue: https://bbs.deepin.org/post/289386
deepin pr auto review代码审查意见:
以上是代码审查的意见,希望能够帮助到开发者。 |
is empty
The changes provide better user feedback when there are no notifications
and improve text consistency across the notification center. The
empty state message helps users understand the current state of the
application.
feat: 为通知中心添加空状态提示
这些改动在通知中心为空时提供了更好的用户反馈,并改进了整个通知中心的文本
一致性。空状态提示帮助用户理解应用的当前状态。
Issue: https://bbs.deepin.org/post/289386
Summary by Sourcery
Add an empty state message to the notification center and improve text styling consistency by introducing a DropShadowText component, tracking notification counts via new properties, and updating translations and build config.
New Features:
Enhancements:
Build:
Documentation: