Review of "Adjust Display Brightness" version 28

Details Page Preview

Simple GNOME extension to control displays' brightness via DDC. It requires ddcutil to be installed, I2C permissions for non-root users configured.

Extension Homepage
https://gitlab.com/bruno.englert/gnome-extension-brightness

No comments.

Diff Against

Files

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

All Versions

Previous Reviews on this Version

JustPerfection rejected
1. Don't Create instance of objects in global scope (line 3 services/shell.js). 2. We have `setTimeout()` and `clearTimeout()` by default. no need for `services/timer.js`.
JustPerfection posted a review
`Extension.lookupByURL()` is a bad practice (line 31 ui/ScreenBrightnessPanelMenu.js). Use dependency injection in the entry point (extension.js), so you can get the extension instance in `ScreenBrightnessPanelMenu`. In extension.js: ```js screenBrightnessPanelMenu = new ScreenBrightnessPanelMenu(this); ``` In ui/ScreenBrightnessPanelMenu.js: ```js export default class ScreenBrightnessPanelMenu extends PanelMenu.Button { _init(extension) { this.extensionObject = extensionObject; ```
JustPerfection posted a review
`Extension.lookupByURL()` is a bad practice (line 31 ui/ScreenBrightnessPanelMenu.js). Use dependency injection in the entry point (extension.js), so you can get the extension instance in `ScreenBrightnessPanelMenu`. In extension.js: ```js screenBrightnessPanelMenu = new ScreenBrightnessPanelMenu(this); ``` In ui/ScreenBrightnessPanelMenu.js: ```js export default class ScreenBrightnessPanelMenu extends PanelMenu.Button { _init(extension) { this.extensionObject = extensionObject; ```
JustPerfection posted a review
* typo: ```js export default class ScreenBrightnessPanelMenu extends PanelMenu.Button { _init(extensionObject) { this.extensionObject = extensionObject; ```