Skip to content

[IMP] runbot: lazy load build options dropdown menu#1443

Open
pparidans wants to merge 1 commit into
19.0from
19.0-lazy-build-dropdown-app
Open

[IMP] runbot: lazy load build options dropdown menu#1443
pparidans wants to merge 1 commit into
19.0from
19.0-lazy-build-dropdown-app

Conversation

@pparidans

@pparidans pparidans commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

Rendering the build options dropdown menu for every build on page load
significantly increases the initial DOM size and payload.

This commit refactors the dropdown menu to render lazily on client
interaction (hover, focus, touch, or click):

  • Introduces build-options-dropdown, a custom HTML element that
    captures build context via data-* attributes.
  • Adds a lightweight client-side QWeb rendering engine (templating.js)
    capable of handling t-foreach, t-if, t-else, and {{...}}
    interpolations using Python expression evaluation (py_js).
  • Moves the dropdown HTML structure into client-side <template> tags
    (build-options-dropdown-menu), generating the DOM nodes only when
    the user interacts with the build menu button.

@pparidans pparidans self-assigned this Jul 3, 2026
@pparidans pparidans force-pushed the 19.0-lazy-build-dropdown-app branch 3 times, most recently from e71aae9 to fe6a78e Compare July 6, 2026 12:00
@pparidans pparidans changed the title [IMP] runbot: lazy build dropdown menu [IMP] runbot: lazy load build options dropdown menu Jul 6, 2026
@pparidans pparidans marked this pull request as ready for review July 6, 2026 12:03
@pparidans pparidans force-pushed the 19.0-lazy-build-dropdown-app branch 2 times, most recently from b4c4a79 to b8532e5 Compare July 6, 2026 12:07
@C3POdoo C3POdoo requested a review from a team July 6, 2026 12:16
Comment thread runbot/templates/utils.xml Outdated
@pparidans pparidans force-pushed the 19.0-lazy-build-dropdown-app branch 2 times, most recently from 893ed37 to d1ebf52 Compare July 7, 2026 08:39
Rendering the build options dropdown menu for every build on page load
significantly increases the initial DOM size and payload.

This commit refactors the dropdown menu to render lazily on client
interaction (hover, focus, touch, or click):
- Introduces `build-options-dropdown`, a custom HTML element that
  captures build context via `data-*` attributes.
- Adds a lightweight client-side QWeb rendering engine (`templating.js`)
  capable of handling `t-foreach`, `t-if`, `t-else`, and `{{...}}`
  interpolations using Python expression evaluation (`py_js`).
- Moves the dropdown HTML structure into client-side `<template>` tags
  (`build-options-dropdown-menu`), generating the DOM nodes only when
  the user interacts with the build menu button.
@pparidans pparidans force-pushed the 19.0-lazy-build-dropdown-app branch from d1ebf52 to a4e1dad Compare July 7, 2026 08:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant