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

Not working with gnome-shell 3.32 #307

Closed
matclab opened this issue Mar 25, 2019 · 27 comments · Fixed by #312
Closed

Not working with gnome-shell 3.32 #307

matclab opened this issue Mar 25, 2019 · 27 comments · Fixed by #312

Comments

@matclab
Copy link

matclab commented Mar 25, 2019

This nice extension does not work anymore on gnome-shell 3.32.
logs say:

JS ERROR: TypeError: this.factsBox is undefined
                  _refresh@/home/matclab/.local/share/gnome-shell/extensions/contact@projecthamster.org/widgets/panelWidget.js:191:3
                  asyncCallback@resource:///org/gnome/gjs/modules/overrides/Gio.js:133:13
@ldoktor
Copy link
Contributor

ldoktor commented Mar 28, 2019

I'm using version with #299 and getting a different error:

bře 28 18:53:47 localhost.localdomain gnome-shell[14920]: JS ERROR: TypeError: this._construct is not a function
                                                           newClass@resource:///org/gnome/gjs/modules/_legacy.js:114:32
                                                           _init@/home/medic/.local/share/gnome-shell/extensions/contact@projecthamster.org/widgets/panelWidget.js:102:25
                                                           wrapper@resource:///org/gnome/gjs/modules/_legacy.js:82:22
                                                           deferred_enable@/home/medic/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:143:32
                                                           Controller/enable/<@/home/medic/.local/share/gnome-shell/extensions/contact@projecthamster.org/extension.js:132:21
                                                           _makeProxyWrapper/</<@resource:///org/gnome/gjs/modules/overrides/Gio.js:243:21

But also does not work. I depend on this plugin, but unfortunately don't know javascript enough to fix it. Would someone please take a look at this? I'm open to some form of donation...

@ldoktor
Copy link
Contributor

ldoktor commented Mar 29, 2019

Thank you, another source of information could be another extension I can't live without that had been already ported: paradoxxxzero/gnome-shell-system-monitor-applet#510

@aldomann
Copy link

aldomann commented Apr 1, 2019

@ernestask's branch works great on my system.

@wolffi
Copy link

wolffi commented May 3, 2019

Works great. Thanks a lot @ernestaks! A minor inconvenience, auto-completion does not seem to work in the "What are you doing" dialog.

@ernestask
Copy link

I’m pretty sure there should be something in the journal in that case. Otherwise, I am not really interested in further working on this.

mwilck added a commit to mwilck/hamster-shell-extension that referenced this issue May 9, 2019
This patch is required to make hamster-shell-extension work on
GNOME 3.32. At the same time, it breaks compatibility with older
gnome-shell versions that don't support ES6 class syntax.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
Fixes projecthamster#307

Heavily based on work by Ernestas Kulik <ekulik@redhat.com>
mwilck added a commit to mwilck/hamster-shell-extension that referenced this issue May 10, 2019
This patch is required to make hamster-shell-extension work on
GNOME 3.32. At the same time, it breaks compatibility with older
gnome-shell versions that don't support ES6 class syntax.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
Fixes projecthamster#307

Heavily based on work by Ernestas Kulik <ekulik@redhat.com>
@jimmytheneutrino
Copy link
Contributor

Guys, it's been 3 months and we have 2 functional PR versions available. This is, IMHO, the best time tracker for Gnome but it does feel that it is a bit under-loved right now (the latest commit to the main repo was more than one year ago).

Could somebody please look into this, @elbenfreund, @tstriker, @FredericGuilbault? Maybe guys from the main hamster repo could help, @ederag, @GeraldJansen ?

Maybe one of the PR authors @ernestask, @hedayat or @mwilck might want to become new maintainers?

@ernestask
Copy link

Maybe one of the PR authors @ernestask, @hedayat or @mwilck might want to become new maintainers?

Not particularly. Only looked into this because a distant colleague was having issues.

@mwilck
Copy link
Contributor

mwilck commented Jun 3, 2019

I have no ambition to become the maintainer of this extension. I'm currently maintaining hamster for openSUSE (I'm much more into Python than Javascript). For openSUSE, I decided to package the extension as RPM to compensate for it being missing on the GNOME extensions web site.

I guess in theory, anyone of us could submit an update to extensions.gnome.org. We should be aware that the 3.32 and 3.30 versions are strictly incompatible though; not sure how other extension writers handle that. 3.32 users are probably still the minority today. Does extensions.gnome.org handle the GNOME version dependencies automatically somehow, I mean, is it possible to submit the same extension multiple times, for multiple GNOME shell versions?

@aldomann
Copy link

aldomann commented Jun 3, 2019

