liveview-native / live_view_native

A framework for building native applications with Phoenix LiveView
https://native.live/
MIT License
628 stars 22 forks source link

Malformed view crashes the LVN Go app #204

Open alykhanjetha opened 2 months ago

alykhanjetha commented 2 months ago

The following code works:

        <VStack :for={message <- @messages}>
            <Text><%= message.name %></Text>
            <Spacer/>
            <Text><%= message.content %></Text>
        </VStack>

The following will crash the app:

        <VStack :for={message <- @messages}>
            <Text alignment: .leadin><%= message.name %></Text>
            <Spacer/>
            <Text><%= message.content %></Text>
        </VStack>

Note the alignment: .leadin mistake I made.

The markup is definitely wrong, but the app shouldn't crash.

bcardarella commented 2 months ago

This should be captured in the template compiler and not be permitted to render from the server. I'm going to move this to live_view_native as the bug is there