[IMP] runbot: lazy load build options dropdown menu#1443
Open
pparidans wants to merge 1 commit into
Open
Conversation
e71aae9 to
fe6a78e
Compare
b4c4a79 to
b8532e5
Compare
pparidans
commented
Jul 6, 2026
893ed37 to
d1ebf52
Compare
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.
d1ebf52 to
a4e1dad
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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):
build-options-dropdown, a custom HTML element thatcaptures build context via
data-*attributes.templating.js)capable of handling
t-foreach,t-if,t-else, and{{...}}interpolations using Python expression evaluation (
py_js).<template>tags(
build-options-dropdown-menu), generating the DOM nodes only whenthe user interacts with the build menu button.