Skip to content

Type PageManager's layout-changed signal - #134

Merged
JumpLink merged 1 commit into
mainfrom
fix/pagemanager-signal-types
Jun 30, 2026
Merged

Type PageManager's layout-changed signal#134
JumpLink merged 1 commit into
mainfrom
fix/pagemanager-signal-types

Conversation

@JumpLink

Copy link
Copy Markdown
Collaborator

Follow-up to #124, addressing the typing nit I flagged during review.

PageManager defines a layout-changed signal (appDisplay.js#L1254) that is connected internally (appDisplay.js#L1324), but its typings omitted it — so connect('layout-changed', …) fell back to the generic GObject.Object overload instead of a typed one.

This adds a SignalSignatures namespace plus typed connect/connect_after overloads, mirroring the pattern already used for BaseAppView, FolderIcon, AppIcon and AppFolderDialog in the same file. Since PageManager is a non-exported declare class, the namespace is kept module-local as well (TypeScript requires the merged declarations to be consistently exported or local).

The other nit from the review — _onScroll typed with Clutter.ScrollEvent — is a @girs generation quirk (only the Clutter.Event union variant carries the field types), so it's out of scope here.

Validated locally with the full CI sequence (build:types, prettier:check, validate:types, build:example, validate:example) — all green.

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 #124.
@JumpLink
JumpLink merged commit 3a8d200 into main Jun 30, 2026
2 checks passed
@JumpLink
JumpLink deleted the fix/pagemanager-signal-types branch June 30, 2026 22:09
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