Review of "Keychron K5 Pro Controls" version 3

Details Page Preview

Panel controls, battery status, lighting profiles and wired VIA RGB controls for the Keychron K5 Pro.

Extension Homepage
https://github.com/Royza/Keychron-K5-Pro-Gnome-Ext

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-A-004 warning

extension files should not contain excessive ungated console logging

File contains 7 ungated console.log/warn/error calls (threshold: 5).

No excessive logging

  • controller.js:3206
    console.error(`${APPLICATION_NAME}: ${error.message}`)
  • controller.js:3549
    console.error(`${APPLICATION_NAME}: profile capture failed: ${error.message}`)
  • controller.js:3635
                    console.error(
                        `${APPLICATION_NAME}: active profile persistence failed: ${error.message}`
                    )
  • controller.js:3660
    console.error(`${APPLICATION_NAME}: profile apply failed: ${error.message}`)
  • controller.js:3799
    console.error(`${APPLICATION_NAME}: brightness key setup failed: ${error.message}`)
  • controller.js:3827
    console.error(`${APPLICATION_NAME}: failed to release ${name}: ${error.message}`)
  • controller.js:3842
    console.error(`${APPLICATION_NAME}: failed to restore ${key}: ${error.message}`)

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

  • controller.js:540
    this._backlightSwitch = backlightSwitch
  • controller.js:927
    this._configurationSection = section
  • controller.js:398
    this._gamingLockSwitch = gamingLockSwitch
  • controller.js:730
    this._mixRgbSection = section
  • controller.js:386
    this._muteSwitch = muteSwitch
  • controller.js:664
    this._perKeySection = section
  • controller.js:1563
    this._colorPicker = new ColorPickerBox(initialHex)
  • controller.js:1564
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })
  • controller.js:1663
            this._entry = new St.Entry({
                text: currentBrightness.toString(),
                can_focus: true,
                x_expand: true,
                hint_text: `0–${RGB_BRIGHTNESS_MAX}`,
            })
  • controller.js:1669
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })
  • controller.js:1806
    this._colorPicker = new ColorPickerBox(this._initialHex, true)
  • controller.js:1788
            this._durationEntry = new St.Entry({
                text: Number((entry.duration / 1000).toFixed(3)).toString(),
                can_focus: true,
                x_expand: true,
                hint_text: '1–99',
            })
  • controller.js:1810
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })
  • controller.js:1774
            this._speedEntry = new St.Entry({
                text: entry.speed.toString(),
                can_focus: true,
                x_expand: true,
                hint_text: '0–255',
            })
  • controller.js:2002
            this._entry = new St.Entry({
                text: currentName,
                can_focus: true,
                x_expand: true,
                hint_text: 'Profile name',
            })
  • controller.js:2008
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })

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

  • controller.js:927
    this._configurationSection = section
  • controller.js:730
    this._mixRgbSection = section
  • controller.js:664
    this._perKeySection = section
  • controller.js:1563
    this._colorPicker = new ColorPickerBox(initialHex)
  • controller.js:1564
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })
  • controller.js:1663
            this._entry = new St.Entry({
                text: currentBrightness.toString(),
                can_focus: true,
                x_expand: true,
                hint_text: `0–${RGB_BRIGHTNESS_MAX}`,
            })
  • controller.js:1669
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })
  • controller.js:1806
    this._colorPicker = new ColorPickerBox(this._initialHex, true)
  • controller.js:1788
            this._durationEntry = new St.Entry({
                text: Number((entry.duration / 1000).toFixed(3)).toString(),
                can_focus: true,
                x_expand: true,
                hint_text: '1–99',
            })
  • controller.js:1810
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })
  • controller.js:1774
            this._speedEntry = new St.Entry({
                text: entry.speed.toString(),
                can_focus: true,
                x_expand: true,
                hint_text: '0–255',
            })
  • controller.js:2002
            this._entry = new St.Entry({
                text: currentName,
                can_focus: true,
                x_expand: true,
                hint_text: 'Profile name',
            })
  • controller.js:2008
            this._error = new St.Label({
                text: '',
                style_class: 'keyboard-danger',
            })

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

  • controller.js:750
            item.connect('activate', (...args) => {
                GObject.signal_stop_emission_by_name(item, 'activate');
                callback(...args);
            })
  • controller.js:691
            section.menu.connect('open-state-changed', (_menu, open) => {
                if (open)
                    this._extension.refreshPerKeyRgbZones();
            })
  • controller.js:736
            section.menu.connect('open-state-changed', (_menu, open) => {
                if (open)
                    this._extension.refreshMixRgbZones();
            })
  • controller.js:984
            section.menu.connect('open-state-changed', (_menu, open) => {
                if (open)
                    this._extension.openKeyboardConfiguration();
            })
  • controller.js:1569
    this._colorPicker.entry.clutter_text.connect('activate', () => this._submit())
  • controller.js:1673
    this._entry.clutter_text.connect('activate', () => this._submit())
  • controller.js:1807
    this._colorPicker.entry.clutter_text.connect('activate', () => this._submit())
  • controller.js:1809
    this._durationEntry.clutter_text.connect('activate', () => this._submit())
  • controller.js:1808
    this._speedEntry.clutter_text.connect('activate', () => this._submit())
  • controller.js:2012
    this._entry.clutter_text.connect('activate', () => this._submit())

All Versions

Version Status
5 Unreviewed
4 Rejected
3 Rejected
2 Active
1 Rejected

Previous Reviews on this Version

Roizo auto- rejected
Auto-rejected because of new version 4 was uploaded