Metadata
- Source
- FLUID-6514
- Type
- Bug
- Priority
- Major
- Status
- Open
- Resolution
- N/A
- Assignee
- N/A
- Reporter
- Cindy Li
- Created
2020-06-04T16:46:13.116-0400 - Updated
2020-06-05T10:01:51.195-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Prefs Framework
- UI Options
Description
When changing the default values defined in the primary schema of the preferences framework, for example, to set the minimum value of the line space to 1, the current working approaches are:
1. Rewrite and override "fluid.prefs.schemas.lineSpace":
fluid.defaults("fluid.prefs.schemas.lineSpace", {
gradeNames: ["fluid.prefs.schemas"],
schema: {
"fluid.prefs.lineSpace": {
"type": "number",
"default": 1,
"minimum": 1,
"maximum": 2,
"multipleOf": 0.1
}
}
});
2. Override transformed options at instantiate "fluid.uiOptions":
fluid.uiOptions(".flc-prefsEditor-separatedPanel", {
schema: {
properties: {
"fluid.prefs.lineSpace": {
"minimum": 1
}
}
}
});
Either of above requires knowledge of the internal implementation of the preferences framework.
It would be more integrator friendly to simplify the API, such as:
fluid.uiOptions(".flc-prefsEditor-separatedPanel", {
"fluid.prefs.lineSpace": {
minimum: 1
}
});
Reference: This issue is initially discovered with a WeCount website requirement. See discussions in its pull request.