All-in-one timer, stopwatch, pomodoro, alarms and todos
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
Version | Status |
---|---|
11 | Active |
10 | Active |
9 | Active |
8 | Active |
7 | Rejected |
6 | Active |
5 | Active |
4 | Active |
3 | Rejected |
2 | Rejected |
1 | Rejected |
I'm not sure where you saw the init var being redeclared? There is no init in renderer.js
Thanks! - Missed Line 189 applets/todo/tracker.js (#1 from previous review). - #2 from previous review hasn't been fixed here (line 591 utils/markup/renderer.js). As mentioned before, global scope is "the same as init". so you cannot create objects there. We don't want objects in global scope, because after disable, the variable won't get garbage collected.
The tracker is already handled. In the destroy() method it gets stopped which removes that callback.. I'm a bit baffled by your second point. What do you mean you can't have objects in global scope? Are you sure about that? Classes are objects too and they get defined at global scope. Also there are a bunch of other places where I define objects in global scope. Just look at the extension.js file. In fact this extension always defined objects in global scope. Did the previous reviewers not see it?
Missed that. The timeout is ok. But you still need to fix that global variable as we mentioned in the review guidelines: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#destroy-all-objects Creating an instance in global scope is different from defining class. btw, I missed line line 170 `utils/markup/parser.js`. It has the same issue.
Mate, I really don't mean to come across as rude and I thank you for helping out, but... Are you one of the gnome devs? It just seems nuts that const object vars cannot be declared in global scope. Why would the garbage collector care about that. Either you are wrong or the documentation is severely lacking. Here are some top extensions that define objects in global scope: - https://github.com/oae/gnome-shell-pano/blob/master/src/utils/clipboardManager.ts#L14 - https://github.com/micheleg/dash-to-dock/blob/master/docking.js#L57 Here are some official extension written by *gnome devs* that do the same: - https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/blob/main/extensions/window-list/extension.js#L19 - https://gitlab.gnome.org/GNOME/gnome-shell-extensions/-/blob/main/extensions/places-menu/extension.js#L81 What's going on here?
They can pass the review because they don't create a **new instance** of a class. Please read our review guidelines for creating new instances in global scope: https://gjs.guide/extensions/review-guidelines/review-guidelines.html#only-use-init-for-initialization