Example of using a command buttons on Extension settings?

I’ve hit a roadblock.

I notice that extension settings persist over uninstall:reinstall, so if a user deletes a defaults settings (empty string or array) there’s no way of recovering the default.

So, I’ve put a command button on settings to call a function to remove() this specific setting value. That should mean the default that ships in the extension.json is used.

But clicking the button I just see a spinner and the function isn’t called.

Does anybody have an example of using a command button on Extension settings?

Thanks!
matt

I shipped it with a “restore defaults” command, but no button in settings

From what I recall I think the command button only works in the workspace settings, not global settings. I think you can only call a command within a workspace context, not globally.

I have a command button in my extension Tabs Sidebar, but only in the workspace settings.

Also the configuration options have a “default” key where you can set a default value that is hard coded in. Check out the example configuration

Thanks for the info regarding Workspace limitation, that would be it.

Regarding defaults—there is no way to return a setting to the default. Even uninstalling, restarting Nova, reinstalling the extension has the same settings as before the uninstall.

I reported this as an issue to Nova/Panic.