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

[cobalt.conf] better default configuration #129

Open
ggendre opened this issue Oct 6, 2016 · 0 comments
Open

[cobalt.conf] better default configuration #129

ggendre opened this issue Oct 6, 2016 · 0 comments

Comments

@ggendre
Copy link
Contributor

ggendre commented Oct 6, 2016

main idea

remove default controller and move ALL default values to the root of the JSON.

More on this

All values that can be defined for a controller can be defined at the root level of the JSON, including bars, iosController, background and so on.

As the list of thi settings may be larger inb the future, we will need to rework the cobalt.conf parsing so that it will be easy to handle future default values for future settings.

This default value stytem is recursive : The controller values and the default values should be combined recusivelly. For example, with the following cobalt.conf, the title color of myPage will be white.

{
    bars :{
        color:'#fff',
        backgroundColor : '#000'
    }
    controllers : {
        myPage : {
            bars : {
                title : "Hello"
            }
        }
    }
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants