Updated Powertoys module interface to disable modules by default if the Module Interface does not specify explicitly#42819
Conversation
…terface does not specify explicitly
|
how does this affect a new user with a fresh install of powertoys. this sounds pretty drastic change of behavior |
|
@crutkas, I deleted the PowerToys folder from local app data, uninstalled previous versions and used the installer from this PR to test. The result is that only 3 modules (File locksmith, Image resizer, and PowerRename) are enabled by default. These three modules use a different pattern than the rest of the modules, which is why they stand out. No other module is explicitly set to be enabled by default. From there the new user is able to enable what they want after learning about the modules. To simulate an update, I uninstalled they app and reinstalled it. It pulled from my existing settings file and all the modules I had enabled before are still enabled. |
|
Do we still need this one? I think it will be little risky compared to the benefits it will bring to us ? |
|
@vanzue, we can close this. I think we just need to be mindful when making new modules to think about whether or not it should be disabled by default. |
Summary of the Pull Request
Right now, the module interface class specifies that modules should be enabled by default. When creating a new PowerToy, if the developer does not override this function, the runner will assume the module should be enabled by default. This can cause issues like we saw with Light Switch: #42386. To fix this, I have changed the default to false so that only if the developer has explicitly enabled the module will it ever be enabled by default.