pop-os / shell

Pop!_OS Shell
GNU General Public License v3.0
4.85k stars 263 forks source link

refactor: GNOME 46 port #1704

Closed carlwgeorge closed 6 months ago

carlwgeorge commented 6 months ago

It looks like .add() and .add_actor() were removed in GNOME 46. Replacing these with .add_child() seems to work. With these changes I'm able to successfully install and use the extension on GNOME 46 RC.

https://github.com/oae/gnome-shell-pano/issues/259 https://gitlab.gnome.org/GNOME/gnome-shell/-/commit/350cd296fa90adb3d18f9b375b5531077cff825a

ghostdevv commented 6 months ago

gjs gnome 46 upgrade notes

Is this backwards compatible to gnome 45?

carlwgeorge commented 6 months ago

Yes, as far as I can tell. .add_child() is present in GNOME 45.

RealSuperRyn commented 6 months ago

These might have to be modified, but I "ported" (maybe only partially, idk tbh) an existing installation from the AUR package to gnome 46 by going in the extensions directory and using the following commands: (sudo is just because it is not in a directory i had write access to)

sudo sed -i 's/add_actor/add_child/g' context.js panel_settings.js search.js stack.js find . | sudo sed -ri -e 's/.add(/.add_child(/g' /.js

(This was also after applying all of the existing patches this pr has as of posting)

spladug commented 6 months ago

There's another add() call that needs to be updated on L186 of src/stack.ts. Stacking is broken without it.

Edit to add: and two more in src/search.ts: L344 and L367. Without these, the launcher shows no entries. Note that even with these fixes the launcher is visually a bit off; the items are now oddly centered.

fabifont commented 6 months ago

Hi, is this PR ready to be merged? I am currently testing it on my PC and it works without problems.

leviport commented 6 months ago

Hi, is this PR ready to be merged? I am currently testing it on my PC and it works without problems.

Not yet. The QA team needs to make sure no regressions are introduced in Pop 22.04.

jackpot51 commented 6 months ago

@leviport this won't work in Pop 22.04, which is why it is targeting the master_mantic branch. It should work on GNOME 45 and 46.

jackpot51 commented 6 months ago

@carlwgeorge do you want to address @spladug's comment before merging?

spladug commented 6 months ago

I can make a follow-up PR if that's easier for everyone.