Bug 407536 - new notifications: notification shown when a widget is removed takes 1 minute to disappear
Summary: new notifications: notification shown when a widget is removed takes 1 minute...
Status: RESOLVED INTENTIONAL
Alias: None
Product: plasmashell
Classification: Plasma
Component: Notifications (show other bugs)
Version: master
Platform: Neon Linux
: NOR normal
Target Milestone: 1.0
Assignee: Kai Uwe Broulik
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-14 19:33 UTC by Patrick Silva
Modified: 2019-05-20 17:44 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Patrick Silva 2019-05-14 19:33:50 UTC
SUMMARY
Such behavior occurs on neon dev unstable running the new notifications system.
I can't reproduce on Arch Linux running plasma 5.15.5.

STEPS TO REPRODUCE
1. add a widget to desktop (analog clock, for example)
2. right click on the newly added widget and click the option to remove it
3. 

OBSERVED RESULT
plasma shows a notification that takes 1 minute to disappear

EXPECTED RESULT
the notification disappears after the timeout configured in notifications kcm

SOFTWARE/OS VERSIONS
Operating System: KDE neon Unstable Edition
KDE Plasma Version: 5.15.80
KDE Frameworks Version: 5.58.0
Qt Version: 5.12.0
Comment 1 David Edmundson 2019-05-15 00:23:19 UTC
That "hide popup after" does not apply to notifications marked as persistent.

Persistent popups stay there indefinitely until interacted with. 
The plasma one goes away after 60 seconds as the client (plasma) deletes the notification. It's not a timeout server side.

It's all working as intended, but it's definitely not intuitive given the choice of labeling. I think we might want to reword that.
Comment 2 Nate Graham 2019-05-17 21:19:14 UTC
If Plasma deletes persistent notifications after 60 seconds, then they're not exactly persistent! :) We need to fix that.
Comment 3 Nate Graham 2019-05-17 22:12:53 UTC
Rather, a client should only delete its own persistent notifications after they no longer apply, not based on an arbitrary time limit.
Comment 4 David Edmundson 2019-05-18 09:49:53 UTC
Undo lasts 60 seconds. It can't last forever.
The popuo is persistent while the notification is active.

I don't see what's wrong there or what you could do differently.
Comment 5 Nate Graham 2019-05-20 17:02:38 UTC
My mental model of how a persistent notification works is that it lasts until either the user manually dismisses it, or the condition that's being notified about is no longer applicable. If this isn't the case, it's actually not persistent at all, it just has a long (and potentially arbitrary) timeout.
Comment 6 David Edmundson 2019-05-20 17:15:26 UTC
>or the condition that's being notified about is no longer applicable.

From a notification POV that's exactly what is happening. 

When we delete an applet it doesn't actually delete it, in case a user hits undo. The applet is still alive and running but hidden. Frankly, I don't remotely like the way that works, it's a hack, but that's not within scope of any KF5 changes.

We can't just keep it alive forever. You'd just leak all the memory.
After it has been properly deleted we must remove this notification from the notification history as you can't restore it and the button is useless.

This whole thing is somewhat independent of the popup timeout. The popup is shown persistently whilst the notification is active.
Comment 7 Nate Graham 2019-05-20 17:26:44 UTC
Interesting, thanks. All of those implementation details though that aren't apparent to the user. But I do see what you mean and the tricky parts of this. being visible for a minute is better than what it used to do though (disappearing after a few seconds) so maybe we can consider this okay as-is.
Comment 8 Nate Graham 2019-05-20 17:44:32 UTC
Other ideas for communicating this to the user better:
- Make persistent notifications look visually distinct somehow
- Tweak the wording in the KCM to emphasize that the timeout only applies to non-persistent notifications