Rewrite templates for different widgets to make them composable

Registered by Timur Sufiev

As of now different fields templates do not use composition which increases template complexity and limits widgets functionality. A simple-example: there is a template for dictionary widget https://github.com/tsufiev/merlin/blob/master/merlin/static/merlin/templates/fields/dictionary.html and for string widget https://github.com/tsufiev/merlin/blob/master/merlin/static/merlin/templates/fields/string.html

To enable autocompletion functionality for separate fields of dictionary (given that it's already supported on the model-level) it's necessary to modify the dictionary template, while in case the dictionary template was composed of other <typed-field> directives it could delegate rendering autocompletion hints to the string widget (that's the argument for 'limited functionality').

A strong argument for 'increased complexity' is the contents of https://github.com/tsufiev/merlin/blob/master/extensions/mistral/static/mistral/templates/fields/varlist.html which repeats most parts of string, list and dictionary templates depending on the value of this wigdet's type.

Most likely this refactoring should start from the top-level, leaving there only iteration over panels and hiding all other 'ng-repeat's into <typed-field type='panel'> innards

Blueprint information

Status:
Not started
Approver:
None
Priority:
Undefined
Drafter:
Timur Sufiev
Direction:
Needs approval
Assignee:
None
Definition:
New
Series goal:
None
Implementation:
Unknown
Milestone target:
None

Related branches

Sprints

Whiteboard

Gerrit topic: https://review.openstack.org/#q,topic:templates-refactoring,n,z

Addressed by: https://review.openstack.org/186789
    WIP Refactor templates

Addressed by: https://review.openstack.org/186790
    WIP Refactor templates pt2

Gerrit topic: https://review.openstack.org/#q,topic:bp/composable-templates,n,z

Addressed by: https://review.openstack.org/204202
    [WIP] Started truly composable templates

Addressed by: https://review.openstack.org/204718
    Rewrite <labeled> directive to render editable labels

Gerrit topic: https://review.openstack.org/#q,topic:bp/decouple-ui-hints-and-models,n,z

(?)

Work Items

This blueprint contains Public information 
Everyone can see this information.

Subscribers

No subscribers.