Bug 398058 - Effect to slide notifications
Summary: Effect to slide notifications
Status: RESOLVED WORKSFORME
Alias: None
Product: kwin
Classification: Plasma
Component: effects-various (other bugs)
Version First Reported In: git master
Platform: Arch Linux Linux
: LO wishlist
Target Milestone: ---
Assignee: KWin default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-08-30 09:37 UTC by Vlad Zahorodnii
Modified: 2023-01-24 16:11 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed/Implemented In:
Sentry Crash Report:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Vlad Zahorodnii 2018-08-30 09:37:28 UTC
Currently, notifications are animated by a mix of the Fade and the Morphing Popups effects.

It would be great to have a dedicated effect that animates the appearing/disappearing(and also "re-stacking", when more recent notifications take place of more oldest ones) of notifications.

The dedicated effect has to slide notifications because
(a) slide animation is more noticeable;
(b) it looks fancy :-)
Comment 1 Vlad Zahorodnii 2018-08-30 09:40:04 UTC
CC'ing Nate as a member of VDG.
Comment 2 David Edmundson 2018-08-30 11:02:16 UTC
Note notifications are being rewritten for 5.something by Kai (kbroulik) now CCd

There's mockups at 
https://community.kde.org/Plasma/Notifications

Probably best to keep any work on kwin in sync to make sure changes are still relevant
Comment 3 Vlad Zahorodnii 2018-08-30 12:15:59 UTC
> There's mockups at 
> https://community.kde.org/Plasma/Notifications

https://community.kde.org/images.community/0/08/On-desktop_notif_grouping.jpg

Are grouped notifications have own windows? Or they all live under single notification window? Or that's still a mockup?
Comment 4 Kai Uwe Broulik 2018-08-30 12:41:10 UTC
A group will be a single window, at least that's what I have planned. Inside we could use ListView transitions to animate it. There's no proper code written for that yet, though
Comment 5 Vlad Zahorodnii 2018-08-30 13:41:01 UTC
Here's a list of potential animations:
* fade: notifications fade in and out when they are shown or hidden (like the Fade effect);
* glide: notifications glide in and out when they are shown or hidden (like the Glide effect). Also, maybe, they have to slide a little bit;
* scale: notifications scale in and out when they are shown or hidden (like the Scale effect);
* slide: notifications slide in and out when they are shown or hidden (like the Sliding Popups effect).

The first 3 animations(well, maybe, except the second one) don't need any coordination with the notifications applet.

The last one and the notification applet need some coordination. E.g. from what edge to slide notifications?

Also, currently, new notifications can overlap with the "re-stacked" ones. I don't know how to fix that because there could be several notification applets. Also, if it's guaranteed that there could be only one notification applet, the dedicated effect would need to know where notifications appear, in what order they appear, etc.
Comment 6 Vlad Zahorodnii 2018-08-30 13:48:43 UTC
s/coordination/cooperation/
Comment 7 Vlad Zahorodnii 2018-09-06 13:55:58 UTC
I implemented pretty dummy version of this effect:

https://www.youtube.com/watch?v=3jX-06mXkMg

Do you have any input?
Comment 8 Vlad Zahorodnii 2018-09-06 20:13:28 UTC
https://www.youtube.com/watch?v=B3Y45z0Eb2A

@Kai

Not sure whether that's a bug in KWin, but effects receive signals in the following order:

  windowAdded / Notification 0
  windowAdded / Notification 1
  windowAdded / Notification 2

  windowGeometryShapeChanged
  windowGeometryShapeChanged
  windowClosed / Notification 0

  windowGeometryShapeChanged
  windowGeometryShapeChanged
  windowClosed / Notification 1

  ...

  windowGeometryShapeChanged
  windowGeometryShapeChanged
  windowClosed / Notification 10

With this sequence of emitted signals, it's really hard to implement proper version of this effect (or any other that wants to correctly animate notifications).
Comment 9 Vlad Zahorodnii 2023-01-24 12:34:47 UTC
see https://github.com/zzag/kwin-effects-sliding-notifications
Comment 10 Nate Graham 2023-01-24 16:11:36 UTC
Any interest in upstreaming it? I think that effect is nicer than the default one.