Skip to content

New technology for Libdoc HTML outputs #4304

Closed
Closed

Description

@pekkaklarck

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.
  • Take localization into account. See Libdoc localizations #3676.
  • Take accessibility into account. See improve accessibility of HTML report files #3879.

Activity

  1. added this to the v5.1 milestone on Apr 7, 2022
  2. pekkaklarck commented on Apr 7, 2022

    @pekkaklarck
    MemberAuthor

    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.

  3. mkorpela commented on Apr 11, 2022

    @mkorpela
    Member

    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.

  4. modified the milestones: v5.1, v5.2 on Jun 30, 2022
  5. pekkaklarck commented on Oct 6, 2022

    @pekkaklarck
    MemberAuthor

    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.

  6. modified the milestones: v6.1, on Jan 3, 2023
  7. modified the milestones: , v7.0 on Apr 18, 2023
  8. pekkaklarck commented on Aug 25, 2023

    @pekkaklarck
    MemberAuthor

    There hasn't been too much interest towards this lately. I'll move this from RF 7 scope to 7.1.

  9. modified the milestones: v7.0, v7.1 on Aug 25, 2023
  10. self-assigned this
    on Apr 10, 2024
  11. modified the milestones: v7.1, v7.2 on Aug 23, 2024
  12. yanne commented on Dec 20, 2024

    @yanne
    Member

    This is now done and will be released in RF 7.2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions