vkrizan / NotificationCounter

Gnome Extension: Shows number of notifications in queue
GNU General Public License v2.0
9 stars 3 forks source link

Conflict with notifications of "Clipboard History" extension #20

Open xalt7x opened 4 months ago

xalt7x commented 4 months ago

When "Notification Counter" is enabled, I don't receive transient notifications when I use hotkeys to switch clipboard items of Clipboard History (or Clipboard Indicator) extension.
P.S. I don't have this issue when I try to combine any of these clipboard extensions with Top Panel Notification Icons Revived.

vkrizan commented 4 months ago

Hello, this might be related to #15.

Do you have a reproducer and can you please write what is actually happening and what would you expect? Do you mean that the notification popup isn't displayed or that it is not counted as a notification by NotificationCounter?

Thank you.

xalt7x commented 4 months ago

Hello @vkrizan . Thank you for your quick response.

Do you mean that the notification popup isn't displayed or that it is not counted as a notification by NotificationCounter? Notification popup isn't displayed.

Do you have a reproducer and can you please write what is actually happening and what would you expect?

How to reproduce (on Fedora 38, 39 and 40):

  1. Temporally disable "Notification Counter"
  2. Install "Clipboard History"
  3. In the extension preferences add keyboard shortcut (e.g., z) for the "Previous Entry" action
  4. Copy some text (so it will be added as item of "Clipboard History") and try to use "Previous Entry" shortcut
  5. You should see transient notification with content of the clipboard entry.
  6. Enable "Notification Counter" and try again. This time there won't be notifications during entry switching, however switching should still works. Sadly for "Clipboard Indicator" extension "Notification Counter" breaks both notifications and entry switching.

notification_counter_issue_20.webm

this might be related to https://github.com/vkrizan/NotificationCounter/issues/15.

Well, I've tested and that change is unrelated. The issue is present on GNOME 45 (which uses version without that change) and even GNOME 44.

P.S. Interestingly, in GNOME 44 "Clipboard Indicator" (another extension) notifications actually work when "Notification Counter" is enabled.

xalt7x commented 4 months ago

Found the reason. Some time ago, I've proposed minor improvements for both Clipboard History (commit 7e22dc0) and Clipboard Indicator (commit 0229934).
Now, clipboard extensions show notifications only if "Do not Distrub" is disabled. They can confirm it by reading Main.panel.statusArea.dateMenu._indicator._settings.get_boolean('show-banners')

The irony is that I've pushed this change because at that time "Notification Counter" counted their transient notifications and they were never cleared in "Do not Disturb" mode :-D

vkrizan commented 4 months ago

I'm glad that you found the reason. :slightly_smiling_face: Let me know whether that resolves your issue.

Cheers.

xalt7x commented 4 months ago

Yes, I've tried reverting clipboard extension commits and it resolved the issue. However, I believe that some changes need to be made for this extensions (e.g., if possible, not replace but hide native "bell" indicator) as this way of checking the "Do not Distrub" mode status seems to be correct (I've found that GNOME developer suggested it back in the day).

vkrizan commented 4 months ago

About the DnD, someone have reported that via #19. The behavior or replacement of the bell icon was by design.

Personally, I got used to noticing notifications when the counter icon appears. With the bell icon shown, it would disrupt my workflow/habit. I'm open to have it configurable, but I'm not sure how easy or hard it would be to add preferences to the extension.

Florian's suggestion on the DnD value seems to use org.gnome.desktop.notifications settings and changed::show-banners event.

xalt7x commented 4 months ago

About the DnD, someone have reported that via #19. The behavior or replacement of the bell icon was by design.

I agree with that. Personally, I wouldn't want to have both notification counter and bell icon. Though, hidden counter and visible notification bell in DnD mode may help some users to avoid distraction and quickly see DnD status.
My idea is to somehow make this replacement less disruptive (so other extensions can read that boolean). Alternatively, clipboard extensions need to find some other way to check DnD value that is compatible with the "Notification Counter".


For both this and #19 issues, I like approach of the "Always Indicator" extension. I adds dot indicator (apparently something similar existed in vanilla GNOME but didn't work as expected and needed some replacement) in a different color. For DnD, original notification bell icon is used but it changes color when there are unread notifications.