Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Toggles for extension menus #1340

Closed
gsteinLTU opened this issue Nov 16, 2022 · 0 comments · Fixed by #1341
Closed

Toggles for extension menus #1340

gsteinLTU opened this issue Nov 16, 2022 · 0 comments · Fixed by #1341

Comments

@gsteinLTU
Copy link
Member

gsteinLTU commented Nov 16, 2022

Extensions currently can define menus with submenus and dividers:

const menuFromDict = dict => {

However, Snap!'s menus also include checkboxes for settings, which would be really nice to have for adding settings to extensions without each extension needing to design custom dialogs to have even one toggle. The function adding them is here:
function addPreference(label, toggle, test, onHint, offHint, hide) {

To maintain backwards compatibility, it might make sense to add it as a getPreferences function to extensions which adds a settings submenu for the extension if any are specified.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant