[Notifications] Add quick reply feature

Authored by broulik on Dec 10 2019, 2:59 PM.



This adds a quick reply feature with a text field inline in the notification popup.
An action named reply will spawn the text field and a NotificationReplied signal is emitted then.
There's additional kde hints for changing the placeholder text (defaults to "Type a reply..."), submit button text (defaults to "Send") and submit button icon name (defaults to "document-send", that paper aeroplane icon).

Test Plan

Depends on D25832 for KWin
Doesn't work on Wayland because there notifications never ever ever get focus and I am sick and tired of running after KWin people to have this addressed.

Notification, just has a normal button - should we have some form of indication that it will spawn a quick reply here actually instead of e.g. bringing up the app or something?

Default placeholder and button

Custom placeholder and button

Button enabled after typing (can also hit Return/Enter so send)

Diff Detail

R120 Plasma Workspace
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Dec 10 2019, 2:59 PM
Restricted Application added a project: Plasma. · View Herald TranscriptDec 10 2019, 2:59 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
broulik requested review of this revision.Dec 10 2019, 2:59 PM
ngraham edited the test plan for this revision. (Show Details)Dec 10 2019, 3:19 PM
ngraham added a subscriber: ngraham.

Beautiful! Can we make it handle multi-line text input by becoming taller?

I'm not sure. TextArea is a lot more annoying to work with, and the replies typically are short. I think Android also only has single line.

All right, let's stay with a single line for now.

broulik added inline comments.Dec 19 2019, 2:33 PM

I'll change that to "inline-reply" to avoid potential clashes


Will rename to "inline-reply"

ngraham accepted this revision as: VDG.Fri, Dec 20, 5:56 PM

Love it.

davidedmundson accepted this revision.Mon, Dec 30, 4:20 PM
This revision is now accepted and ready to land.Mon, Dec 30, 4:20 PM
This revision was automatically updated to reflect the committed changes.