Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update gnome 46 types #265

Merged
merged 30 commits into from
Apr 20, 2024
Merged

Update gnome 46 types #265

merged 30 commits into from
Apr 20, 2024

Conversation

Totto16
Copy link
Collaborator

@Totto16 Totto16 commented Mar 25, 2024

Update gnome 46 types

Description

Since Gnome 46 uses a new version of the Core Gnome dependencies (see here)

We need to update those to the new version, there should be no huge changes, but we should do it nevertheless, especially, since we have some type errors and mismatches already present, and we need to fix some of those, so also the @girs/gnome-shell should be updated to gnome 46 types. We use types from https://github.com/gjsify/types and https://github.com/gjsify/gnome-shell/ so we need to wait for these to be added there (or help there, what I also intend)

This adds:

The weird thing is, that it works on some Gnome 46 distros while it doesn't in others, that threw me off, since now I am testing with Ubuntu 24.04 (where add_child DOESN'T work), earlier I tested with GNOME OS Nightly (where add_child worked)

Resolution:
add_actor is deprecated since version 1.10 of Clutter (13 and 14 are used in gnome 45 / 46) , and add_child does work on most things correctly, but gnome-shell itself did use the depreacted API in some places for a long time too. So add_child on St.ScrollView does not work as intendend until gnome > 45.2. But not every Gnome 45 distro uses the latest gnome 45 version, so e.g. on Ubuntu 23.10 it doesn't work. So until gnome 46 add_actor does the correct thing on St.ScrollView but on Gnome 46 add_child doesn't work always. So what works on every Gnome 46 is set_child (since St.ScrollView only can have one child). This was used instead of add_child for Gnome 46.

The CI fails, since the used types are not yet released

Type of change

  • Bug fix (non-breaking change which fixes an issue)

Checklist

  • My code follows the style guidelines of this project
  • My commits follow the commit standards of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have checked my code and corrected any misspellings

@Totto16 Totto16 mentioned this pull request Mar 26, 2024
- for dependencies only minor and patch updates
- for devDependencies also some major updates
- fix the rollup config and tsconfig to use the new types
-  fix alle names of properties, that can be snake_case OR camelCase, but the types use camelCase all the time, so it had to be changed
-  fix the type of openExtensionPreferences, that only works with an Extension, and not every ExtensionBase
- remove unused method 'getMonitorConstraintForIndex'
…s are correct. we only want it to compile, if no errors / warnings are generated by rollup

- silence gjs external modules warnings
 - add compatibility runtime methods for some gnome-shell changes in 46 (namely in MessageTraySource, Notification)
…version

- remove "--failAfterWarnings" from rollup build step, since it generates too many warnings for unresolved dependencies (all of resource:///org/gnome/Shell/* which are 76 additional files)
@Totto16 Totto16 marked this pull request as ready for review April 17, 2024 01:49
…external dependencies are now declared using regex
- add link to the legacy branch
- remove deprecated dependencies for developing
- format unformatted files
- add scripts to work with prettier
@Totto16
Copy link
Collaborator Author

Totto16 commented Apr 17, 2024

@oae I added a simple CI, since after this, the types should be checked automatically at each PR, but it seems, that you have actions disabled, could you enable them? Thanks in advance ❤️

Edit: never mind, my error, sorry for the ping, it works now (it took some time, for GitHub to notice, but on my fork it was faster xD)

Edit 2: but on that note, could you check the box, that certain status checks need to pass (in the branch protection settings), and then select this check, it would be great
image

@oae
Copy link
Owner

oae commented Apr 17, 2024

I have changed the settings

@Totto16
Copy link
Collaborator Author

Totto16 commented Apr 20, 2024

This is now finished, I tested it on gnome 45 and gnome 46 with Ubuntu 24.04 beta, it wasn't tested on other gnome 46 environments, but it worked earlier, so it should work as of now too, since I only changed some things that work on all of gnome 46 (it was difficult enough, with some things, that didn't work earlier on all gnome 46 distros 😓)

@Totto16 Totto16 requested a review from oae April 20, 2024 13:33
@Totto16
Copy link
Collaborator Author

Totto16 commented Apr 20, 2024

@oae Regarding a review:
If you don't want to do a full review, It would also be fine, to just look at some core changes, or just read my description above and test this locally yourself (if anyone else reads this, you are welcome to test this too and give feedback (even if it's just, yes it works))

I did check my work carefully and also tested it carefully, but since this is your project I feel better, if you look at it, if you're fine with all the changes (no hurry tough)

@oae
Copy link
Owner

oae commented Apr 20, 2024

It looks good to me. You can merge it. <3. Thank you for the great work.

@Totto16 Totto16 merged commit 2c362dc into oae:master Apr 20, 2024
1 check passed
@Totto16 Totto16 deleted the update-gnome-46-types branch April 20, 2024 23:41
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