Skip to content

Add Support for GNOME 48 #203

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

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from
Draft

Add Support for GNOME 48 #203

wants to merge 4 commits into from

Conversation

dcdeepesh
Copy link

@dcdeepesh dcdeepesh commented May 10, 2025

Aims to add support for GNOME 48, fixing #197, #171 and #176.

Currently stuck at a necessary design decision.

Guide to Changes

[Fixed] Problem 1 - MessageListSection Unsupported

The first problem, fixed in f8a9c23, was to migrate from MessageListSection to NotificationMessageGroup, which is an expansion of the former.

[Decision Pending] Problem 2 - Handling MediaSection and NotificationSection

Notification handling is changed significantly in GNOME 48. Earlier, the datemenu message list (Main.panel.statusArea.dateMenu._messageList) had different sections (visual elements) for currently playing media "notifications" (._mediaSection) and normal notifications (._notificationSection).

Now, it only has one "section" (._messageView) containing all notifications (._messageView.messages of type NotificationMessageGroup[]), including media messages (of type MediaMessage), basically ending all distinction. The only link here is ._messageView._playerToMessage, a map from strings to corresponding MediaMessages. Note that the new ._messageView._mediaSource and ._messageView._mediaSource._players are useless here because they don't contain or point to any visual elements, only information.

This reduces to two related problems: hiding sections in the datemenu, and moving notifications to the system tray.

Problem 2.1 - Hiding Sections

The extension currently allows hiding (1) notifications, (2) media notifications/section or (3) the whole left box. This was easy when there were two sections in the message list. With only one "section" left, (1) and (2) need some dexterity. 9a7bbf8 achieves (1) by using the method mentioned above (with issues). (2) is possible, but doesn't have any clean solution. One would have to go through the messages array and hide each individual visual notification element (ugh). Another option is to hide ._messageView altogether. This results in a completely empty left box, might as well just remove it as in (3).

Problem 2.2 - Moving Notifications to System Tray

Please let me know if I get something wrong in this section. Because the media widget in the system tray works using MPRIS independent from ._mediaSection, it is unaffected and works normally. The notification widget, however, used to simply move the notification section element from the datemenu to the system tray. That section no longer exists, making this method no longer possible. ._messageView also doesn't have the same interface as the earlier ._notificationSection. Finding the correct place to plug the signals being used correctly will need some digging. However, one possibility is to move the ._messageView instead, and hide the media messages, as 9a7bbf8 does, resulting in something similar to the current notification section.

Decision

The issue here is that when it comes to hiding sections, (2) above no longer has a clean solution, and I would suggest dropping it entirely, meaning users can't hide normal notifications while continuing to see the media notification (if anyone even uses this combination). The options for them would then be to (1) hide the media notification, (2) hide everything (all notifications), and possibly (3) hide the left box. The difference between (2) and (3) is the presence of an empty left box. That's my opinion. What would you suggest?

I haven't gotten around to problem 2.2 because I was testing hiding the media notifications in isolation but the extension was crashing as mentioned above "(with issues)". Going forward with anything needs this decision handled first.

@kevinleequinn
Copy link

I vote for dropping the distinction as you suggest.

_shouldShow() is unavailable. Maid takes care of the rest.
@dcdeepesh
Copy link
Author

At it's current state, (my fork of) the extension works fine on GNOME 48 as long as notifications are not hidden from the date menu (Layout > Date Menu > Hide Notifications is off) and they aren't shown in the system tray (Widgets > Notifications Widget is off).

This is how I use the extension so it's practically fixed for me. I may look into fixing notifications/rest of the extension for other users.

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.

2 participants