-
Notifications
You must be signed in to change notification settings - Fork 80
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Enable Phoenix LiveView support option in Torch #149
Comments
It's really not easy to use Torch with liveview. The classes are an issue. The PageView includes body_classes/2 which fails with a live page. I've been bypassing these classes by checking if the conn include the action name. However, now I have an issue that the css is tied to the body e.g. the .torch-new, .torch-index classes etc are all defined as body.torch-new, body.torch-index etc. This means I can't use those classes easily. I was planning on just wrapping my live templates in the correct classes but that's not possible. form#torch-form is also incompatible as live forms don't actually use an html form element. I bypassed this by importing the styles into my app without attaching them to the form e.g. instead of form#torch-form I imported as #torch-form. Would be really good to improve this when live view support is implemented. |
@JoeWoodward Thanks for the info/notes here. We haven't gotten too far down the line with making a LiveView "version" of Torch yet, but we'll keep these notes in mind as we progress on it. |
Looks like @andreaseriksson has started on this: https://github.com/fullstack-phoenix/lit |
@cpjolicoeur do you have any idea how the install generator should work?
I mean, mean, should it detect if liveview is installed and to a leex-version of the layout template or should that be an option passed in? |
@andreaseriksson I'd prefer to see a
It would be nice though to auto-detect, if possible, if the phoenix app was/is using liveview and then default to liveview templates in that case, (or perhaps prompt the user). |
@cpjolicoeur got it. |
No description provided.
The text was updated successfully, but these errors were encountered: