Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conflict with notifications of "Clipboard History" extension #20

Open
xalt7x opened this issue May 22, 2024 · 7 comments
Open

Conflict with notifications of "Clipboard History" extension #20

xalt7x opened this issue May 22, 2024 · 7 comments

Comments

@xalt7x
Copy link

xalt7x commented May 22, 2024

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
Copy link
Owner

vkrizan commented May 22, 2024

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
Copy link
Author

xalt7x commented May 22, 2024

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 #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
Copy link
Author

xalt7x commented May 22, 2024

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
Copy link
Owner

vkrizan commented May 23, 2024

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

Cheers.

@xalt7x
Copy link
Author

xalt7x commented May 23, 2024

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
Copy link
Owner

vkrizan commented May 23, 2024

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
Copy link
Author

xalt7x commented May 23, 2024

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.

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

No branches or pull requests

2 participants