Every mode except runtime: :full renders through Vize.vapor_split!/1, and that function returns statics in document order but slots in another order. PhoenixVapor.Renderer then fills each hole with the wrong value.
render = fn template, assigns ->
template
|> PhoenixVapor.render(assigns)
|> Phoenix.HTML.Safe.to_iodata()
|> IO.iodata_to_binary()
end
render.(~s(<div :class="outer"><i :class="inner"></i></div>), %{outer: "OUTER", inner: "INNER"})
# got: <div class="INNER"><i class="OUTER"></i></div>
# expected: <div class="OUTER"><i class="INNER"></i></div>
render.(~s(<div><section><b v-if="on">Y</b></section><span>{{ label }}</span></div>), %{on: true, label: "L"})
# got: <div><section>L</section><span><b>Y</b></span></div>
# expected: <div><section><b>Y</b></section><span>L</span></div>
The second one changes the tree, not just the values.
Reproduced on phoenix_vapor 0.3.0 and on the inertia-inspired-foundations branch, against vize 0.10.0, 0.11.1 and 0.14.1. Elixir 1.20.0-rc.6, OTP 28.
Filed on the Vize side, where the ordering is lost: elixir-volt/vize_ex#3 — vapor_ir!/1 is correct, so the information is there; the split drops it.
Raising it here because it affects the ~VUE sigil, .vue server-only, :reactive and :hybrid alike, which leaves no usable path for writing a real screen as a Vue SFC today.
Every mode except
runtime: :fullrenders throughVize.vapor_split!/1, and that function returnsstaticsin document order butslotsin another order.PhoenixVapor.Rendererthen fills each hole with the wrong value.The second one changes the tree, not just the values.
Reproduced on phoenix_vapor 0.3.0 and on the
inertia-inspired-foundationsbranch, against vize 0.10.0, 0.11.1 and 0.14.1. Elixir 1.20.0-rc.6, OTP 28.Filed on the Vize side, where the ordering is lost: elixir-volt/vize_ex#3 —
vapor_ir!/1is correct, so the information is there; the split drops it.Raising it here because it affects the
~VUEsigil,.vueserver-only,:reactiveand:hybridalike, which leaves no usable path for writing a real screen as a Vue SFC today.