Metadata
- Source
- FLUID-5972
- Type
- Improvement
- Priority
- Major
- Status
- Open
- Resolution
- N/A
- Assignee
- Colin Clark
- Reporter
- Tony Atkins [RtF]
- Created
2016-09-27T06:00:07.519-0400 - Updated
2024-07-22T09:21:13.486-0400 - Versions
- N/A
- Fixed Versions
- N/A
- Component
-
- Model Transformation System
Description
In my own work, I created a transform function that allows you to perform a single transformation on every element in an array:
https://github.com/the-t-in-rtf/ul-api/blob/UL-65/src/js/client/transformArray.js
As I will be working on submitting other transformation functions, I wanted to create this and ask @@Antranig Basman if he'd like to see this as well. "hell no" and "not yet" are perfectly acceptable answers.
Comments
-
Antranig Basman commented
2016-10-04T10:53:17.750-0400 The use case is fine, but the implementation strategy is inappropriate - we can't support a fresh re-entry into the top of fluid.model.transformWithRules because there is a whole ecology of other use cases which the transformation system needs to support, including:
i) The "collectInputPaths" strategy for the entire system
ii) Support for inverting transforms
iii) Integration with the modelRelay infrastructure
etc.This should be rewritten to use the standard "expand" or "getValue" primitives that the transformer exposes internally which you can see in transforms which process multiple values such as
https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/ModelTransformationTransforms.js#L123
and
https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/ModelTransformationTransforms.js#L239
and
https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/ModelTransformationTransforms.js#L285 -
Tony Atkins [RtF] commented
2016-10-05T08:47:27.642-0400 @@Kasper Galschiot Markus, @@Antranig Basman, would either of you care to comment on what
transformer
is likely to be on this line:I would like to:
- Add JSDocs throughout the file if possible.
- Understand the implications of this variable for my own work on the array handler.
-
Antranig Basman commented
2016-10-05T08:53:54.392-0400 Note that there is a huge amount of work documenting the transforms in this pull: https://github.com/fluid-project/infusion-docs/pull/86 - this is probably mostly back in my court but has been tough to review because of the absolutely giant diff.
transformer
on line 116 is the "core transformer engine" which is created here: https://github.com/fluid-project/infusion/blob/master/src/framework/core/js/ModelTransformation.js#L612