Skip to content

NotificationDaemon, messageTray: Add inline reply support for notifications - #13907

Open
Twilight0 wants to merge 1 commit into
linuxmint:masterfrom
Twilight0:feat/inline-reply-notifications
Open

NotificationDaemon, messageTray: Add inline reply support for notifications#13907
Twilight0 wants to merge 1 commit into
linuxmint:masterfrom
Twilight0:feat/inline-reply-notifications

Conversation

@Twilight0

Copy link
Copy Markdown

This commit adds native support for inline reply text input boxes inside Cinnamon desktop notifications (org.freedesktop.Notifications).

Key Enhancements:

  1. Notification Daemon Capabilities & Hints (js/ui/notificationDaemon.js):

    • Exposes 'inline-reply' and 'x-canonical-private-inline-reply' in GetCapabilities().
    • Parses inline reply hints ('x-canonical-private-inline-reply' and 'inline-reply') from incoming D-Bus Notify calls.
    • Registers and emits the NotificationReplied(uint32 id, string text) D-Bus signal when a user submits a reply.
    • Renders explicit 'Reply' action buttons on the banner, expanding the text input field on demand when clicked, while preserving all other action buttons (e.g. 'Like', 'Mark as Read').
  2. UI & Focus Management (js/ui/messageTray.js):

    • Renders an St.Entry input field and Send St.Button in NotificationBanner when an inline reply hint is present or when the Reply action button is clicked.
    • Acquires a modal keyboard grab via Main.pushModal() on entry focus/interaction so typing events are routed to Cinnamon's stage rather than underlying application windows.
    • Releases the modal keyboard grab (Main.popModal()) on reply submission or notification destruction.
    • Connects both Return key press (clutter_text activate) and Send button clicks to emit the reply text and dismiss the notification popup.

@github-actions

Copy link
Copy Markdown

Best-practices scanner

This is a regex-based check for API usage that can pose security, performance or
maintainability issues, or that may already be provided by Cinnamon. Most findings
are advisory and do not automatically disqualify a pull request.

This check is not perfect and will not replace a normal review.


Found 1 potential issue(s):

⚠️ WARNING

⚠️ lang_bind

js/ui/notificationDaemon.js:481

notification.connect('reply', Lang.bind(this,

Lang.bind() is deprecated. Use arrow functions (() => {}) or Function.prototype.bind() instead.


Automated pattern check.

…ations

This commit adds native support for inline reply text input boxes inside Cinnamon
desktop notifications (org.freedesktop.Notifications).

Key Enhancements:
1. Notification Daemon Capabilities & Hints (js/ui/notificationDaemon.js):
   - Exposes 'inline-reply' and 'x-canonical-private-inline-reply' in GetCapabilities().
   - Parses inline reply hints ('x-canonical-private-inline-reply' and 'inline-reply') from incoming D-Bus Notify calls.
   - Registers and emits the NotificationReplied(uint32 id, string text) D-Bus signal when a user submits a reply.
   - Renders explicit 'Reply' action buttons on the banner, expanding the text input field on demand when clicked, while preserving all other action buttons (e.g. 'Like', 'Mark as Read').

2. UI & Focus Management (js/ui/messageTray.js):
   - Renders an St.Entry input field and Send St.Button in NotificationBanner when an inline reply hint is present or when the Reply action button is clicked.
   - Acquires a modal keyboard grab via Main.pushModal() on entry focus/interaction so typing events are routed to Cinnamon's stage rather than underlying application windows.
   - Releases the modal keyboard grab (Main.popModal()) on reply submission or notification destruction.
   - Connects both Return key press (clutter_text activate) and Send button clicks to emit the reply text and dismiss the notification popup.
@Twilight0
Twilight0 force-pushed the feat/inline-reply-notifications branch from bcb4e74 to 69a97ae Compare July 28, 2026 22:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant