通知面板中通知按钮状态与气泡不一致,未兼容 freedesktop ActionInvoked 机制 #13120
itsXuSt
started this conversation in
Features Request & Ideas | 特性请求 & 头脑风暴
Replies: 2 comments
-
|
V20 版本中,通知消息进入面板后,按钮状态可用,点击按钮后,依然能发送 ActionInvoked 信号。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
|
这个是特意这样实现的,通知中心里是历史通知,已经超时了的通知,普通的action是不能触发的, |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
通知消息从气泡进入通知面板后,按钮启用状态发生变化:
气泡阶段(processed = false):
通知面板阶段(processed = true):
相关代码位置
https://github.com/linuxdeepin/dde-shell/blob/61b4c678fcce9ae4afecddbdbfcd52fe2e20337c/panels/notification/center/notifyitem.cpp#L130-L131
期望行为
通知面板中的按钮启用状态应与气泡阶段保持一致,不应因通知进入面板而强制禁用按钮。
通知面板应完全兼容 freedesktop.org Notification Specification 的 ActionInvoked 机制:
- 无论通知处于气泡还是面板阶段,点击按钮都应发送 ActionInvoked 信号
- 应用进程应能正常接收信号并执行相应逻辑
按钮点击后是否能执行对应事件,应由发送通知的应用自行决定:
- 如果应用进程存活,应通过 ActionInvoked 信号通知应用处理
- 如果应用提供了 x-deepin-action-* 扩展提示,可作为降级方案执行预定义命令
- 不应因为缺少扩展提示就禁用按钮,这违背了应用自主控制原则
影响分析
用户在气泡中看到可用按钮,进入面板后发现按钮被禁用,体验不一致且困惑。
未正确实现 freedesktop 通知规范的 ActionInvoked 机制,影响标准兼容性。
应用开发者需要额外了解 DDE 特有的 x-deepin-action-* 机制,增加了适配成本。
Beta Was this translation helpful? Give feedback.
All reactions