We came up with the grid-calendar component with early code[1]. This component attempts to inform its iframe height to the parent, the choreographer, so it causes changes to the above level of choreography, for instance the layout is changed.
Which is a location we tested an idea similar to "flex" from XUL. At this stage we simply rearrange each element's height position for the elements market with data-flex. This work is very much specific to the customer's case and some problems are pointed:
a hack – we need to do everything again;
Position for the element should not be associated with the need to refresh — we need to make sure an inner component , under its iframe, is simply telling parents about its' current size; A separated process may take in consideration that the height change is an event that needs a handler associated with it;
InformHeight, in the current implementation from case in [1] is breaking code execution as it attempts to use the window.parent.parent to achieve the choreographer. This is very much wrong aside the fact it's not using try/catch. The real problem here is the fact we are breaking the developer ergonomics in TelaSocial — the main rule is that we want to preserve each component running in standalone mode, a web page , while we make things shine when we put under the choreographer world — Tela Social acts like a "super visor" it sees things from another layer, it may even manipulate the web reality to achieve a richer compound document.
So, for example, a inner component should not do things like this:
Based in use case,
We came up with the grid-calendar component with early code[1]. This component attempts to inform its iframe height to the parent, the choreographer, so it causes changes to the above level of choreography, for instance the layout is changed.
[1] https://github.com/taboca/TelaSocial/tree/master/apps/base/grid-calendar
The early prototype worked well as a hack and it involved a works, under the PTI eventos case [2]
[2] https://github.com/taboca/FPTI-tela-eventos
And more precisely [3]
[3] https://github.com/taboca/FPTI-tela-eventos/blob/master/lib/choreographer.js#L17
Which is a location we tested an idea similar to "flex" from XUL. At this stage we simply rearrange each element's height position for the elements market with data-flex. This work is very much specific to the customer's case and some problems are pointed:
So, for example, a inner component should not do things like this:
https://github.com/taboca/TelaSocial/blob/master/apps/base/grid-calendar/app.js#L347