Review of "Device Power Indicator" version 1

Details Page Preview

Shows device power percentage for keyboards and mice

Extension Homepage
https://github.com/ranger-ross/gnome-device-power-indicator

No comments.

FAQ

Files

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

All Versions

Version Status
2 Active
1 Rejected

Previous Reviews on this Version

JustPerfection rejected
1. Please remove unnecessary files: - stylesheet.css - .gitignore - Makefile - src/types.js https://gjs.guide/extensions/review-guidelines/review-guidelines.html#don-t-include-unnecessary-files 2. You cannot create objects in global scope (line 21 extension.js): https://gjs.guide/extensions/review-guidelines/review-guidelines.html#only-use-init-for-initialization Also null out that in disable. 3. Log should be only available in debug mode (line 3 src/logger.js) 4. Sync spawn can freeze GNOME Shell (line 107 src/device.js). While it's ok for now (since you are only doing fast commands) it's better to make it async: https://gjs.guide/guides/gio/subprocesses.html#complete-examples If you need any help with your extension you can ask us on: - [GNOME Matrix Channel](https://matrix.to/#/#extensions:gnome.org) - IRC Bridge: irc://irc.gimpnet.org/shell-extensions
ranger-ross waiting for author
Thanks for the quick review and good feedback. I'll make these changes and re-submit. I have a quick question regarding your comment in #3. I'm not sure if I understand the request completely? I'm assuming that you mean that GJS has a "DEBUG" logging mode. And it should only log if the DEBUG mode is enabled. If that is correct, would you be able to direct me to some docs/examples of the proper way to check if this mode is enable? thanks again
JustPerfection posted a review
```js const DEBUG = false; var logWithLevel = (level, msg) => { if (!DEBUG) { return; } log(`${new Date().toISOString()} ${LOG_PREFIX} ${level} ${msg}`); } ``` So, `DEBUG` can be `true` in development process but in the packages you send here.
JustPerfection posted a review
* but NOT in the packages you send here. Sorry missed the `NOT`.
ranger-ross posted a review
ranger-ross posted a review
Thanks, I uploaded a v2 with the changes.
ranger-ross posted a review
Thanks, I uploaded a v2 with the changes.
JustPerfection rejected
Newer version approved.