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

How can "toggle" be set to true as default? #17

Closed
michapixel opened this issue Jun 12, 2019 · 6 comments
Closed

How can "toggle" be set to true as default? #17

michapixel opened this issue Jun 12, 2019 · 6 comments

Comments

@michapixel
Copy link

No description provided.

@bakerkretzmar
Copy link
Owner

Just added this! Set 'default' => true for the Toggle settings you want on by default.

@michapixel
Copy link
Author

Very nice!
The toggle works as promised, but textfields/Textareas do not (didn't try checkboxes and radios or selects/options),
unless there is another way like what i did:

default -> nada
value -> nada
text -> nada
html -> nada

@bakerkretzmar bakerkretzmar reopened this Jun 23, 2019
@bakerkretzmar
Copy link
Owner

Didn't even think to expand this to the other setting types, will do.

@bakerkretzmar
Copy link
Owner

I'm rethinking this actually, since this package's goal isn't to handle the settings themselves in your app, just make a nice gui for them in Nova. With the toggle for example, setting default => true actually doesn't affect the value of the setting in the JSON, only what gets displayed on the tool. This actually strikes me as pretty confusing.

@michapixel thoughts?

@michapixel
Copy link
Author

michapixel commented Jul 27, 2019 via email

@bakerkretzmar
Copy link
Owner

@michapixel thanks for your input. I'm going to revert this in v1, I think it's safer to keep the presentation of the settings and their values firmly separate, if a setting needs to be 'on' or some other value by default, you should configure that where you're consuming the setting value or just manually set it to your desired default when you add it.

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

No branches or pull requests

2 participants