DBCDK / biblo-admin

Admin application for biblo
0 stars 3 forks source link

[WIP] Widget normalizers #116

Closed kallehauge closed 8 years ago

kallehauge commented 8 years ago

The "title" property has not yet been supported for the text widget but there is no "fact box" widget either. Making this change could harmonise the way the widgets work.

I've spent some time "dumbing down" the way I recognised what widget the referenced field belongs too since it was too overly engineered compared to what it did. A good change could be to make the widgets' classes and make a widget interface to force all classes to implement a "name" and "config" method. This would also make it possible to reuse the code in the ContentEntityNormalizer later on if we should have to convert "non referenced items" to widgets as well (just a footnote to this subject: if we should simply make a list of widgets that will be rendered in the order we supply, then we need to know where the author name should be etc. This will require some coordination with the UX team – One of the best case scenarios for us would be a complete "node widget" with an array of "dynamic content" that can be rendered as expected).