Review of "SimpleWeather" version 50.1.1 (9)

Details Page Preview

A highly configurable weather indicator. - Does not depend on GNOME Weather which eliminates location issues - Display temperature and conditions in top bar - Configure units (US, UK, Metric, Nordic, mix and match...) - Automatically configures units based on country - Use current location or add any number of locations and easily cycle through - Show hourly and weekly forecast - Configurable details like Rain Chance, Humidity, Wind Speed, UV, etc. - Location lookup with Nominatim or use latitude/longitude - Change provider between Open-Meteo or OpenWeatherMap* (* w/ API Key)

Extension Homepage
https://github.com/romanlefler/SimpleWeather

No comments.

Diff Against

Files

Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.

Shexli (experimental) warning 4

Shexli found 4 issues that may need reviewer attention.

EGO-L-002 warning

objects created by extension should be destroyed in disable()

Objects assigned in `enable()` are missing matching `.destroy()` calls in `disable()` or its helper methods.

Destroy all objects

  • welcome.js:93
    this.#abort = abort
  • welcome.js:94
    this.#okay = okay
  • welcome.js:161
    this.#okay = okay

EGO-L-005 warning

owned object references should be released in disable()

Owned references that are cleaned up in `disable()` should also be released with `null` or `undefined`.

Destroy all objects

  • extension.js:88
    this.#gsettings = this.getSettings()
  • extension.js:174
            this.#sunTimeIcon = new St.Icon({
                icon_name: "daytime-sunset-symbolic",
                style_class: "system-status-icon"
            })
  • extension.js:168
            this.#sunTimeLabel = new St.Label({
                text: "...",
                y_align: Clutter.ActorAlign.CENTER,
                y_expand: true,
                style: "padding-left: 8px;"
            })
  • welcome.js:93
    this.#abort = abort
  • welcome.js:94
    this.#okay = okay
  • welcome.js:161
    this.#okay = okay

EGO-L-003 warning

signals connected by extension should be disconnected in disable()

Signals assigned in `enable()` are missing matching disconnect calls in `disable()` or its helper methods.

Disconnect all signals

  • extension.js:192
            indic.menu.connect("open-state-changed", (_, isOpen) => {
                if (isOpen)
                    actor.add_style_class_name("swa-open");
                else
                    actor.remove_style_class_name("swa-open");
            })

EGO-L-004 warning

main loop sources should be removed in disable()

Main loop sources assigned in `enable()` are missing matching removals in `disable()` or its helper methods.

Remove main loop sources

  • extension.js:209
    this.#fetchLoopId = GLib.timeout_add_seconds(GLib.PRIORITY_DEFAULT, 15 * 60, this.#updateWeather.bind(this))
  • extension.js:78
    this.#waitLayoutId = id

All Versions

Version Status
50.1.1 (9) Active
50.1.0 (8) Rejected
50.0.0 (7) Active
49.2.0 (6) Active
49.1.0 (5) Active
49.0.0 (4) Active
48.2.0 (3) Active
48.1.0 (2) Active
48.0.0 (1) Active

Previous Reviews on this Version

Roman Lefler posted a review
I believe that the remaining Shexli messages are false-positives. The warnings in welcome.js pertain to instance field memebers that are children of the ModalDialog, and as far as I know there's no need to destroy those as long as the ModalDialog does not exist. The gsettings and suntime widgets are destroy() and set to undefined in disable. The indic.menu handler shouldn't need to be released to my knowledge if I call indic.destroy() and set it to undefined. The loop sources are disconnected in disable().
JustPerfection active
Approved but please remove version from import (line 18 `libsoup.js`). Also, those helper functions for timeouts in `utils.js` just making the review process harder. Just like shexli, we may miss the cleanup. And `delayFetchId()` doesn't tell the reviewer that is a timeout and returns source id. The better approach is to hold timeout ids in an array when `delayFetchId()` is called. Then create another helper function, for example, `removeAllTimeouts()`. Then, only call that function on disable.