Metadata
- Source
- FLUID-5817
- Type
- Improvement
- Priority
- Major
- Status
- Closed
- Resolution
- Fixed
- Assignee
- Colin Clark
- Reporter
- Antranig Basman
- Created
2015-11-12T12:45:10.429-0500 - Updated
2024-07-23T10:44:05.734-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Prefs Framework
Description
The body of fluid.prefs.create, our convenience "one stop shop" for building and instantiating a prefs editor, takes the form of some literal code:
fluid.prefs.create = function (container, options) {
options = options || {};
var builder = fluid.prefs.builder(options.build);
return fluid.invokeGlobalFunction(builder.options.assembledPrefsEditorGrade, [container, options.prefsEditor]);
};
This makes it hard for people to build on the work of others in producing preferences editors. Our best practice is to package all artefacts as grades so that they can be freely extended and reused by others. This code dates from a time when the framework was less capable than it is today with respect to dynamic grades. As soon as we "break the chain" of using grades and fall back to plain functions, everyone who follows has to fall into the same trap - see issue at https://github.com/fluid-project/infusion/pull/629/files#r44682586 and discussion in IRC
at https://botbot.me/freenode/fluid-work/2015-11-12/?msg=53997194&page=2
Comments
-
Justin Obara commented
2024-07-23T10:44:05.552-0400 fluid.prefs.create
has been replaced withfluid.uiOptions