Layout failing with user components #72
Description
Root cause issue for:
- Fish shell #65
- Rendering Breaks if User Components Used #68
- Gibberish main window #70
- GUI is messed up svelte-nodegui-starter#4
After a lot of red herrings involving Node version, environment, nodegui
version, qode
version, shell, custom elements, etc., I think I finally understand what's going on.
v0.0.3-alpha.1
was the last release in which the starter template's layout was seen to be correct. However, in that release, {#each}
and {#if}
blocks didn't work correctly. So I merged the PR #60 in v0.0.4
, changing how child elements were inserted, which seemed to fix that problem in all cases. Unfortunately, this PR brought an unnoticed regression in more complex UIs like that of the starter template.
So this is problematic. We don't want to roll back to the DOM algorithm used in v0.0.3-alpha.1
because it has a subtle problem that stops {#each}
and {#if}
blocks working. We also can't stick with the approach used since v0.0.4
(still used in the version at the time of writing,v0.1.2
), because it has obvious layout issues.
Fixing {#each}
and {#if}
behaviour was a horribly subtle problem to solve, so I think the way forward is to stick with this current DOM model (rather than rolling back to the old DOM model) and try to fix this obvious layout problem.