foo
This application is for forms for users to change their preferences. If you want to be part of this application please open PR and update src/config/config.json
. Each user preferences page uses this config and it will automatically fetch new data driven form schemas based on it.
We rely heavily on library called Data driven forms, where we use schema to render components in form. Please go to their documentation if you want to enable new user preferences for your application.
We have designed a few custom components to be used when working with data driven forms to properly show some information on screen.
DescriptiveCheckbox
this component is for displaying checkbox with title and description.descriptiveCheckbox
- component name to be used in DDF schemalabel
- will be shown as main titledescription
- will be shown underlabel
If your application should be hidden behind some permission checker (similiar to cloud-services-config#permissions) you can add permissions
field to your application in config.json
. It can either be object with method and list of arguments, or array with method and list of arguments.
The list of all methods can be found insights-chrome#permissions with additional functions:
hasLoosePermissions
- for checking if user has at least one of given permissions
Note: All functions can use the negated form by prefixing the name with !
. e.g. !isBeta
.
{
"email-preference": {
...
"example": {
"title": "Example",
"permissions": {
"method": "hasPermissions",
"args": [
["app:action:create"]
]
}
},
}
}
To enable your form parts in user preferences we need the application name to be listed in the config.json
file.
npm install
npm run start