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

Plugin settings in the settings UI #222

Closed
BrainMaestro opened this issue Mar 6, 2017 · 2 comments
Closed

Plugin settings in the settings UI #222

BrainMaestro opened this issue Mar 6, 2017 · 2 comments

Comments

@BrainMaestro
Copy link
Contributor

Some plugins need to be able to store settings. An example would be an API_KEY for the stackoverflow plugin to prevent rate limiting, but there are many possible scenarios. I'm not sure how the plugin authors currently implement it, but wouldn't it be nice if a plugin can register the settings it needs, and those options show up in the cerebro settings under a category for the app. Similar to how iOS handles app settings.

The format could be key: type

module.exports = {
  fn: fn,
  settings: {
     API_KEY: 'string'
  }
}
@KELiON
Copy link
Collaborator

KELiON commented Mar 7, 2017

I think it is necessary feature and I had it in my backlog! Would be nice if someone can help me with implementation of it. Do you want to start it @BrainMaestro?

As I see it

We can use json-schema for plugin settings keys. When all plugins loaded we know which of them include settings key, so we can display inputs for these plugins in current "settings" view. Also we can reuse existing input elements (dropbowns, inputs, checkboxes) from existing settings.

These settings could be just stored in the global config file.

@BrainMaestro
Copy link
Contributor Author

Yeah that's a good idea. I'll start it.

@BrainMaestro BrainMaestro mentioned this issue Mar 10, 2017
6 tasks
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