Skip to content
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

IF vs SwiftUI if #20

Closed
detectedstealth opened this issue Apr 5, 2020 · 3 comments
Closed

IF vs SwiftUI if #20

detectedstealth opened this issue Apr 5, 2020 · 3 comments

Comments

@detectedstealth
Copy link

Is there any future plans of making the if statements work natively like they do with SwiftUI. And also what about support for opaque types for the body property?

I think this project has huge potential (definitely like it more than Leaf), I would like to know more about the future plans and direction, as I'm possibly interested in contributing.

@MatsMoll
Copy link
Member

MatsMoll commented Apr 8, 2020

Awesome to hear that you like HTMLKit and want to contribute.

Regarding the if's. The reason it is its own type in HTMLKit, is in order to understand all the different "branches" an if can take. This is needed in order to optimize the rendering. I have not found any way of optimizing the rendering with the native if yet, unfortunately. But I would prefer the native if possible.

About future plans. There have been a few requests about a better way of implementing styling. So a way of adding CSS. I think there is a framework called CSSKit that has tried to create a DSL for CSS, so integration something like this could be nice.

Also making HTMLKit compatible with Vapor 4 is something that would be nice. I have not been able to look at Vapor 4 yet, and therefore not prioritized it yet.

Lastly, there has been an effort to update the rendering engine to use opaque types with the help of Joannis. But it is a while since it was worked on. It should be its own branch if you want to take a look, but parts of the code are not documented.

So any help would be appreaciated! I am currently writing a bachelor thesis, so I do not have that much time to update the codebase right now.

@detectedstealth
Copy link
Author

Awesome thanks for the follow up I will keep diving into what is already here and checkout the other branches/projects you were talking about.

It would be nice to have styles work the same way modifiers work with SwiftUI.

Good luck on your thesis.

@mattesmohr
Copy link
Member

I close the issues, cause it is way past and I see no solution for this case in the near future.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants