Skip to content

feat: notify from a Control Kill source and test on GNOME Shell 46 to 51 - #7

Open
lucaswotta wants to merge 2 commits into
mainfrom
feat/notification-source
Open

lucaswotta wants to merge 2 commits into
mainfrom
feat/notification-source

Conversation

@lucaswotta

Copy link
Copy Markdown
Owner

Part of #1. Part of #3.

Problem: notifications went through Main.notify, so the shell showed them under its generic "System" source with no icon. CI ran no test against the shell.

Change:

  • extension.js creates a MessageTray.Source titled "Control Kill" with icons/control-kill-symbolic.svg and sends notifications through it; disable() destroys it. The Source pattern is identical in 46 to 51 upstream.
  • tests/container.sh installs what a bare Ubuntu or Fedora image lacks and runs make test-shell. A new shell CI job runs it on ubuntu:24.04 (46) and fedora:41 to fedora:rawhide (47 to 51).
  • tests/shell.js checks the source title, the icon and that the source is gone after disable. It now waits for the extension to leave the active state, because shell 51 disables extensions asynchronously.

Tested: make check passes; tests/container.sh passes in all six images locally (46.0, 47.10, 48.8, 49.10, 50.6, 51.1); the four new checks fail on the previous code. The shell job itself has not run on GitHub yet; actions/checkout in images without git is the part not verified locally.

No version bump and no change for extensions.gnome.org.

Main.notify() files notifications under the shell's generic System source. The extension now creates its own MessageTray.Source, titled Control Kill and carrying a symbolic icon shipped in the package, adds it to the message tray when first needed and destroys it in disable().

The constructor and the calls were read in js/ui/messageTray.js and main.js of GNOME Shell 46.0, 47.0, 48.0, 49.0, 50.0 and 51.0: getSystemSource() builds its source the same way in all of them (Source with title and icon, destroy handler, Main.messageTray.add) and Notification takes an object with source, title, body and isTransient.

tests/shell.js now checks the source title, its icon and that disable() removes it; with the previous code those four checks fail. Refs #1.
One container per release (ubuntu:24.04, fedora:41 to rawhide) runs
tests/container.sh. Shell 51 disables extensions asynchronously, so the
disable checks now wait for the extension to leave the active state.

Part of #3
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.

1 participant