mzur / gnome-shell-wsmatrix

GNOME shell extension to arrange workspaces in a two-dimensional grid with workspace thumbnails
GNU General Public License v3.0
469 stars 60 forks source link

GNOME 45 support #263

Closed myyc closed 1 year ago

myyc commented 1 year ago

i've been trying to port this to gnome 45, the imports should be done, maybe some fixes here and there are required because of how the classes are declared.

however, the wall i've hit and i'm not sure how to sort out is the preferences bit, which uses a ui file and since i have no clue how to port that to the new ExtensionPreferences class i'm not sure how to fix. it seems like there are two options:

  1. keep using the ui file and integrating it into ExtensionPreferences
  2. subclassing ExtensionPreferences skipping the ui file altogether

how should we proceed?

mzur commented 1 year ago

Thanks a lot for going ahead with this! I planned to work on it but it may be a few days before I find the time.

I thought these UI files were future-proof and now they have something new again? If GNOME now uses ExtensionPreferences then I'd like to switch to that, too. As I said, I'll have a look in the next days but if you find out anything useful in the meantime, feel free to add more information here :slightly_smiling_face:

myyc commented 1 year ago

i think they might be future proof and maybe with some slight modifications to this example it can be integrated (there's still a _bind function with widgets etc) but to be honest this is my first work on something like this so i have no idea :)

mzur commented 1 year ago

I usually test the extensions in an Arch VM and GNOME 45 did not arrive there, yet. I had a try with GNOME OS in VirtualBox but this didn't work well. I'll wait for the Arch package to update.

myyc commented 1 year ago

i'm using arch with the fgcu packages. since they've been available i think arch takes more time to test the official ones.

esauvisky commented 1 year ago

This extension is the only single Gnome extension my workflow 100% depends on, so if you guys need an extra hand I'm willing to put some time and postergate current tasks to give this some priority, as updating to 45 isn't possible for me until this extension is properly functioning again.

As a side effect, most likely I would end up putting some effort at fixing #250 too, since that's the only remaining issue to making this extension flawless :wink:

mzur commented 1 year ago

I noticed that the Ubuntu 23.10 beta has GNOME Shell 45 so I'll use this for testing. I'll try to have a look this week.

@esauvisky Thanks for offering your help! Considering that I will look into GNOME 45 support but will probably not work on #250, your time may best be spent there. However, if you have anything to add to this PR, it's very welcome, too.

mzur commented 1 year ago

I poked around a little. It seems like there are several breaking changes in GNOME 45 that make this extension unable to work. These are associated with the Port to ESM merge request which updated several objects/properties that were previously public (as var) to const which are no longer exported. Instances that I could find:

I'm not 100% sure if these are all.

Most of these are required by the overview overrides of this extension. I got a basic version of this extension working (with incorrect animation) by disabling the overview override and WorkspaceAnimationController override.

So going forward we need to send a merge request to GNOME Shell which exports all the required properties again. We did something like this before, so I'm sceptical that a merge request gets any attention... As a start, I've asked.

In addition, I encountered the error Typelib file for namespace 'Gi' (any version) not found. I couldn't investigate this yet.

I didn't even get started with the extension preferences.

mzur commented 1 year ago

New todos:

vltr commented 1 year ago

Release a boiled-down beta version of the extension with minimal features (i.e. no overview modifications, maybe incorrect animations) that works without the missing exports

that would be great - even if just a zip file here on gh prior to the proper Gnome 45 support ... :smiley:

vltr commented 1 year ago

@mzur I was looking at your extension and the MR you sent to the GNOME Shell project. also, I tried to make a very simple change on another extension (remove alt+tab delay), which, as you can see here, kind of reflects the same issue you're having with your extension.

now, one thing caught my attention: another extension that can change this kind of value somehow, but I'm no expert on GNOME Shell extensions (even though I sniff around here and there). yet, I noticed that nothing references POPUP_DELAY_TIMEOUT, except that it's kind of a override of the same thing here.

maybe that's one way to go? even though I might think it could bring a lot of extra work (I hope I'm wrong ...)

cheers!

mzur commented 1 year ago

@vltr Thanks for your input! The other extension hard-codes the value here (the 150):

this._initialDelayTimeoutId = GLib.timeout_add(
    GLib.PRIORITY_DEFAULT,
    settings.get_boolean('remove-delay') ? 0 : 150,
    () => {
        this._showImmediately();
        that._timer = 0;
        return GLib.SOURCE_REMOVE;
    }
);

Depending on a settings value of the extension, the timeout can be disabled (set to 0), too.

In the case of Workspace Matrix, I see no way around exporting all the stuff again. The alternative would be to just copy all the code but that's not really maintainable.

Since I've already got a response from the GNOME Shell maintainers, I'm confident that all issues can be resolved and this extension will be available with all features in GNOME 45 eventually.

mzur commented 1 year ago

I've now released v9.0-beta with all features disabled that depend on the missing exports. Feel free to use this until the updated version of GNOME Shell 45 is available. I will release a proper version then. In the meantime you can show your support for the merge request with a :+1:

vltr commented 1 year ago

In the case of Workspace Matrix, I see no way around exporting all the stuff again. The alternative would be to just copy all the code but that's not really maintainable.

exactly! that's what the other author basically did - and that's why the value (150) is hard-coded ... I agree it's not actually maintainable, since you would have to keep code parity with the GNOME Shell source code.

Since I've already got a response from the GNOME Shell maintainers, I'm confident that all issues can be resolved and this extension will be available with all features in GNOME 45 eventually.

hopefully! I already gave my :+1: there, let's hope it gets merged soon :sweat_smile:

mzur commented 1 year ago

So the merge request was merged and the changes will probably land in GNOME Shell 45.1 as far as I can tell. However, this apparently was not part of GNOME 45.1 which was released today. Maybe it lands in GNOME 45.2 in December.

I'm looking into a version flag with conditional imports to disable the features that would break dynamically. Otherwise the official release of this extension has to wait until the release of the new GNOME Shell version.