-
Notifications
You must be signed in to change notification settings - Fork 93
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
Support for GNOME 45 #362
Comments
@hedayat for information. |
Thanks for starting the work. I didn't know about that, but I'll most likely upgrade to latest Fedora Beta tomorrow, which comes with gnome 45. So, I'll try to help as much as I can (might not be much though, at least for a few days). |
Thanks a lot. Unfortunately, I've not yet started using Gnome 45, and cannot test the code till tomorrow. But I guess it's completely working till then 😅 |
The settings dialog works now, too. It's still necessary to logout and relogin to apply the settings, and one day we should fix that, but it's no different from the current behavior until GNOME 44 and earlier. I've created #363 in preparation of a GNOME 45 PR. Anyway, even if testing by you and hopefully other people is successful, we need to discuss how to proceed further. GNOME 45 support is exclusive and means that no prior GNOME shell version can be supported. Therefore I suppose the |
Re-pushed the branch to 6d31a9b, as I'd made a mistake rebasing it. |
Thanks a lot! :)
I suggest the other way around: create a branch for older versions (e.g. |
Well, just so that we have a now almost meaningless |
Right. I thought the original idea was to have If we follow your suggestion, I could actually create a PR against |
There are 2 problems: current Notifying all members of @projecthamster/gnome-shell-extension here for follow-up discussion. Footnotes
|
Well, maybe its time to create a |
I've tried a few times over the past few years to send @elbenfreund e-mail asking for some changes or transferring some rights, but have not received any reply to those. I wonder if it might be worth considering migrating to a new and separate organization to work around such limitations, but that's probably something to discuss elsewhere (maybe organisation-wide, though organisations do not seem to have (public) discussion options). |
This is always a huge problem, not to mention that the extension doesn't even have a proper official package on Gnome. I've followed the conversation and all the issues over the years and I could totally get behind a reboot, mainly in terms of governance and distribution. I think renaming the project[1] would help to free up various namespaces in the distribution chain. [1] for instance to a similar animal that likes running around in wheels, example: "chinchilla" |
I thought the same.
This project doesn't have GitHub discussions, because @elbenfreund would need to enable it, and we're back at square one.1 I guess we agree that if we move to a different organization, we should move the entire project (at least the currently active repos, i.e. "hamster" and "hamster-shell-extension"). About changing the name: I'm unsure if that's a good idea. People will be looking for "hamster", both on e.g.o and elsewhere. AFAICS, nobody owns the name "hamster", and if anyone did, it would probably be @tstriker. IMO we could simply fork the active repos and keep using the name "hamster", as long as we keep true to the spirit of the project (which I think we have done so far). Footnotes
|
the name 'hamster' ('project hamster', specifically) is not copyrighted and nobody owns it so please keep using it if you want - the name was a reference to the hamster wheel and is a tongue-in-cheek reference to 9-to-5 work. if elbenfreund has gone missing, you might want to reach out to github support - they might allow transferring the project ownership to a new team. until then you can also just abandon 'master' as github deprecated those in favor to 'main' a while ago anyway. alternatively, of course, you could make a fork org and leave a message somewhere pointing to it but that might be messier. Note: i unfortunately don't have extra cycles so i won't be monitoring this nor any other conversations relating to project hamster; i've now set up an auto-filter to keep these out of my inbox. Good luck! |
Thanks a lot, Tom! Wrt reaching out to github support, I see that as a last resort. Even if @elbenfreund has turned silent, his contributions are massive and still very valuable, and I wouldn't want to be rude to him. I'd strongly appreciate if he voluntarily assigned someone else (one or more of the currently active people) a maintainer role in this repository though. If he can't or doesn't want to do that, I'd rather move to a fork. That's my personal PoV. |
To prevent further digressing this issue, I've created projecthamster/hamster#730 for further discussion about regaining access to the repositories and organization. I suggest moving this issue back to supporting gnome 45, and what branches to use (within the current limitations we have wrt repo access). |
Thanks, @matthijskooijman. I suppose the general discussion about the future of the project will take some more time. Meanwhile, once @hedayat has ultimately approved #363, I will create a PR for merging into master (as we'll certainly won't be able to force-push to master, this will require some manual, local merging on my part). Then we'll see if we can merge into master at all. If not, we can still try to create a "main" branch, but we won't be able to change the fact that "develop" is currently the default branch. |
I pushed another commit to the 362-support-for-gnome-45 branch, fixing an issue that occured when disabling the extension. |
Well, I finally got to test this, but I need to see if I can fix hamster python 3.12 compatibility first... |
OK, I'm finally able to use the extension under Gnome 45, and so far so good :) At least all functionality I used before are working fine. Thanks! |
Well, there is one thing. When I select "Add earlier activity", it opens the dialog with the current time selected as the start time, which is an inconvenience sine you almost always want to change it. It's better to remain like previous version: with no start time so that we can write the desired number right away (for me, usually start with time diff; e.g. -120) |
Oops, sorry if I wasn't clear enough. I mean, does the latest code, which works on 46, also work on 45 correctly if 45 is added to metadata.json? The new code might not be compatible with gnome shell 45. |
My bad, I overlooked the fact that you put 46 instead of 45 rather than just adding it. I'll push an update pretending to support both. |
I just pushed this to the "develop" branch to fix my previous mistake. Please test under GNOME 45. If any issues appear, we'll need to branch once more. |
Thanks! Hope it works in 45 too. |
I'm still on 45, so I tested develop (I was previously running the branch from #364 without problems). Seems to mostly work, but the list of todays activities is displayed empty in the popup: In the journal I get these when I open the popup, which I think are related:
I looked around the mutter 45.0 source code a bit and it seems like I might see if I can pinpoint what line in the 46-fix breaks this, but I probably won't have time now to get to the bottom of this... |
Too bad... @hedayat, to my understanding the replacement of |
Yes, I actually tried to run the extension, received errors and tried to fix errors. I don't think any of the changes can be reverted. But, replacing |
It seems to be correct to me, assuming that I've found the right C code here: https://gitlab.gnome.org/GNOME/mutter/-/blob/45.5/clutter/clutter/clutter-container.c?ref_type=tags#L301
If I apply this patch, it works again on gnome 45: --- a/extension/widgets/todaysFactsWidget.js
+++ b/extension/widgets/todaysFactsWidget.js
@@ -48,7 +48,7 @@ class TodaysFactsWidget extends St.ScrollView {
reactive: true
});
this.factsBox.add_child(this.facts_widget);
- this.add_child(this.factsBox);
+ this.add_actor(this.factsBox);
} Look at the code for gnome 45.2 (which I am running), it seems that One thing that is different, is that |
I tried simplifying things (e.g. removing all facts and just putting a label there) and making the BoxLayout more similar to the one in factsBox.js, but even then I could not make it work with --- a/extension/widgets/todaysFactsWidget.js
+++ b/extension/widgets/todaysFactsWidget.js
@@ -40,16 +40,12 @@ class TodaysFactsWidget extends St.ScrollView {
this._panelWidget = panelWidget;
- this.factsBox = new St.BoxLayout({});
+ this.factsBox = new St.BoxLayout({style_class: 'hamster_box'});
this.factsBox.set_vertical(true);
- this.facts_widget = new St.Widget({
- style_class: 'hamster-activities',
- layout_manager: new Clutter.GridLayout(),
- reactive: true
- });
- this.factsBox.add_child(this.facts_widget);
- this.add_child(this.factsBox);
-
+ let fact_list_label = new St.Label({style_class: 'hamster-box-label'});
+ fact_list_label.set_text(_("XXX"));
+ this.factsBox.add_child(fact_list_label);
+ this.actor.add_child(this.factsBox);
}
/**
@@ -187,8 +183,8 @@ class TodaysFactsWidget extends St.ScrollView {
* Clear the widget and populate it anew.
*/
refresh(facts, ongoingFact) {
- this.facts_widget.remove_all_children();
- this.populateFactsWidget(facts, ongoingFact);
+ //this.facts_widget.remove_all_children();
+ //this.populateFactsWidget(facts, ongoingFact);
}
}); |
Hm, my last diff above was not so useful: If I try that with |
@matthijskooijman , can you try this? diff --git a/extension/widgets/todaysFactsWidget.js b/extension/widgets/todaysFactsWidget.js
index 1734cde..85f1653 100644
--- a/extension/widgets/todaysFactsWidget.js
+++ b/extension/widgets/todaysFactsWidget.js
@@ -47,7 +47,7 @@ class TodaysFactsWidget extends St.ScrollView {
layout_manager: new Clutter.GridLayout(),
reactive: true
});
- this.factsBox.add_child(this.facts_widget);
+ this.factsBox.actor.add_child(this.facts_widget);
this.add_child(this.factsBox);
} |
I can try, but I'm not very hopeful. I tried
So I suspect that using |
Tried it, did not help unfortunately (ongoing facts box still empty). And also a deprecation working:
|
It works under GNOME 45 with this admittedly clumsy workaround: diff --git a/extension/widgets/todaysFactsWidget.js b/extension/widgets/todaysFactsWidget.js
index 1734cde..29b9bbd 100644
--- a/extension/widgets/todaysFactsWidget.js
+++ b/extension/widgets/todaysFactsWidget.js
@@ -28,6 +28,7 @@ import GObject from 'gi://GObject';
import { gettext as _ } from 'resource:///org/gnome/shell/extensions/extension.js';
import * as Stuff from '../stuff.js';
+import * as Config from 'resource:///org/gnome/shell/misc/config.js';
/**
* A widget that lists all facts for *today*.
@@ -48,7 +49,10 @@ class TodaysFactsWidget extends St.ScrollView {
reactive: true
});
this.factsBox.add_child(this.facts_widget);
- this.add_child(this.factsBox);
+ if (Config.PACKAGE_VERSION.substring(0, 2) == "45")
+ this.add_actor(this.factsBox);
+ else
+ this.add_child(this.factsBox);
}
I'll test this under 46 too, and push this until we find a more elegant solution. |
I do not think this warrants investing more time, clumsy workaround seems fine to me (maybe with add a link to this comment thread). I've applied your patch, seems to work as expected now. |
It might actually be a bug in GNOME shell. I think I'll open an issue there. |
OTOH, they probably won't care. If they did, they wouldn't be doing this kind of thing to extension maintainers all the time. |
Yeah, I would not bother, especially if the issue is not present in 46, then it might be a bug that they already fixed. |
There is a simpler solution. We can just continue using |
Using St.ScrollView.add_child() instead of St.ScrollView.add_actor() leads to broken layout in the ScrollView widget (zero vertical extension of rows). See #362 (comment) and follow-up comments. But unlike other St Widgets, ScrollView still supports the add_actor() method in GNOME 46. So keep using it.
I've pushed a trivial one-line revert to |
Heh, and I thought having to log out and in was a lot of work to test this every time ;-p (btw, the nested gnome-shell trick documented in the README for quick testing without relogging seems to have broken at some point - gnome-shell starts up but cannot find hamster, which I guess makes sense since the nested instance has its own dbus bus...). Anyway, I'm now running develop, seems to work as expected. |
I've created https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/issues/502 to make the GNOME devs aware of this. |
snapshot rollback is neccessary to go back from GNOME 46 to 45. Otherwise I just type Alt-F2 and "r" (yes, still on X11). |
Lesson learned: I waited 1/2y before pushing the GNOME 45 update (which was large) to |
I've been told I should have opened the GNOME issue against gjs-guide. Here it is: https://gitlab.gnome.org/ewlsh/gjs-guide/-/issues/91 |
Interesting... it still works for me. 🤔 |
Well, Gnome 46 compatibility is broken now: #368 (comment)
|
We need to add support for GNOME 45.
I've pushed pushing my code with GNOME 45 support to the 362-support-for-gnome-45 branch branch in this repository.
The branch seems to work. I'm using it right now. Please test and please post any issues here.
The text was updated successfully, but these errors were encountered: