backroad icon indicating copy to clipboard operation
backroad copied to clipboard

Settings API

Open themeblvd opened this issue 6 years ago • 0 comments

This will be the third and final high-level feature Back Road needs for the initial 1.0.0 release. We've got the ability to manage users and content. And finally, the user needs to be able to edit general settings.

Primary Objective

  • Developers will be able to add groups of settings.
  • A group of settings will have an id, name, and set of fields.
  • A group of settings will display as a menu item under "Configure" in the admin client.

Why a settings "group" and not a settings "page"?

For now I'd like to not get too hung up on this. Currently, the application doesn't do a whole lot, and so there's room to add settings groups as individual pages, giving everything more room to breathe. But in the future, if there were more items getting added to that "Configure" section, we might want to condense all settings groups to tabs of a single view (for example).

So internally, we'll refer to these as groups and not pages, views, etc. That way, the idea of groups of settings can then be implemented in a variety of different ways in the future.

API Structure

With that said, similar to changes made in #4 in the content API, we can follow this pattern of allowing methods that accomplish the primary objective of the API to be implicitly named.

So for example instead of:

app.settings.addGroup({ ... })

Adding a group will look like:

app.settings.add({ ... })

And it will be assumed that implicitly named methods like add(), remove(), etc, refer to modifying these groups of settings.

themeblvd avatar Jul 01 '18 16:07 themeblvd