eonpatapon / gnome-shell-extension-caffeine

Disable screensaver and auto suspend

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

GNOME 45 Support

stuarthayhurst opened this issue · comments

This one is going to be a bit of a pain, as so much has been changed.

Required changes:

  • Import handling, the shell uses ESM now
  • Translation init, the shell handles most of this automatically now
  • ExtensionUtils and Me are gone, their jobs have been split up
  • Extension class changes, the extension must now export a default class with specific methods
    • The base class provides access to some features from the old ExtensionUtils
  • Preferences imports are different from extension imports
  • The _backgroundApps object is created asynchronously now
    • Currently, we don't have a robust way to wait and detect it's been created, at least not a stable one
    • They're working on this upstream, I'll update this when something changes
  • libadwaita 1.4
    • This one isn't a mandatory change, but the UI could potentially be improved / code simplified with the new preferences switch row
  • Drop compiled schemas, this is from GNOME 44, but since we'll be targeting GNOME 45+, we can't manually include compiled schemas anymore
    • The builder tool does this automatically, but will stop eventually. As long as we don't manually include them, it won't be rejected at the review stage in future

Due to the ESM import changes, an extension can't reasonably support GNOME 44 and earlier, at the same time as GNOME 45. This means we'll have to drop support for GNOME 43 and GNOME 44, so some code paths (like the title / label and subtitle code) can be simplified.

Is it worth creating a final release for 43 / 44, after the pending PRs are merged?

I'm happy to work on this, as I've already ported one of my own extensions, and started work on the second. If someone else does want to pick up this work though, feel free, as I also have to port wireless-hid, after I've ported my 2.

GNOME 45 port guide for reference: https://gjs.guide/extensions/upgrading/gnome-shell-45.html#esm

It look like there is some work to do for Gnome 45 :-). I'm happy to start work on it if you like as you already have to port your own extensions, but if you want to do it I'm also please.

Is it worth creating a final release for 43 / 44, after the pending PRs are merged?

I think so. Then, I suppose we can still fix bugs and update translations for this branch.

I've ported my 2 extensions, except the new InjectionManger and the ._backgroundApps problem, but both of those are waiting on documentation.

I'll start Caffeine next, as wireless-hid is very difficult to test in a VM, where there aren't any real upower devices. When I've got something that runs, I'll submit a draft.

It's surprisingly methodical to port GNOME 44 -> GNOME 45, nothing was particularly broken after the initial porting. #292 covers this, everything but the background apps fix is done.

@stuarthayhurst not sure how it works for you with v52, I get this.menu.insertItemBefore is not a function on Gnome 45
image

Are you on GNOME 45 stable, or a pre release?

Can you post your distro too please.

I am on stable 45.0, Archlinux.
Arch switched to Gnome 45 in the last 24 hours or so, I just updated. Expect more reports to come in soon. 😃

That's strange, it's been working fine since the first release candidate on GNOME OS Nightly, Fedora Rawhide and Debian Experimental...

I can't see any patches being applied to Arch's build that would interfere, do you still have this if you reboot?

If the issue persists after that, please open another issue.

It could be a conflict with another extension, and it's probably this line in the shell: https://gitlab.gnome.org/GNOME/gnome-shell/-/blob/main/js/ui/panel.js?ref_type=heads#L614

However, a backtrace from the issue would be very helpful for fixing it.