We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
We have a bunch of state that we pass in via the hosting app or set defaults in the StartupState, particularly for UI preferences https://github.com/mozilla/brackets/blob/master/src/bramble/StartupState.js#L15. Here: https://github.com/mozilla/brackets/blob/master/src/extensions/default/bramble/main.js#L185-L195, we initialize that state blindly without checking if the values are being set to what is being expected (for e.g. booleans, objects, etc.). This results in us having to do some pretty heavy-handed type checking here: https://github.com/mozilla/brackets/blob/master/src/extensions/default/bramble/lib/UI.js#L89-L110. Let's try to move that type checking into the .ui function so that we can define properties on it and specify the types they accept. I think the way PreferencesManager does it is pretty nice (https://github.com/mozilla/brackets/blob/master/src/editor/Editor.js#L159-L222) and might be a model we want to follow.
.ui
PreferencesManager
The text was updated successfully, but these errors were encountered:
No branches or pull requests
We have a bunch of state that we pass in via the hosting app or set defaults in the StartupState, particularly for UI preferences https://github.com/mozilla/brackets/blob/master/src/bramble/StartupState.js#L15. Here: https://github.com/mozilla/brackets/blob/master/src/extensions/default/bramble/main.js#L185-L195, we initialize that state blindly without checking if the values are being set to what is being expected (for e.g. booleans, objects, etc.). This results in us having to do some pretty heavy-handed type checking here: https://github.com/mozilla/brackets/blob/master/src/extensions/default/bramble/lib/UI.js#L89-L110. Let's try to move that type checking into the
.ui
function so that we can define properties on it and specify the types they accept. I think the wayPreferencesManager
does it is pretty nice (https://github.com/mozilla/brackets/blob/master/src/editor/Editor.js#L159-L222) and might be a model we want to follow.The text was updated successfully, but these errors were encountered: