WebCord icon indicating copy to clipboard operation
WebCord copied to clipboard

Make notifications clickable

Open rinnarii opened this issue 3 years ago • 6 comments

Is your feature request related to a problem? Please describe. When clicking the system notification, it only closes the notification.

Describe the solution you'd like It should go to the channel on which the notification came from.

Describe alternatives you've considered The official Discord app does this (at least on Linux)

Additional context I'm not sure if it's a limitation of being an Electron app but if possible please implement this feature.

rinnarii avatar Sep 10 '22 10:09 rinnarii

There's a View button instead that can be clicked on the notification. It should redirect you to the right channel, maybe even show/focus the window.

And WebCord does not really care about the notifications, it is Electron that shows them. I do not plan to change that, I think they works OK and View button can't really be removed or changed anyway...

SpacingBat3 avatar Sep 10 '22 13:09 SpacingBat3

The button doesn't show up on the notification in KDE Plasma.

rinnarii avatar Sep 11 '22 15:09 rinnarii

The button doesn't show up on the notification in KDE Plasma.

It works in XFCE just in case. Maybe it would be better to directly report that on Electron, the general libnotify implementation sucks on Linux. Or maybe it's KDE which does not follow the libnotify specs and does not show any buttons?

Anyway, I think notifications should behave exactly like in Chromium, correct me if I'm wrong.

The official Discord app does this (at least on Linux)

They're likely sending notifications from main process, but notifications in the renderer are handled a bit differently. But I think it is better to leave it as it is right now, I don't think button can be removed from the notification anyway.

Official Discord app also uses its own fork of Electron, which could work differently. WebCord uses upstream Electron, which might not be as polished as in Discord, but should use more recent Chromium / Node versions. However, you should be able to package WebCord with Discord's Electron on your own if you're familiar with Electron packaging enough.

SpacingBat3 avatar Sep 11 '22 15:09 SpacingBat3

There's a View button instead that can be clicked on the notification. It should redirect you to the right channel, maybe even show/focus the window.

My OS is Linux Mint XFCE, and, unfortunately, this is not the case. The "View" button does appear, although when clicked on, only closes the notification, it doesn't redirect me to the message, which is sad. What can you suggest?

bighugedev avatar Jul 04 '24 17:07 bighugedev

I've run some tests and found out the following. When a notification comes in, and you press the "View" button, it does navigate you to the message despite if WebCord is in the foreground or not. But the issue itself is that clicking "View" doesn't bring WebCord to the foreground and give it focus (regardless whether its window is opened or just sitting in the system tray).

bighugedev avatar Jul 04 '24 18:07 bighugedev

I've run some tests and found out the following. When a notification comes in, and you press the "View" button, it does navigate you to the message despite if WebCord is in the foreground or not. But the issue itself is that clicking "View" doesn't bring WebCord to the foreground and give it focus (regardless whether its window is opened or just sitting in the system tray).

I guess that makes it eligible to be re-opened and actually worked on… I wonder if there's now any API that allows to track every notification from main scripts in Electron (I don't want to overuse IPC)…

SpacingBat3 avatar Jul 13 '24 07:07 SpacingBat3