@mwilck as far as I'm concerned (if the UI is any indication), the website does handle different versions of a same extension, as it in fact allows your to download different versions of a given extension (tagged by the version of GS it's compatible with).

I think the problem would be that it has to be the original developer the one who submits an updated version. A possible solution would be to just have it as a new extension instead.

@ederag
Copy link

ederag commented Jun 3, 2019

Maybe guys from the main hamster repo could help

Well, maintaining the main original hamster
is already eating too much of my time, so no thanks 😉
I'll just make sure that the dbus interface stays compatible.
Thanks to this dbus interface, this extension is well separated,
so it is perfect to have a distinct maintainer.

@hedayat
Copy link
Member

hedayat commented Jun 3, 2019

I'm also not someone who can be a real maintainer for this extension. However, if maintaining would mean accepting merge requests and trying to solve small bugs; it'd be possible (I was already thinking about creating a fork with such a goal for myself). But, I'm really not a Javascript guy, and certainly not a good maintainer for this project specially officially. And... there is no need to have a single maintainer. :P I'd be more than willing to help with maintaining this project as far as my time permits.

@FredericGuilbault
Copy link

I also think it's the best time tracker for linux But Im out of this project.

I have worked on a rewrite of hamster project in nodejs. https://gitlab.com/FredericGuilbault/gerboise But at this point it berly usable. So not much of a solution ATM.


IMO, at this point of abandon, whatever @hedayat do, it's better then nothing so +1

It been few years alerady but I remember there was some code shared between hamster-shell-extension and the cinamon version of this plugin. Then, cinnamon people asked to become maintainers of their projectHamster extention and integrated it in their big repo who contain all the cinnamon applets. That's a thing I recall.

@mwilck
Copy link
Contributor

mwilck commented Jun 4, 2019

Sounds good to me too. @hedayat, I'd be willing to help as time and abilities permit, but like you I'm also not a Javascript guy. I have personal interest to make sure the extension works. It's a shame that maintaining extensions is being made so difficult by the core developers.

@FredericGuilbault
Copy link

it is.

@aldomann
Copy link

aldomann commented Oct 5, 2019

@FredericGuilbault are you still working on Gerboise?

@GeraldJansen
Copy link

A simple, alternative gnome-shell extension could be constructed with https://github.com/p-e-w/argos and Hamster CLI commands. That would require less maintenance because Argos is well maintained for Gnome updates.

@matclab
Copy link
Author

matclab commented Oct 7, 2019

@GeraldJansen Good idea… I've done a very rough first implementation which depends on xsv and piep (I'll probably do a pure python implementation later) :

It proposes to choose an activy among one of the last 14 days. You may still add new activity with hamster CLI.

#!/bin/sh

LC_ALL=C hamster current \
   | piep "p if p == 'No activity' else p.split(',')[0].split()[2:]"
echo "---"
now=$(date +%Y-%m-%d)
last=$(date +%Y-%m-%d -d "14 days ago")
echo "Stop | terminal=false refresh=true bash='hamster stop'"
LC_ALL=C hamster export tsv "$last" "$now"  \
   | xsv select -d"\t" "activity,category,description,tags" | xsv sort \
   | tail -n+2 | uniq \
   | piep "p.splitcomma()|l=f'#{p[3]}' if p[3] else ''
	    | f'{p[0]}@{p[1]},{p[2]} {l}' | p.strip(', ')
	    | p + f' | terminal=false refresh=true bash=\'hamster start \"{p}\"\''"

@FredericGuilbault
Copy link

FredericGuilbault commented Oct 7, 2019

@aldomann Yes I do, Quite slowly, but im still on it. I had many trouble with nwjs + sqlite.
Gerboise is far from ready for production in term of functionality, code quality and stability. but That's what I use ATM.

It be more motivating if I had users/contributors/interested people.

@aldomann
Copy link

aldomann commented Oct 7, 2019

I've made a more polished version of @matclab's Argos script trying to replicate hamster-shell-extension's UX as much as possible.

#!/bin/sh

# Top bar status
LC_ALL=C hamster current \
	| piep "' | iconName=media-playback-start-symbolic' if p == 'No activity' else ' | iconName=media-playback-stop-symbolic'"
echo "---"

# Print current activity
echo "Current activity | size=10 | color=#919191"
LC_ALL=C hamster current \
	| piep "p if p == 'No activity' else p.split(',')[0].split()[2:]"
# Stop current activity
LC_ALL=C hamster current \
	| piep "'Stop Tracking | terminal=false refresh=true bash=\'hamster stop\'' if p != 'No activity' else ''"

