ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

[FEATURE] UI: improve context rendering

Open thibsy opened this issue 1 year ago • 0 comments

Hi folks,

I have removed some unnecessary complexity from the UI framework:

  • Renderer::withAdditionalContext(): this method has been invoked in order to provide a context to the current rendering chain. However, due to the recursive nature of our rendering process, we can always know the current context because all rendering calls will eventually invoke our DefaultRenderer again. I have discussed with @klees to replace usages of this method by creating a new instance of the concrete context renderer already. However, I have decided not to do so until we have a proper mechanism to gather assets and inject them into our page component.
  • RendererFactory::getJSBinding(): since instances are passed by reference, we can simply inject the JavaScriptBinding directly into our DefaultRenderer. No need to retrieve the RendererFactory and/or ComponentRenderer again.

Kind regards, @thibsy

thibsy avatar May 01 '24 13:05 thibsy