[Notifications] Sort popups ascending
ClosedPublic

Authored by broulik on Apr 7 2020, 7:35 AM.

Details

Summary

This ensures that newer notification popups don't push old ones out.
Some applications are notorious for spamming the user which right now results in a firework of notification popups. With this patch only the number that fits on screen is displayed and everything beyond that is off screen until there's room enough for new popups which are then gradually lowered.
It also reduces the likelihood of the notification the user is interacting with being shifted away by an incoming notification.
Furthermore, since notifications that are off screen will have their timeout reset, it can happen that you have a bunch of recent notifications at the bottom but then get some old ones that were off screen sliding back in because some middle ones have expired already, leading to awkward results.
Notification scoring (e.g. critical before normal) is untouched, so a "battery is critical" notification will still show up even if it's still chugging through the backlog of browser notifications.

Test Plan

Before

After

Order in the history is unaffected and still shows newest first

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
broulik created this revision.Apr 7 2020, 7:35 AM
Restricted Application added a project: Plasma. · View Herald TranscriptApr 7 2020, 7:35 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Apr 7 2020, 7:35 AM
broulik edited the summary of this revision. (Show Details)Apr 7 2020, 7:41 AM
ndavis accepted this revision.Apr 7 2020, 12:15 PM
ndavis added a subscriber: ndavis.

Nice usability improvement!

This revision is now accepted and ready to land.Apr 7 2020, 12:15 PM
ngraham accepted this revision.Apr 7 2020, 3:40 PM
ngraham added a subscriber: ngraham.

Indeed, much better. Now you can read them when a bunch come in at once. :)

This revision was automatically updated to reflect the committed changes.