Open nexensys opened 3 years ago
Low priority.
I'm not sure, but I think this may be a duplicate?
addon.settings.getOptions("option name")
would be useless because the addon is coded for these settings, they never change types without a specific code change.
Why did you close this?
because nothing had happened and it had bad opinions...?
Addons shouldn't set settings by themselves. Some addon.storage suggestions might be implemented at some point of the future, but it's still to be dicussed.
Addons shouldn't set settings by themselves.
Being able to change settings in the addon's UI as well as on the settings page could be very useful (and I don't think that's the same as addons changing settings "by themselves"). For onion skinning, "load defaults" and "save defaults" would make the addon much easier to use. For themes, being able to (shift-)right click an element to change its color might be useful.
Hmm you have a point. But if we do this, we should make sure settings need to be explicitly set in the addon manifest as modifiable by the addon itself. Otherwise, any extension running on scratch.mit.edu could change all of the user's addon settings.
Addons shouldn't set settings by themselves.
Update: after some talk in the Discord server, I've seen there are situations where this it's beneficial to allow addons to change their own settings. However, both for security reasons and user experience, I concluded that not every setting should be "settable". Each setting should opt-in via an addon.json property. Also, allowing addons to save arbitrary values into settings, means we need to find a good way to validate whether a setting of type number remains a number, isn't NaN, etc.
Edit: see update below https://github.com/ScratchAddons/ScratchAddons/issues/1950#issuecomment-1287372899
Some addons have setting menus that they create when you are in the scratch editor (ex. onion skinning). Could we add a setter to the addon object to save changes users may have made in those setting menus? I ask this mainly because it is a feature that I would like to be able to use for my keyboard editor addon.
example usage:
may also need something to get possible options of a setting: