[Notifications] Dodge Plasma dialogs
ClosedPublic

Authored by broulik on Tue, Sep 24, 9:52 PM.

Details

Summary

The notification popup typically gets in the way of the system tray popup.
In case it would cover a Plasma dialog, hide the notification popup.
It doesn't specifically check for System Tray but then it will also get out of the way of your calendar and other widgets you might have placed in the respective corner.

Test Plan

Both genius and evil.
Still surprised by how little code it is, especially that on QML side a simple binding is enough.
The change from var to let is for sane scoping, so that the dialog we refer to is correct one, with var scoping it would always be the one from the last iteration of the loop


Moving the systray popup with Alt+left click is just to demonstrate the dodging capabilities of the popup ;)

  • Opened calendar, popup hid
  • Also hides when an Alternatives dialog covers it
  • does not hide for panel controller
  • Closing notification and interacting with them, especially context menu (as it opens a new window) still works fine

Diff Detail

Repository
R120 Plasma Workspace
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Tue, Sep 24, 9:52 PM
Restricted Application added a project: Plasma. · View Herald TranscriptTue, Sep 24, 9:52 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Tue, Sep 24, 9:52 PM
ngraham accepted this revision.Thu, Sep 26, 4:19 PM
ngraham added a subscriber: ngraham.

This works great!

Instead of temporarily hiding the pop-ups, maybe it should appear above the dialog? Not a huge deal though.

5.17 branch?

This revision is now accepted and ready to land.Thu, Sep 26, 4:19 PM
mart added a subscriber: mart.Fri, Sep 27, 8:44 AM

This works great!

Instead of temporarily hiding the pop-ups, maybe it should appear above the dialog? Not a huge deal though.

5.17 branch?

would make sense...
unless you are showing the notification full representation tough, where things would be kinda redundant

mart accepted this revision.Fri, Sep 27, 8:58 AM

this may be good in both .17 and master, then to see if is possible, only in master to actually move the notivications out of the way

This revision was automatically updated to reflect the committed changes.
meven added a subscriber: meven.Wed, Oct 16, 1:12 PM

I have some personal feedback regarding this :

  1. I open my bluetooth popup
  2. Click on a device to connect to
  3. Nothing happens
  4. I close the bluetooth popup
  5. I discover a notification telling me the bluetooth connection failed

Because of this change I loose user feedback.
Any notifications from a plasma tray popup are hidden to the user, resulting in poor User Experience.
There are others use cases where the notification is relevant to show when the tray popup is opened.

My suggestion would be that instead to hide the notification, show them above/below the popup, moving them back to their right position when the popup is closed.

Bluetooth could provide some better feedback inside the plasmoid.
Pointless confirmation notifications in plasma-nm were the main reason for this patchset.
Sliding could be done but is a lot more complicated than this patchset since the dialogs are individual, patches welcome...

Bluetooth could provide some better feedback inside the plasmoid.

Agreed, notifications shouldn't be used when the app/window/UI/whatever is still open; feedback should be provided there instead.

Pointless confirmation notifications in plasma-nm were the main reason for this patchset.

I think the same applies to plasma-nm. See also https://bugs.kde.org/show_bug.cgi?id=409774

meven added a comment.Wed, Oct 16, 4:34 PM

Bluetooth could provide some better feedback inside the plasmoid.

Agreed, notifications shouldn't be used when the app/window/UI/whatever is still open; feedback should be provided there instead.

I disagree plasmoid should avoid sending notifications.
Since very often their behavior is by nature asynchronous the result of an operation can happen after the popup is closed.
And having two code path for plasmoid to notify the user depending or not whether they are displayed is not recommendable.
Because it would complicate the implementation and would make user experience inconsistent.

Pointless confirmation notifications in plasma-nm were the main reason for this patchset.

I think the same applies to plasma-nm. See also https://bugs.kde.org/show_bug.cgi?id=409774

This is a separate issue : the plasmoid should mute itself in this case as the notification is the results of user interaction.
Hidding the notification behind a popup is at best a workaround.

The issue I report here is not limited to notification originating from tray popup plasmoid.
What if you receive an email while changing your audio setup ?
You miss the notification until you are done with your setup, that's adding more chances to miss the notification.
More generally displaying a popup should not hide notification IMO (and notifications should rarely be hidden).

So yes @broulik I would be happy to patch this but I am not a specialist and it would take me quite some effort.
On the other end the feature has been recently added and should be refined IMO (I am trying to make this point): how long before we get bug reports ?
So I thought you would consider adding it somewhere on your infinite TODO list ^^

I am sorry I react only now but I saw this issue with this arising when the review was opened but did not react due to LIFE(tm)

In the end I am happy opening a notification bug, to let us deal with it it in due times.
This is probably more appropriate than discussing this here.

Hidding the notification behind a popup is at best a workaround.

It is.

What if you receive an email while changing your audio setup ?

Then you close the popup and get the notification, I don't see an issue with that. It's not like you fiddle with System Tray for long periods of time, are you? The only reason I previously had to keep System Tray open was to monitor a copy progress but that is possible without doing that nowadays.

how long before we get bug reports ?

Dunno. I got bug reports about notifications covering System Tray before that. You can never make people happy.

So I thought you would consider adding it somewhere on your infinite TODO list ^^

I don't have any concrete plans. Maybe one day when I can be arsed to but moving the popups out of the way in a sensible fashion as a group is a lot harder than just hiding them individually.
When your panel is on the left, where to move the notifications? What if there isn't enough room to move them out of the way? etc

In the end I am happy opening a notification bug, to let us deal with it it in due times.

Sure.

Bluetooth could provide some better feedback inside the plasmoid.

Agreed, notifications shouldn't be used when the app/window/UI/whatever is still open; feedback should be provided there instead.

I disagree plasmoid should avoid sending notifications.

It's fine for plasmoids to send notifications. But when the system tray popup is open, a better location for the feedback is right there, where your eyeballs are currently looking. In principle, notifications are used for apps that you aren't actively using, to inform you of something happening that you might otherwise miss. If you're currently using the app, the app can show you the information directly, with no need to send a notification.