Add Support for GNOME 48 #203
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
UnsupportedThe first problem, fixed in f8a9c23, was to migrate from
MessageListSection
toNotificationMessageGroup
, which is an expansion of the former.[Decision Pending] Problem 2 - Handling
MediaSection
andNotificationSection
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 typeNotificationMessageGroup[]
), including media messages (of typeMediaMessage
), basically ending all distinction. The only link here is._messageView._playerToMessage
, a map fromstring
s to correspondingMediaMessage
s. 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.