# Get list of recent activities
now=$(date +%Y-%m-%d)
last=$(date +%Y-%m-%d -d "14 days ago")
echo "Recent activities | size=10 | color=#919191"
LC_ALL=C hamster export tsv "$last" "$now"  \
	| xsv select -d"\t" "activity,category,description,tags" | xsv sort \
	| tail -n+2 | uniq \
	| piep "p.splitcomma()|l=f'#{p[3]}' if p[3] else ''
		| f'{p[0]}@{p[1]},{p[2]} {l}' | p.strip(', ')
		| '--' + p + f' | terminal=false refresh=true bash=\'hamster start \"{p}\"\''"

# Additional GUI options
echo "---"
echo "Show Overview | terminal=false refresh=true bash='hamster overview'"
echo "Add Earlier Activity | terminal=false refresh=true bash='hamster add'"

image
image

Some points to keep in mind:

  • I'm using Hamster 2.2.2 (which allows to use the "Add Earlier Activity" button; I couldn't figure out the command on Hamster 1.X).
  • I'm using just using icons on the top bar (stop/play), as that's how I've always used the extension.

Missing features

  • Option to change the appearance on the top panel.
  • Adding a shortcut (not sure if Argos allows this).

@matclab
Copy link
Author

matclab commented Oct 7, 2019

And here is a pure python version expanding on @aldomann one: https://gist.github.com/matclab/3a36d46e16bee776d0739292bcacaa9b
I'll try to do a proper git repo…

@aldomann
Copy link

aldomann commented Oct 7, 2019

Didn't realise Argos supported Python. That's great, since bash can be a bit messy for some more complex stuff.

@mwilck
Copy link
Contributor

mwilck commented Oct 7, 2019

@matclab, nice work in incredibly little time!

Yet AFAICS it's still missing the features I need most about the extension - being able to type in a new activitiy (with autocompletion) and the "edit activity" buttons.

So for the time being, I hope the JS extension can be repaired once more.

@matclab
Copy link
Author

matclab commented Oct 8, 2019

@mwilck unfortunately Argos does not allow for easy user input. However, I've added a "+" icon in order to launch the hamster UI for adding new action with completion.
It only works well with hamster v2+, as hamster 1.04 does not quit once the window is closed, which gives a lot unused background process after some times.

The new version has its own repo: https://github.com/matclab/argos-hamster-plugin, which will allow to discuss it there and stop polluting this issue.

@matclab
Copy link
Author

matclab commented Oct 8, 2019

Closing in favor of issue #315

@matclab matclab closed this as completed Oct 8, 2019
@mwilck
Copy link
Contributor

mwilck commented Oct 22, 2019

See #315 for a fix for GNOME 3.34.

@DirkHoffmann
Copy link
Member

Solution for 3.32 (title of this issue!) is mentioned in #315 (comment) and #301.

mwilck added a commit to mwilck/hamster-shell-extension that referenced this issue Mar 3, 2020
This patch is required to make hamster-shell-extension work on
GNOME 3.32. At the same time, it breaks compatibility with older
gnome-shell versions that don't support ES6 class syntax.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
Fixes projecthamster#307

Heavily based on work by Ernestas Kulik <ekulik@redhat.com>
mwilck added a commit to mwilck/hamster-shell-extension that referenced this issue Mar 11, 2020
This patch is required to make hamster-shell-extension work on
GNOME 3.32. At the same time, it breaks compatibility with older
gnome-shell versions that don't support ES6 class syntax.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
Fixes projecthamster#307

Heavily based on work by Ernestas Kulik <ekulik@redhat.com>
mwilck added a commit to mwilck/hamster-shell-extension that referenced this issue Mar 14, 2020
This patch is heavily based on original work by
Ernestas Kulik <ekulik@redhat.com>.

This patch is required to make hamster-shell-extension work on
GNOME 3.32. At the same time, it breaks compatibility with older
gnome-shell versions that don't support ES6 class syntax.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
Fixes projecthamster#307
mwilck added a commit to mwilck/hamster-shell-extension that referenced this issue Apr 20, 2020
This patch is heavily based on original work by
Ernestas Kulik <ekulik@redhat.com>.

This patch is required to make hamster-shell-extension work on
GNOME 3.32. At the same time, it breaks compatibility with older
gnome-shell versions that don't support ES6 class syntax.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
Fixes projecthamster#307
mwilck added a commit to mwilck/hamster-shell-extension that referenced this issue Jun 19, 2023
This patch is heavily based on original work by
Ernestas Kulik <ekulik@redhat.com>.

This patch is required to make hamster-shell-extension work on
GNOME 3.32. At the same time, it breaks compatibility with older
gnome-shell versions that don't support ES6 class syntax.

See https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/361
Fixes projecthamster#307
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet