Various tweaks for a more predictable Gnome shell experience
Note: Binary files aren't shown on the web site. To see all files, please download the extension zipfile.
1. Please remove line 81-83 `src/mouse_follows_focus.js`. 2. No need to extend `Extension` (line 34 `src/mouse_follows_focus.js`). 3. You don't need to create another settings instance (line 90 `src/direct_window_switch.js`). Just send the instance of the `settings` from the entry point (dependency injection). btw, do #1 and #3 for these files too: - `src/dbus_window_focus.js` - `src/direct_window_switch.js` Wanna fix and send it again?
1. Sure, I noticed these were dead code after I submitted my update. Sorry about that, I will remove them. As for 2. and 3. I don't really understand why these changes would be needed? I understand that I don't need to extend Extension, and that I could reuse the settings variable, but I quite enjoy the modular structure of various modules of my extension just being theoretically free-standing extensions themselves. I would also assume the performance loss of not reusing settings is probably negible? So, if this is just a code style suggestion rather than a hard rule, I would like to keep this structure. In any case, thank you for your hard work on reviewing extensions!
I understand it's working but that's not a good/correct use case for the `Extension` class. It's like `class Car extends Airport` just because we want cars in our airport. If you want the module work in another extension, you should make it as an API or stand alone module not an extension. I'm doing it in [my extension](https://gitlab.gnome.org/jrahmatzadeh/just-perfection/-/blob/main/src/lib/API.js). I actually mentioned this in [GNOME Matrix Channel](https://matrix.to/#/#extensions:gnome.org), and I'm still not in favor of this architecture since the sub modules shouldn't be separated extensions. Anyway, still your choice since I don't want to impose the architecture and patterns you are using in your extension. If you still want to keep the current architecture, please let me know.
I understand your point. Though, on a philosophical level. I think it's more like as part of our `class Train extends Vehicle` we also define that `class Wagon extends Vehicle` because we would like to think of our wagons as individual vehicles. However, on a practical level, I totally understand how this architecture could lead to problems in the future and I think that there probably should be an explicit rule against instantiating multiple `Extension` objects in one extension. I'll rework my code to use a private class that mirrors the relevant parts of `Extension`.