FLUID-5114: Improve model relay component to interpret model transformation rules

Metadata

Source
FLUID-5114
Type
Improvement
Priority
Major
Status
Closed
Resolution
Duplicate
Assignee
Cindy Li
Reporter
Cindy Li
Created
2013-08-15T11:02:23.524-0400
Updated
2020-07-15T11:42:37.076-0400
Versions
N/A
Fixed Versions
N/A
Component
  1. UI Options

Description

The current model relay component only accepts direct one-to-one model path mapping such as:

rules: {
    [shared/external model path]: [internal model path]
}

However the discovery tool displays the need to be able to do transformation from one model structure to another during this translation. For example, in the discovery tool the model for the highContrast panel is {enabled: true} which really corresponds to a shared model of

{ 
     theme: "bw", 
     links: true, 
     inputsLarger: true, 
     textFont: "arial" 
}

The modelRelay's rules block should actually take in model transformation instructions and perform these on outgoing and incoming (using the inverse rules) model updates.

see:
http://wiki.gpii.net/index.php/Architecture_-_Available_transformation_functions
http://wiki.fluidproject.org/display/docs/fluid.model.transformWithRules

for the case of the one-to-many changes, look at the valueMapper

Comments

  • Antranig Basman commented 2013-08-22T15:50:09.459-0400

    Closed as duplicate of FLUID-5024