Conversation
|
We typically do tree traversion in LiveView. Shouldn't we do that instead of mutation? |
|
@josevalim the issue is that .portal supports arbitrary selectors and we don't have a mechanism to evaluate a selector when traversing the tree |
|
I wonder if we could have a simpler function that annotates all nodes that match a selector with a special attribute, then we convert it to a tree and find those attributes? easier than moving nodes around? |
|
That would work too, but I'm currently thinking we just don't add teleportation at all, since if you teleport to something outside of the LiveView, like the root layout, asserting in LiveViewTest would still fail. We can still decide if a annotate functionality would be useful in general. |
|
maybe instead we should have a function like |
Claude generated this code and I think it's wrong. When using this in a LiveView branch to do teleportation, I'm seeing very flaky tests: phoenixframework/phoenix_live_view#3952
I'm thinking we may just document that LiveViewTest does not teleport and if you want to assert, you need to assert on the HTML output of
render(view).