liveview-native / liveview-client-swiftui

MIT License
353 stars 31 forks source link

Disable validation/Change to custom compiler #136

Closed AZholtkevych closed 1 year ago

AZholtkevych commented 1 year ago

Here we are not producing HTML. And we should use the original casing. For example: <"Text"> instead of <"text">. Phoenix LV added HTML validation last year which is causing this. So basically here are 2 solutions:

  1. Disable validation
  2. Change to a custom compiler.
AZholtkevych commented 1 year ago

FYI @bcardarella , @carson-katri

AZholtkevych commented 1 year ago

FROM SLACK LIVEVIEW NATIVE channel: Chris McCord 41 minutes ago @bcardarella not sure. The Heex compiler treats capitalized tags as remote modules for <Foo.bar componetn style calls. We could probably allow a setting to support this

bcardarella 30 minutes ago Oh right, what if there is no dot-notation?

Chris McCord 30 minutes ago it’s still confusing because folks may expect to do Badge.render like surface does

Chris McCord 29 minutes ago or if we decided to do something like that later (almost for sure wouldn’t) it would break (edited)

bcardarella 14 minutes ago Ok. Ill have to note this somewhere because I keep forgetting it

AZholtkevych commented 1 year ago

@supernintendo FYI

supernintendo commented 1 year ago

@AZholtkevych Disabling validation for void tags and other HTML-specific syntax is resolved with version 0.0.3 of the following packages: https://github.com/liveviewnative/live_view_native https://github.com/liveviewnative/live_view_native_platform https://github.com/liveviewnative/live_view_native_swift_ui

The casing change (i.e. <Text> to </text>) is a do not fix since it would conflict with the syntax for function components.

AZholtkevych commented 1 year ago

@supernintendo thank you so much