[Architecture] Combining complex panels in the preferences framework

Cheetham, Anastasia acheetham at ocadu.ca
Fri Aug 30 19:27:24 UTC 2013


On 2013-08-30, at 9:43 AM, Alexander Milchev wrote:

> Hi everyone,
> 
> I tried out the grade merging today and a question popped up.
> 
> It seemed to me that no more than one html template could be shared between multiple users of the same panel. This would be the template of the adjuster, defined last in the auxSchema. For instance (in Justin's example), if the auxSchema relates the big panel "fluid.uiOptions.panels.linksControls" to both emphasizeLinks and imputsLarger adjusters and imputsLarger is defined second, then info for template, container and message for emphasizeLinks is neglected and overwritten by those of imputsLarger.
> 
> Does this mean that all templates must be stuffed in one big html file (hope it doesn't) and how can the templates be apportioned properly?
> 
> Thanks,
> Alexander

Hi, Alexander,

It's possible I'm not quite understanding your question, and if so, please forgive me. But it is certainly possible for each panel to have its own template.

The auxiliary schema for the starter panels shows how this is done:
https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/StarterSchemas.js

The root part of the schema defines the template that will contain all of the panels:
https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/StarterSchemas.js#L34
This template contains an empty div for each panel.

The root part of the schema also defines a root directory for the individual panels:
https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/StarterSchemas.js#L33

Each of the panel blocks specifies its own template relative to the root directory:
https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/StarterSchemas.js#L45
https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/StarterSchemas.js#L66
https://github.com/fluid-project/infusion/blob/master/src/components/uiOptions/js/StarterSchemas.js#L87
etc.

(It isn't necessary to use the root directory prefix, that's just something you can use if it's helpful.)

Alexander, does this answer your question, or am I confused?

-- 
Anastasia Cheetham     Inclusive Design Research Centre
acheetham at ocadu.ca           Inclusive Design Institute
                                        OCAD University




More information about the fluid-work mailing list