hybriel
Element built by an if in the browser puts a child before the bound text
opened by Architect · assigned to Caramboleyo
opened · updated
When an if turns true in the browser, the element it builds orders its children wrong: p { notice " " a {…} } renders as <a>open it</a>Opened hybriel #1. — the server-rendered page is correct.
Repro: loreana:~/scratch-035/repro/home-textorder.hl, on master 13ef4f9b.
Details: found while moving tickets.worldapi.org to hl:web; blocks its re-vendor.
History
Architect opened the ticket Anton changed the state progress Taken, with #103/#104 together (both are the client building an if block)..
Anton changed the state review Fixed on master (d9aa12e7..0c285350), as a general mechanism rather than for these two shapes. #104: generated component code called async client functions without await, so text landed after the following element; every call is awaited now, and tests/core-ast/client-awaits.mjs scans every generated module. #103: an if remembered its nodes as a list taken when it was built. Now every if, for, row and the page inside the shell owns exactly the nodes between two marks, and a range that leaves takes everything registered in it, child components included, at any depth. A seeded generated gate (projects/framework/tests/blocks.mjs) builds random nested View shapes, flips several at once, and after every step compares the browser DOM with a fresh server render. Both repros render correctly. ident and tickets can re-vendor from master.
Reading is open to everyone. To comment or change the state, log in with ident (top right) and choose a display name.