You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Libdoc HTML outputs, similarly as log.html and report.html, use jQuery Templates for generating HTML content based on the date embedded to the outputs when they are created by Libdoc. In practice there's libdoc.html file that contains template code as well as JavaScript. It also uses external styles and some external JavaScript files used also by Rebot.
The explained setup has worked fine for us, but there's a problem that jQuery Templates have been unmaintained for years. We need to find a replacement for it and at the same time we should enhance our HTML/JavaScript setup in general. At least the following tasks should be done:
Find a replacement for jQuery Templates. We could use its successor JsRender or some totally new technology like Svelte.
Separate JavaScript code from HTML templates as much as possible.
Add tests for JavaScript model code. A precondition is deciding what test tool(s) to use.
Set up GitHub actions to run JavaScript tests.
Decide and document JavaScript coding conventions. Using an automated code formatter could be a good idea.
This issue is a precondition for modernizing the tech used by log.html and report.html. They contain a lot more JavaScript code and having better JavaScript setup (test system, CI, conventions, ...) in place will help. Enhancing log.html and report.html requires its own issue and is probably so big task that it needs to wait for RF 6.0.
I would consider using plane vanilla js for templating. Current techs like Svelte, Vue, React, Angular etc. are in my opinion towards dynamic sites.
We do not need them.
Modern Js is very good for templating.
As #4497 explains, it would be convenient to be able to use custom styles with Libdoc. Injecting custom styles to generated HTML files wouldn't be hard, but the problem is that then the whole HTML structure becomes part of the public API and changes to it can break external styles. If we allow that, we probably should decide what parts of the structure (ids, classes, etc.) would be considered stable and only changed if absolutely needed and only in major versions.
Activity
pekkaklarck commentedon Apr 7, 2022
This issue is a precondition for modernizing the tech used by log.html and report.html. They contain a lot more JavaScript code and having better JavaScript setup (test system, CI, conventions, ...) in place will help. Enhancing log.html and report.html requires its own issue and is probably so big task that it needs to wait for RF 6.0.
mkorpela commentedon Apr 11, 2022
I would consider using plane vanilla js for templating. Current techs like Svelte, Vue, React, Angular etc. are in my opinion towards dynamic sites.
We do not need them.
Modern Js is very good for templating.
mkorpela commentedon Apr 11, 2022
https://gomakethings.com/html-templates-with-vanilla-javascript/
example
pekkaklarck commentedon Oct 6, 2022
As #4497 explains, it would be convenient to be able to use custom styles with Libdoc. Injecting custom styles to generated HTML files wouldn't be hard, but the problem is that then the whole HTML structure becomes part of the public API and changes to it can break external styles. If we allow that, we probably should decide what parts of the structure (ids, classes, etc.) would be considered stable and only changed if absolutely needed and only in major versions.
pekkaklarck commentedon Aug 25, 2023
There hasn't been too much interest towards this lately. I'll move this from RF 7 scope to 7.1.
yanne commentedon Dec 20, 2024
This is now done and will be released in RF 7.2