LGiki / gnome-shell-extension-simple-system-monitor

🖥️ Show current CPU usage, memory usage and net speed on panel
https://extensions.gnome.org/extension/4506/simple-system-monitor/
GNU General Public License v2.0
48 stars 14 forks source link

Resolve the feedback received during the submission of v15 to GNOME extensions #21

Open LGiki opened 10 months ago

LGiki commented 10 months ago
  1. lookupByUUID() is a bad practice (line 323 extension.js). You can send this from the entry point to the class needing it when it's possible (dependency injection).

  2. Use export class instead of export var.

  3. Make it local to fillPreferencesWindow() (line 73 prefs.js).

  4. Don't store any instance in global scope since that cannot get garbage collected after window close (line 70 prefs.js).

  5. Don't use the same property name for the timeout ids (line 410 and 535 extension.js).

  6. Please use TextDecoder instead of byteArray (line 34 extension.js): https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder