Skip to content

Updated appDisplay types - #124

Merged
JumpLink merged 1 commit into
gjsify:mainfrom
AmionSky:app-display
Jun 29, 2026
Merged

Updated appDisplay types#124
JumpLink merged 1 commit into
gjsify:mainfrom
AmionSky:app-display

Conversation

@AmionSky

@AmionSky AmionSky commented Jun 28, 2026

Copy link
Copy Markdown
Contributor

This was a lot with a lot of similar looking classes and functions that have slightly different types. I checked it again but it is possible that I mixed something up.

Also the _onScroll method is using Clutter.ScrollEvent which is technically correct but it does not really have any type info. Only its union variant Clutter.Event has. It is probably a generation bug or something.

((also in the original js file, the line at https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/appDisplay.js#L641 is unused, just a leftover that did not get cleaned up. In case someone wants to notify or submit a PR to Gnome Shell))

@JumpLink JumpLink left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed against gnome-shell 50.0. This all checks out:

  • All class @see line references line up with js/ui/appDisplay.js.
  • The signal definitions match the upstream Signals blocks with the right param types: view-loaded (BaseAppView), apps-changed (FolderIcon), open-state-changed / menu-state-changed / sync-tooltip typed with the boolean payload.
  • The removed methods are genuinely gone in 50.0: shellWorkspaceLaunch, cancelActions, _removeMenuTimeout, _setPopupTimeout, updateDragFocus, and the public onDragBegin / updateRunningStyle (the latter is now the private _updateRunningStyle).
  • The getter/signature changes all match: get id / get name on AppViewItem (with app correctly moved to AppIcon as Shell.App), getDragActorSource(): St.Icon (return this.icon.icon), popupMenu() without side (now the popupMenuSide ctor prop), createFolder(apps: string[]).

Nicely done. Two minor, non-blocking nits:

  1. PageManager defines a layout-changed signal that is consumed internally (appDisplay.js:1324) but isn't reflected in its typings, so connect('layout-changed', …) falls back to the generic GObject overload. Since PageManager is a non-exported declare class, this is just a precision nit.
  2. Re your note on _onScroll using Clutter.ScrollEvent: that's a @girs generation quirk (the union variant carries the type info), not something to fix in this PR.

Approving.

@JumpLink
JumpLink merged commit e9a4e4c into gjsify:main Jun 29, 2026
1 check passed
Rayzeq pushed a commit to Rayzeq/gnome-shell that referenced this pull request Jul 22, 2026
PageManager defines a 'layout-changed' signal (appDisplay.js:1254)
that is connected internally (appDisplay.js:1324), but the typings
omitted it, so connect('layout-changed', ...) fell back to the
generic GObject.Object overload.

Add a SignalSignatures namespace plus typed connect/connect_after
overloads, mirroring the pattern used for the other classes in this
file. PageManager stays module-local (not exported), so the namespace
is local as well.

Follow-up to gjsify#124.
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